blob: 7d6423ad2b8372232c53bc67ba7a6641a1b565f2 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandl3a5508e2011-03-06 10:42:21 +01002# From configure.in Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Charles-François Natali97781b02011-07-22 23:43:42 +02004# Generated by GNU Autoconf 2.67 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Martin v. Löwiseba40652007-08-30 20:10:57 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Martin v. Löwiseba40652007-08-30 20:10:57 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
37
Skip Montanaro6dead952003-09-25 14:50:04 +000038
Matthias Klosea0bea5d2010-05-08 10:00:28 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Martin v. Löwiseba40652007-08-30 20:10:57 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000095case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Martin v. Löwiseba40652007-08-30 20:10:57 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000116fi
117
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000135
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 BASH_ENV=/dev/null
221 ENV=/dev/null
222 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223 export CONFIG_SHELL
Charles-François Natali97781b02011-07-22 23:43:42 +0200224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000225fi
226
227 if test x$as_have_required = xno; then :
228 $as_echo "$0: This script requires a shell more modern than all"
229 $as_echo "$0: the shells that I found on your system."
230 if test x${ZSH_VERSION+set} = xset ; then
231 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
232 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
233 else
234 $as_echo "$0: Please tell bug-autoconf@gnu.org and
235$0: http://bugs.python.org/ about your system, including
236$0: any error possibly output before this message. Then
237$0: install a modern shell, or manually run the script
238$0: under such a shell if you do have one."
239 fi
240 exit 1
241fi
242fi
243fi
244SHELL=${CONFIG_SHELL-/bin/sh}
245export SHELL
246# Unset more variables known to interfere with behavior of common tools.
247CLICOLOR_FORCE= GREP_OPTIONS=
248unset CLICOLOR_FORCE GREP_OPTIONS
249
250## --------------------- ##
251## M4sh Shell Functions. ##
252## --------------------- ##
253# as_fn_unset VAR
254# ---------------
255# Portably unset VAR.
256as_fn_unset ()
257{
258 { eval $1=; unset $1;}
259}
260as_unset=as_fn_unset
261
262# as_fn_set_status STATUS
263# -----------------------
264# Set $? to STATUS, without forking.
265as_fn_set_status ()
266{
267 return $1
268} # as_fn_set_status
269
270# as_fn_exit STATUS
271# -----------------
272# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
273as_fn_exit ()
274{
275 set +e
276 as_fn_set_status $1
277 exit $1
278} # as_fn_exit
279
280# as_fn_mkdir_p
281# -------------
282# Create "$as_dir" as a directory, including parents if necessary.
283as_fn_mkdir_p ()
284{
285
286 case $as_dir in #(
287 -*) as_dir=./$as_dir;;
288 esac
289 test -d "$as_dir" || eval $as_mkdir_p || {
290 as_dirs=
291 while :; do
292 case $as_dir in #(
293 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
294 *) as_qdir=$as_dir;;
295 esac
296 as_dirs="'$as_qdir' $as_dirs"
297 as_dir=`$as_dirname -- "$as_dir" ||
298$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
299 X"$as_dir" : 'X\(//\)[^/]' \| \
300 X"$as_dir" : 'X\(//\)$' \| \
301 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
302$as_echo X"$as_dir" |
303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)[^/].*/{
308 s//\1/
309 q
310 }
311 /^X\(\/\/\)$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\).*/{
316 s//\1/
317 q
318 }
319 s/.*/./; q'`
320 test -d "$as_dir" && break
321 done
322 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000323 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000324
325
326} # as_fn_mkdir_p
327# as_fn_append VAR VALUE
328# ----------------------
329# Append the text in VALUE to the end of the definition contained in VAR. Take
330# advantage of any shell optimizations that allow amortized linear growth over
331# repeated appends, instead of the typical quadratic growth present in naive
332# implementations.
333if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
334 eval 'as_fn_append ()
335 {
336 eval $1+=\$2
337 }'
338else
339 as_fn_append ()
340 {
341 eval $1=\$$1\$2
342 }
343fi # as_fn_append
344
345# as_fn_arith ARG...
346# ------------------
347# Perform arithmetic evaluation on the ARGs, and store the result in the
348# global $as_val. Take advantage of shells that can avoid forks. The arguments
349# must be portable across $(()) and expr.
350if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
351 eval 'as_fn_arith ()
352 {
353 as_val=$(( $* ))
354 }'
355else
356 as_fn_arith ()
357 {
358 as_val=`expr "$@" || test $? -eq 1`
359 }
360fi # as_fn_arith
361
362
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000363# as_fn_error STATUS ERROR [LINENO LOG_FD]
364# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000365# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
366# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000367# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000368as_fn_error ()
369{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000370 as_status=$1; test $as_status -eq 0 && as_status=1
371 if test "$4"; then
372 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000374 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000375 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000376 as_fn_exit $as_status
377} # as_fn_error
378
Martin v. Löwiseba40652007-08-30 20:10:57 +0000379if expr a : '\(a\)' >/dev/null 2>&1 &&
380 test "X`expr 00001 : '.*\(...\)'`" = X001; then
381 as_expr=expr
382else
383 as_expr=false
384fi
385
386if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
387 as_basename=basename
388else
389 as_basename=false
390fi
391
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000392if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
393 as_dirname=dirname
394else
395 as_dirname=false
396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000397
Martin v. Löwiseba40652007-08-30 20:10:57 +0000398as_me=`$as_basename -- "$0" ||
399$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
400 X"$0" : 'X\(//\)$' \| \
401 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000402$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000403 sed '/^.*\/\([^/][^/]*\)\/*$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\/\)$/{
408 s//\1/
409 q
410 }
411 /^X\/\(\/\).*/{
412 s//\1/
413 q
414 }
415 s/.*/./; q'`
416
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000417# Avoid depending upon Character Ranges.
418as_cr_letters='abcdefghijklmnopqrstuvwxyz'
419as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
420as_cr_Letters=$as_cr_letters$as_cr_LETTERS
421as_cr_digits='0123456789'
422as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000423
424
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000425 as_lineno_1=$LINENO as_lineno_1a=$LINENO
426 as_lineno_2=$LINENO as_lineno_2a=$LINENO
427 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
428 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
429 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000430 sed -n '
431 p
432 /[$]LINENO/=
433 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000434 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000435 s/[$]LINENO.*/&-/
436 t lineno
437 b
438 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000440 :loop
441 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000443 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000444 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000445 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000446 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000447
448 # Don't try to exec as it changes $[0], causing all sort of problems
449 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000450 # original and so on. Autoconf is especially sensitive to this).
451 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 # Exit status is that of the last command.
453 exit
454}
455
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000457case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000458-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000459 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000460 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000461 xy) ECHO_C='\c';;
462 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
463 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000464 esac;;
465*)
466 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000467esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000468
Martin v. Löwis11437992002-04-12 09:54:03 +0000469rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000470if test -d conf$$.dir; then
471 rm -f conf$$.dir/conf$$.file
472else
473 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000474 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000475fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000476if (echo >conf$$.file) 2>/dev/null; then
477 if ln -s conf$$.file conf$$ 2>/dev/null; then
478 as_ln_s='ln -s'
479 # ... but there are two gotchas:
480 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
481 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
482 # In both cases, we have to default to `cp -p'.
483 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
484 as_ln_s='cp -p'
485 elif ln conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s=ln
487 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000490else
491 as_ln_s='cp -p'
492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000493rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
494rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000495
Skip Montanaro6dead952003-09-25 14:50:04 +0000496if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000497 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000498else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000499 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000500 as_mkdir_p=false
501fi
502
Martin v. Löwiseba40652007-08-30 20:10:57 +0000503if test -x / >/dev/null 2>&1; then
504 as_test_x='test -x'
505else
506 if ls -dL / >/dev/null 2>&1; then
507 as_ls_L_option=L
508 else
509 as_ls_L_option=
510 fi
511 as_test_x='
512 eval sh -c '\''
513 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000514 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000515 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000516 case $1 in #(
517 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000519 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000520 ???[sx]*):;;*)false;;esac;fi
521 '\'' sh
522 '
523fi
524as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000525
526# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000527as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000528
529# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000530as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000531
532
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000533test -n "$DJDIR" || exec 7<&0 </dev/null
534exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000537# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000538# so uname gets run too.
539ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
540
Martin v. Löwis11437992002-04-12 09:54:03 +0000541#
542# Initializations.
543#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000545ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000546ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000547LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000548cross_compiling=no
549subdirs=
550MFLAGS=
551MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
Martin v. Löwis11437992002-04-12 09:54:03 +0000553# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000554PACKAGE_NAME='python'
555PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000556PACKAGE_VERSION='2.7'
557PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000558PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000559PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
561ac_unique_file="Include/object.h"
562# Factoring default headers for most tests.
563ac_includes_default="\
564#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000565#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# include <sys/types.h>
567#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000569# include <sys/stat.h>
570#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000571#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000572# include <stdlib.h>
573# include <stddef.h>
574#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000575# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <stdlib.h>
577# endif
578#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000579#ifdef HAVE_STRING_H
580# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# include <memory.h>
582# endif
583# include <string.h>
584#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000585#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000586# include <strings.h>
587#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000588#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000590#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000591#ifdef HAVE_STDINT_H
592# include <stdint.h>
593#endif
594#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000595# include <unistd.h>
596#endif"
597
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000598ac_subst_vars='LTLIBOBJS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000599SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000600THREADHEADERS
601UNICODE_OBJS
602LIBC
603LIBM
604HAVE_GETHOSTBYNAME
605HAVE_GETHOSTBYNAME_R
606HAVE_GETHOSTBYNAME_R_3_ARG
607HAVE_GETHOSTBYNAME_R_5_ARG
608HAVE_GETHOSTBYNAME_R_6_ARG
609LIBOBJS
610TRUE
611MACHDEP_OBJS
612DYNLOADFILE
613DLINCLDIR
614THREADOBJ
615LDLAST
616USE_THREAD_MODULE
617SIGNAL_OBJS
618USE_SIGNAL_MODULE
619LIBFFI_INCLUDEDIR
620PKG_CONFIG
621SHLIBS
622CFLAGSFORSHARED
623LINKFORSHARED
624CCSHARED
625BLDSHARED
626LDCXXSHARED
627LDSHARED
628SO
629LIBTOOL_CRUFT
630OTHER_LIBTOOL_OPT
631UNIVERSAL_ARCH_FLAGS
632BASECFLAGS
633OPT
634LN
635INSTALL_DATA
636INSTALL_SCRIPT
637INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100638HAS_HG
639HGBRANCH
640HGTAG
641HGVERSION
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000642SVNVERSION
643ARFLAGS
644AR
645RANLIB
646GNULD
647LINKCC
648RUNSHARED
649INSTSONAME
650LDLIBRARYDIR
651BLDLIBRARY
652DLLLIBRARY
653LDLIBRARY
654LIBRARY
655BUILDEXEEXT
656EGREP
657GREP
658CPP
659MAINCC
660CXX
661OBJEXT
662EXEEXT
663ac_ct_CC
664CPPFLAGS
665LDFLAGS
666CFLAGS
667CC
668EXPORT_MACOSX_DEPLOYMENT_TARGET
669CONFIGURE_MACOSX_DEPLOYMENT_TARGET
670EXTRAMACHDEPPATH
671EXTRAPLATDIR
672SGI_ABI
673MACHDEP
674FRAMEWORKINSTALLAPPSPREFIX
675FRAMEWORKUNIXTOOLSPREFIX
676FRAMEWORKALTINSTALLLAST
677FRAMEWORKALTINSTALLFIRST
678FRAMEWORKINSTALLLAST
679FRAMEWORKINSTALLFIRST
680PYTHONFRAMEWORKINSTALLDIR
681PYTHONFRAMEWORKPREFIX
682PYTHONFRAMEWORKDIR
683PYTHONFRAMEWORKIDENTIFIER
684PYTHONFRAMEWORK
685LIPO_32BIT_FLAGS
686ARCH_RUN_32BIT
687UNIVERSALSDK
688CONFIG_ARGS
689SOVERSION
690VERSION
691target_alias
692host_alias
693build_alias
694LIBS
695ECHO_T
696ECHO_N
697ECHO_C
698DEFS
699mandir
700localedir
701libdir
702psdir
703pdfdir
704dvidir
705htmldir
706infodir
707docdir
708oldincludedir
709includedir
710localstatedir
711sharedstatedir
712sysconfdir
713datadir
714datarootdir
715libexecdir
716sbindir
717bindir
718program_transform_name
719prefix
720exec_prefix
721PACKAGE_URL
722PACKAGE_BUGREPORT
723PACKAGE_STRING
724PACKAGE_VERSION
725PACKAGE_TARNAME
726PACKAGE_NAME
727PATH_SEPARATOR
728SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000729ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000730ac_user_opts='
731enable_option_checking
732enable_universalsdk
733with_universal_archs
734with_framework_name
735enable_framework
736with_gcc
737with_cxx_main
738with_suffix
739enable_shared
740enable_profiling
741with_pydebug
742enable_toolbox_glue
743with_libs
744with_system_expat
745with_system_ffi
746with_dbmliborder
747with_signal_module
748with_dec_threads
749with_threads
750with_thread
751with_pth
752enable_ipv6
753with_doc_strings
754with_tsc
755with_pymalloc
756with_valgrind
757with_wctype_functions
758with_fpectl
759with_libm
760with_libc
761enable_big_digits
762enable_unicode
763'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000764 ac_precious_vars='build_alias
765host_alias
766target_alias
767CC
768CFLAGS
769LDFLAGS
770LIBS
771CPPFLAGS
772CPP'
773
Guido van Rossum627b2d71993-12-24 10:39:16 +0000774
Guido van Rossum7f43da71994-08-01 12:15:30 +0000775# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000776ac_init_help=
777ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000778ac_unrecognized_opts=
779ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000780# The variables have the same names as the options, with
781# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000782cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000783exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000785no_recursion=
786prefix=NONE
787program_prefix=NONE
788program_suffix=NONE
789program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000790silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794x_includes=NONE
795x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000796
797# Installation directory options.
798# These are left unexpanded so users can "make install exec_prefix=/foo"
799# and all the variables that are supposed to be based on exec_prefix
800# by default will actually change.
801# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000802# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000803bindir='${exec_prefix}/bin'
804sbindir='${exec_prefix}/sbin'
805libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000806datarootdir='${prefix}/share'
807datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000808sysconfdir='${prefix}/etc'
809sharedstatedir='${prefix}/com'
810localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000811includedir='${prefix}/include'
812oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000813docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
814infodir='${datarootdir}/info'
815htmldir='${docdir}'
816dvidir='${docdir}'
817pdfdir='${docdir}'
818psdir='${docdir}'
819libdir='${exec_prefix}/lib'
820localedir='${datarootdir}/locale'
821mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000822
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000824ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000826do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827 # If the previous option needs an argument, assign it.
828 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000829 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830 ac_prev=
831 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000832 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833
Martin v. Löwiseba40652007-08-30 20:10:57 +0000834 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000835 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
836 *=) ac_optarg= ;;
837 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000838 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840 # Accept the important Cygnus configure options, so we can diagnose typos.
841
Martin v. Löwiseba40652007-08-30 20:10:57 +0000842 case $ac_dashdash$ac_option in
843 --)
844 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846 -bindir | --bindir | --bindi | --bind | --bin | --bi)
847 ac_prev=bindir ;;
848 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000850
851 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000852 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000853 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856 -cache-file | --cache-file | --cache-fil | --cache-fi \
857 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
858 ac_prev=cache_file ;;
859 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
860 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 cache_file=$ac_optarg ;;
862
863 --config-cache | -C)
864 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865
Martin v. Löwiseba40652007-08-30 20:10:57 +0000866 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000868 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870
Martin v. Löwiseba40652007-08-30 20:10:57 +0000871 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
872 | --dataroo | --dataro | --datar)
873 ac_prev=datarootdir ;;
874 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
875 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
876 datarootdir=$ac_optarg ;;
877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000879 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000881 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000882 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000883 ac_useropt_orig=$ac_useropt
884 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
885 case $ac_user_opts in
886 *"
887"enable_$ac_useropt"
888"*) ;;
889 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
890 ac_unrecognized_sep=', ';;
891 esac
892 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000893
894 -docdir | --docdir | --docdi | --doc | --do)
895 ac_prev=docdir ;;
896 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
897 docdir=$ac_optarg ;;
898
899 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
900 ac_prev=dvidir ;;
901 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
902 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
904 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000905 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000907 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000908 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000909 ac_useropt_orig=$ac_useropt
910 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
911 case $ac_user_opts in
912 *"
913"enable_$ac_useropt"
914"*) ;;
915 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
916 ac_unrecognized_sep=', ';;
917 esac
918 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
921 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
922 | --exec | --exe | --ex)
923 ac_prev=exec_prefix ;;
924 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
925 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
926 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
929 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 # Obsolete; use --with-gas.
931 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 -help | --help | --hel | --he | -h)
934 ac_init_help=long ;;
935 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
936 ac_init_help=recursive ;;
937 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
938 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
940 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Martin v. Löwiseba40652007-08-30 20:10:57 +0000945 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
946 ac_prev=htmldir ;;
947 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
948 | --ht=*)
949 htmldir=$ac_optarg ;;
950
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951 -includedir | --includedir | --includedi | --included | --include \
952 | --includ | --inclu | --incl | --inc)
953 ac_prev=includedir ;;
954 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
955 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
958 -infodir | --infodir | --infodi | --infod | --info | --inf)
959 ac_prev=infodir ;;
960 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962
963 -libdir | --libdir | --libdi | --libd)
964 ac_prev=libdir ;;
965 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
968 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
969 | --libexe | --libex | --libe)
970 ac_prev=libexecdir ;;
971 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
972 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974
Martin v. Löwiseba40652007-08-30 20:10:57 +0000975 -localedir | --localedir | --localedi | --localed | --locale)
976 ac_prev=localedir ;;
977 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
978 localedir=$ac_optarg ;;
979
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000980 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000981 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982 ac_prev=localstatedir ;;
983 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000984 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
987 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
988 ac_prev=mandir ;;
989 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Obsolete; use --without-fp.
994 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
996 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998 no_create=yes ;;
999
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001000 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1001 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1002 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1005 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1006 | --oldin | --oldi | --old | --ol | --o)
1007 ac_prev=oldincludedir ;;
1008 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1009 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1010 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1014 ac_prev=prefix ;;
1015 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1019 | --program-pre | --program-pr | --program-p)
1020 ac_prev=program_prefix ;;
1021 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1022 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1026 | --program-suf | --program-su | --program-s)
1027 ac_prev=program_suffix ;;
1028 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1029 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
1032 -program-transform-name | --program-transform-name \
1033 | --program-transform-nam | --program-transform-na \
1034 | --program-transform-n | --program-transform- \
1035 | --program-transform | --program-transfor \
1036 | --program-transfo | --program-transf \
1037 | --program-trans | --program-tran \
1038 | --progr-tra | --program-tr | --program-t)
1039 ac_prev=program_transform_name ;;
1040 -program-transform-name=* | --program-transform-name=* \
1041 | --program-transform-nam=* | --program-transform-na=* \
1042 | --program-transform-n=* | --program-transform-=* \
1043 | --program-transform=* | --program-transfor=* \
1044 | --program-transfo=* | --program-transf=* \
1045 | --program-trans=* | --program-tran=* \
1046 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
Martin v. Löwiseba40652007-08-30 20:10:57 +00001049 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1050 ac_prev=pdfdir ;;
1051 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1052 pdfdir=$ac_optarg ;;
1053
1054 -psdir | --psdir | --psdi | --psd | --ps)
1055 ac_prev=psdir ;;
1056 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1057 psdir=$ac_optarg ;;
1058
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1060 | -silent | --silent | --silen | --sile | --sil)
1061 silent=yes ;;
1062
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1064 ac_prev=sbindir ;;
1065 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1066 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
1069 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1070 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1071 | --sharedst | --shareds | --shared | --share | --shar \
1072 | --sha | --sh)
1073 ac_prev=sharedstatedir ;;
1074 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1075 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1076 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1077 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 -site | --site | --sit)
1081 ac_prev=site ;;
1082 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1086 ac_prev=srcdir ;;
1087 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1091 | --syscon | --sysco | --sysc | --sys | --sy)
1092 ac_prev=sysconfdir ;;
1093 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1094 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1103 verbose=yes ;;
1104
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 -version | --version | --versio | --versi | --vers | -V)
1106 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001109 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001110 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001111 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001112 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001113 ac_useropt_orig=$ac_useropt
1114 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1115 case $ac_user_opts in
1116 *"
1117"with_$ac_useropt"
1118"*) ;;
1119 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1120 ac_unrecognized_sep=', ';;
1121 esac
1122 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123
1124 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001125 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001126 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001127 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001128 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001129 ac_useropt_orig=$ac_useropt
1130 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1131 case $ac_user_opts in
1132 *"
1133"with_$ac_useropt"
1134"*) ;;
1135 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1136 ac_unrecognized_sep=', ';;
1137 esac
1138 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140 --x)
1141 # Obsolete; use --with-x.
1142 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
1144 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1145 | --x-incl | --x-inc | --x-in | --x-i)
1146 ac_prev=x_includes ;;
1147 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1148 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
1151 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1152 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1153 ac_prev=x_libraries ;;
1154 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1155 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001158 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1159Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160 ;;
1161
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 *=*)
1163 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1164 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001165 case $ac_envvar in #(
1166 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001167 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001168 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001169 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 export $ac_envvar ;;
1171
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001172 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001174 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001176 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Charles-François Natali97781b02011-07-22 23:43:42 +02001177 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178 ;;
1179
1180 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181done
1182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001185 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186fi
1187
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001188if test -n "$ac_unrecognized_opts"; then
1189 case $enable_option_checking in
1190 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001191 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001192 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1193 esac
1194fi
1195
1196# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001197for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1198 datadir sysconfdir sharedstatedir localstatedir includedir \
1199 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1200 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001202 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001203 # Remove trailing slashes.
1204 case $ac_val in
1205 */ )
1206 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1207 eval $ac_var=\$ac_val;;
1208 esac
1209 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001211 [\\/$]* | ?:[\\/]* ) continue;;
1212 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001214 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001215done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001216
Martin v. Löwis11437992002-04-12 09:54:03 +00001217# There might be people who depend on the old broken behavior: `$host'
1218# used to hold the argument of --host etc.
1219# FIXME: To remove some day.
1220build=$build_alias
1221host=$host_alias
1222target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001223
Martin v. Löwis11437992002-04-12 09:54:03 +00001224# FIXME: To remove some day.
1225if test "x$host_alias" != x; then
1226 if test "x$build_alias" = x; then
1227 cross_compiling=maybe
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001228 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1229 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 elif test "x$build_alias" != "x$host_alias"; then
1231 cross_compiling=yes
1232 fi
1233fi
1234
1235ac_tool_prefix=
1236test -n "$host_alias" && ac_tool_prefix=$host_alias-
1237
1238test "$silent" = yes && exec 6>/dev/null
1239
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240
Martin v. Löwiseba40652007-08-30 20:10:57 +00001241ac_pwd=`pwd` && test -n "$ac_pwd" &&
1242ac_ls_di=`ls -di .` &&
1243ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001244 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001245test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001246 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001247
1248
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249# Find the source files, if location was not specified.
1250if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001252 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001253 ac_confdir=`$as_dirname -- "$as_myself" ||
1254$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1255 X"$as_myself" : 'X\(//\)[^/]' \| \
1256 X"$as_myself" : 'X\(//\)$' \| \
1257 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1258$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001259 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1260 s//\1/
1261 q
1262 }
1263 /^X\(\/\/\)[^/].*/{
1264 s//\1/
1265 q
1266 }
1267 /^X\(\/\/\)$/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\).*/{
1272 s//\1/
1273 q
1274 }
1275 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001277 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278 srcdir=..
1279 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001280else
1281 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001283if test ! -r "$srcdir/$ac_unique_file"; then
1284 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001285 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001287ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1288ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001289 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001290 pwd)`
1291# When building in place, set srcdir=.
1292if test "$ac_abs_confdir" = "$ac_pwd"; then
1293 srcdir=.
1294fi
1295# Remove unnecessary trailing slashes from srcdir.
1296# Double slashes in file names in object file debugging info
1297# mess up M-x gdb in Emacs.
1298case $srcdir in
1299*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1300esac
1301for ac_var in $ac_precious_vars; do
1302 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1303 eval ac_env_${ac_var}_value=\$${ac_var}
1304 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1305 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1306done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308#
1309# Report the --help message.
1310#
1311if test "$ac_init_help" = "long"; then
1312 # Omit some internal or obsolete options to make the list less imposing.
1313 # This message is too long to be a string in the A/UX 3.1 sh.
1314 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001315\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001316
1317Usage: $0 [OPTION]... [VAR=VALUE]...
1318
1319To assign environment variables (e.g., CC, CFLAGS...), specify them as
1320VAR=VALUE. See below for descriptions of some of the useful variables.
1321
1322Defaults for the options are specified in brackets.
1323
1324Configuration:
1325 -h, --help display this help and exit
1326 --help=short display options specific to this package
1327 --help=recursive display the short help of all the included packages
1328 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001329 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001330 --cache-file=FILE cache test results in FILE [disabled]
1331 -C, --config-cache alias for \`--cache-file=config.cache'
1332 -n, --no-create do not create output files
1333 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1334
Martin v. Löwis11437992002-04-12 09:54:03 +00001335Installation directories:
1336 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001337 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001338 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001339 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001340
1341By default, \`make install' will install all the files in
1342\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1343an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1344for instance \`--prefix=\$HOME'.
1345
1346For better control, use the options below.
1347
1348Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001349 --bindir=DIR user executables [EPREFIX/bin]
1350 --sbindir=DIR system admin executables [EPREFIX/sbin]
1351 --libexecdir=DIR program executables [EPREFIX/libexec]
1352 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1353 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1354 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1355 --libdir=DIR object code libraries [EPREFIX/lib]
1356 --includedir=DIR C header files [PREFIX/include]
1357 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1358 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1359 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1360 --infodir=DIR info documentation [DATAROOTDIR/info]
1361 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1362 --mandir=DIR man documentation [DATAROOTDIR/man]
1363 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1364 --htmldir=DIR html documentation [DOCDIR]
1365 --dvidir=DIR dvi documentation [DOCDIR]
1366 --pdfdir=DIR pdf documentation [DOCDIR]
1367 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001368_ACEOF
1369
1370 cat <<\_ACEOF
1371_ACEOF
1372fi
1373
1374if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001375 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001376 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001377 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 cat <<\_ACEOF
1379
1380Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001381 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1383 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001384 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001385 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001386 --enable-framework[=INSTALLDIR]
1387 Build (MacOSX|Darwin) framework
1388 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001389 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001390 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1391 --enable-ipv6 Enable ipv6 (with ipv4) support
1392 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001393 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001394 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001396 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001397
1398Optional Packages:
1399 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1400 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001401 --with-universal-archs=ARCH
1402 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001403 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001404 --with-framework-name=FRAMEWORK
1405 specify an alternate name of the framework built
1406 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001407 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001408 --with-cxx-main=<compiler>
1409 compile main() and link python executable with C++
1410 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001411 --with-suffix=.exe set executable suffix
1412 --with-pydebug build with Py_DEBUG defined
1413 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001414 --with-system-expat build pyexpat module using an installed expat
1415 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001416 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001417 --with-dbmliborder=db1:db2:...
1418 order to check db backends for dbm. Valid value is a
1419 colon separated string with the backend names
1420 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with-signal-module disable/enable signal module
1422 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1423 --with(out)-threads[=DIRECTORY]
1424 disable/enable thread support
1425 --with(out)-thread[=DIRECTORY]
1426 deprecated; use --with(out)-threads
1427 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001429 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001431 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001432 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001433 --with-fpectl enable SIGFPE catching
1434 --with-libm=STRING math library
1435 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001436
1437Some influential environment variables:
1438 CC C compiler command
1439 CFLAGS C compiler flags
1440 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1441 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001442 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001443 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001444 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 CPP C preprocessor
1446
1447Use these variables to override the choices made by `configure' or to help
1448it to find libraries and programs with nonstandard names/locations.
1449
Georg Brandl464432d2009-05-20 18:24:08 +00001450Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001452ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001453fi
1454
1455if test "$ac_init_help" = "recursive"; then
1456 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001458 test -d "$ac_dir" ||
1459 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1460 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 ac_builddir=.
1462
Martin v. Löwiseba40652007-08-30 20:10:57 +00001463case "$ac_dir" in
1464.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1465*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001466 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001467 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001468 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001469 case $ac_top_builddir_sub in
1470 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1471 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1472 esac ;;
1473esac
1474ac_abs_top_builddir=$ac_pwd
1475ac_abs_builddir=$ac_pwd$ac_dir_suffix
1476# for backward compatibility:
1477ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001478
1479case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001480 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001481 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001482 ac_top_srcdir=$ac_top_builddir_sub
1483 ac_abs_top_srcdir=$ac_pwd ;;
1484 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001485 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001486 ac_top_srcdir=$srcdir
1487 ac_abs_top_srcdir=$srcdir ;;
1488 *) # Relative name.
1489 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1490 ac_top_srcdir=$ac_top_build_prefix$srcdir
1491 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001492esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001493ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001494
Martin v. Löwiseba40652007-08-30 20:10:57 +00001495 cd "$ac_dir" || { ac_status=$?; continue; }
1496 # Check for guested configure.
1497 if test -f "$ac_srcdir/configure.gnu"; then
1498 echo &&
1499 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1500 elif test -f "$ac_srcdir/configure"; then
1501 echo &&
1502 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001503 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001504 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001505 fi || ac_status=$?
1506 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001507 done
1508fi
1509
Martin v. Löwiseba40652007-08-30 20:10:57 +00001510test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001511if $ac_init_version; then
1512 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001513python configure 2.7
Charles-François Natali97781b02011-07-22 23:43:42 +02001514generated by GNU Autoconf 2.67
Martin v. Löwis11437992002-04-12 09:54:03 +00001515
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001516Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001517This configure script is free software; the Free Software Foundation
1518gives unlimited permission to copy, distribute and modify it.
1519_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001520 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001521fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001522
1523## ------------------------ ##
1524## Autoconf initialization. ##
1525## ------------------------ ##
1526
1527# ac_fn_c_try_compile LINENO
1528# --------------------------
1529# Try to compile conftest.$ac_ext, and return whether this succeeded.
1530ac_fn_c_try_compile ()
1531{
1532 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1533 rm -f conftest.$ac_objext
1534 if { { ac_try="$ac_compile"
1535case "(($ac_try" in
1536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1537 *) ac_try_echo=$ac_try;;
1538esac
1539eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1540$as_echo "$ac_try_echo"; } >&5
1541 (eval "$ac_compile") 2>conftest.err
1542 ac_status=$?
1543 if test -s conftest.err; then
1544 grep -v '^ *+' conftest.err >conftest.er1
1545 cat conftest.er1 >&5
1546 mv -f conftest.er1 conftest.err
1547 fi
1548 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1549 test $ac_status = 0; } && {
1550 test -z "$ac_c_werror_flag" ||
1551 test ! -s conftest.err
1552 } && test -s conftest.$ac_objext; then :
1553 ac_retval=0
1554else
1555 $as_echo "$as_me: failed program was:" >&5
1556sed 's/^/| /' conftest.$ac_ext >&5
1557
1558 ac_retval=1
1559fi
Charles-François Natali97781b02011-07-22 23:43:42 +02001560 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001561 as_fn_set_status $ac_retval
1562
1563} # ac_fn_c_try_compile
1564
1565# ac_fn_c_try_cpp LINENO
1566# ----------------------
1567# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1568ac_fn_c_try_cpp ()
1569{
1570 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1571 if { { ac_try="$ac_cpp conftest.$ac_ext"
1572case "(($ac_try" in
1573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1574 *) ac_try_echo=$ac_try;;
1575esac
1576eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1577$as_echo "$ac_try_echo"; } >&5
1578 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1579 ac_status=$?
1580 if test -s conftest.err; then
1581 grep -v '^ *+' conftest.err >conftest.er1
1582 cat conftest.er1 >&5
1583 mv -f conftest.er1 conftest.err
1584 fi
1585 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001586 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001587 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1588 test ! -s conftest.err
1589 }; then :
1590 ac_retval=0
1591else
1592 $as_echo "$as_me: failed program was:" >&5
1593sed 's/^/| /' conftest.$ac_ext >&5
1594
1595 ac_retval=1
1596fi
Charles-François Natali97781b02011-07-22 23:43:42 +02001597 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001598 as_fn_set_status $ac_retval
1599
1600} # ac_fn_c_try_cpp
1601
1602# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1603# -------------------------------------------------------
1604# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1605# the include files in INCLUDES and setting the cache variable VAR
1606# accordingly.
1607ac_fn_c_check_header_mongrel ()
1608{
1609 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Charles-François Natali97781b02011-07-22 23:43:42 +02001610 if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1612$as_echo_n "checking for $2... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001613if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001614 $as_echo_n "(cached) " >&6
1615fi
1616eval ac_res=\$$3
1617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1618$as_echo "$ac_res" >&6; }
1619else
1620 # Is the header compilable?
1621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1622$as_echo_n "checking $2 usability... " >&6; }
1623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1624/* end confdefs.h. */
1625$4
1626#include <$2>
1627_ACEOF
1628if ac_fn_c_try_compile "$LINENO"; then :
1629 ac_header_compiler=yes
1630else
1631 ac_header_compiler=no
1632fi
1633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1635$as_echo "$ac_header_compiler" >&6; }
1636
1637# Is the header present?
1638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1639$as_echo_n "checking $2 presence... " >&6; }
1640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1641/* end confdefs.h. */
1642#include <$2>
1643_ACEOF
1644if ac_fn_c_try_cpp "$LINENO"; then :
1645 ac_header_preproc=yes
1646else
1647 ac_header_preproc=no
1648fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001649rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1651$as_echo "$ac_header_preproc" >&6; }
1652
1653# So? What about this header?
1654case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1655 yes:no: )
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1657$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1659$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1660 ;;
1661 no:yes:* )
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1663$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1665$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1667$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1669$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1671$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001672( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001673## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001674## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001675 ) | sed "s/^/$as_me: WARNING: /" >&2
1676 ;;
1677esac
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1679$as_echo_n "checking for $2... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001680if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001681 $as_echo_n "(cached) " >&6
1682else
1683 eval "$3=\$ac_header_compiler"
1684fi
1685eval ac_res=\$$3
1686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1687$as_echo "$ac_res" >&6; }
1688fi
Charles-François Natali97781b02011-07-22 23:43:42 +02001689 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001690
1691} # ac_fn_c_check_header_mongrel
1692
1693# ac_fn_c_try_run LINENO
1694# ----------------------
1695# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1696# that executables *can* be run.
1697ac_fn_c_try_run ()
1698{
1699 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1700 if { { ac_try="$ac_link"
1701case "(($ac_try" in
1702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1703 *) ac_try_echo=$ac_try;;
1704esac
1705eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1706$as_echo "$ac_try_echo"; } >&5
1707 (eval "$ac_link") 2>&5
1708 ac_status=$?
1709 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1710 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1711 { { case "(($ac_try" in
1712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1713 *) ac_try_echo=$ac_try;;
1714esac
1715eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1716$as_echo "$ac_try_echo"; } >&5
1717 (eval "$ac_try") 2>&5
1718 ac_status=$?
1719 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720 test $ac_status = 0; }; }; then :
1721 ac_retval=0
1722else
1723 $as_echo "$as_me: program exited with status $ac_status" >&5
1724 $as_echo "$as_me: failed program was:" >&5
1725sed 's/^/| /' conftest.$ac_ext >&5
1726
1727 ac_retval=$ac_status
1728fi
1729 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Charles-François Natali97781b02011-07-22 23:43:42 +02001730 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001731 as_fn_set_status $ac_retval
1732
1733} # ac_fn_c_try_run
1734
1735# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1736# -------------------------------------------------------
1737# Tests whether HEADER exists and can be compiled using the include files in
1738# INCLUDES, setting the cache variable VAR accordingly.
1739ac_fn_c_check_header_compile ()
1740{
1741 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1743$as_echo_n "checking for $2... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001744if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001745 $as_echo_n "(cached) " >&6
1746else
1747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1748/* end confdefs.h. */
1749$4
1750#include <$2>
1751_ACEOF
1752if ac_fn_c_try_compile "$LINENO"; then :
1753 eval "$3=yes"
1754else
1755 eval "$3=no"
1756fi
1757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1758fi
1759eval ac_res=\$$3
1760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1761$as_echo "$ac_res" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001762 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001763
1764} # ac_fn_c_check_header_compile
1765
1766# ac_fn_c_try_link LINENO
1767# -----------------------
1768# Try to link conftest.$ac_ext, and return whether this succeeded.
1769ac_fn_c_try_link ()
1770{
1771 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1772 rm -f conftest.$ac_objext conftest$ac_exeext
1773 if { { ac_try="$ac_link"
1774case "(($ac_try" in
1775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1776 *) ac_try_echo=$ac_try;;
1777esac
1778eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1779$as_echo "$ac_try_echo"; } >&5
1780 (eval "$ac_link") 2>conftest.err
1781 ac_status=$?
1782 if test -s conftest.err; then
1783 grep -v '^ *+' conftest.err >conftest.er1
1784 cat conftest.er1 >&5
1785 mv -f conftest.er1 conftest.err
1786 fi
1787 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1788 test $ac_status = 0; } && {
1789 test -z "$ac_c_werror_flag" ||
1790 test ! -s conftest.err
1791 } && test -s conftest$ac_exeext && {
1792 test "$cross_compiling" = yes ||
1793 $as_test_x conftest$ac_exeext
1794 }; then :
1795 ac_retval=0
1796else
1797 $as_echo "$as_me: failed program was:" >&5
1798sed 's/^/| /' conftest.$ac_ext >&5
1799
1800 ac_retval=1
1801fi
1802 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1803 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1804 # interfere with the next link command; also delete a directory that is
1805 # left behind by Apple's compiler. We do this before executing the actions.
1806 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Charles-François Natali97781b02011-07-22 23:43:42 +02001807 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001808 as_fn_set_status $ac_retval
1809
1810} # ac_fn_c_try_link
1811
1812# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1813# -------------------------------------------
1814# Tests whether TYPE exists after having included INCLUDES, setting cache
1815# variable VAR accordingly.
1816ac_fn_c_check_type ()
1817{
1818 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1820$as_echo_n "checking for $2... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001821if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001822 $as_echo_n "(cached) " >&6
1823else
1824 eval "$3=no"
1825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1826/* end confdefs.h. */
1827$4
1828int
1829main ()
1830{
1831if (sizeof ($2))
1832 return 0;
1833 ;
1834 return 0;
1835}
1836_ACEOF
1837if ac_fn_c_try_compile "$LINENO"; then :
1838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1839/* end confdefs.h. */
1840$4
1841int
1842main ()
1843{
1844if (sizeof (($2)))
1845 return 0;
1846 ;
1847 return 0;
1848}
1849_ACEOF
1850if ac_fn_c_try_compile "$LINENO"; then :
1851
1852else
1853 eval "$3=yes"
1854fi
1855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1856fi
1857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1858fi
1859eval ac_res=\$$3
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1861$as_echo "$ac_res" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001862 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001863
1864} # ac_fn_c_check_type
1865
1866# ac_fn_c_find_uintX_t LINENO BITS VAR
1867# ------------------------------------
1868# Finds an unsigned integer type with width BITS, setting cache variable VAR
1869# accordingly.
1870ac_fn_c_find_uintX_t ()
1871{
1872 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1874$as_echo_n "checking for uint$2_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001875if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001876 $as_echo_n "(cached) " >&6
1877else
1878 eval "$3=no"
1879 # Order is important - never check a type that is potentially smaller
1880 # than half of the expected target width.
1881 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1882 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1884/* end confdefs.h. */
1885$ac_includes_default
1886int
1887main ()
1888{
1889static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1890test_array [0] = 0
1891
1892 ;
1893 return 0;
1894}
1895_ACEOF
1896if ac_fn_c_try_compile "$LINENO"; then :
1897 case $ac_type in #(
1898 uint$2_t) :
1899 eval "$3=yes" ;; #(
1900 *) :
1901 eval "$3=\$ac_type" ;;
1902esac
1903fi
1904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001905 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001906
1907else
1908 break
1909fi
1910 done
1911fi
1912eval ac_res=\$$3
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1914$as_echo "$ac_res" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001915 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001916
1917} # ac_fn_c_find_uintX_t
1918
1919# ac_fn_c_find_intX_t LINENO BITS VAR
1920# -----------------------------------
1921# Finds a signed integer type with width BITS, setting cache variable VAR
1922# accordingly.
1923ac_fn_c_find_intX_t ()
1924{
1925 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1927$as_echo_n "checking for int$2_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001928if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001929 $as_echo_n "(cached) " >&6
1930else
1931 eval "$3=no"
1932 # Order is important - never check a type that is potentially smaller
1933 # than half of the expected target width.
1934 for ac_type in int$2_t 'int' 'long int' \
1935 'long long int' 'short int' 'signed char'; do
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001939 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001940int
1941main ()
1942{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001943static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001944test_array [0] = 0
1945
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001954 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001955int
1956main ()
1957{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001958static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001959 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1960test_array [0] = 0
1961
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967
1968else
1969 case $ac_type in #(
1970 int$2_t) :
1971 eval "$3=yes" ;; #(
1972 *) :
1973 eval "$3=\$ac_type" ;;
1974esac
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001979 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001980
1981else
1982 break
1983fi
1984 done
1985fi
1986eval ac_res=\$$3
1987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1988$as_echo "$ac_res" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001989 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001990
1991} # ac_fn_c_find_intX_t
1992
1993# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1994# --------------------------------------------
1995# Tries to find the compile-time value of EXPR in a program that includes
1996# INCLUDES, setting VAR accordingly. Returns whether the value could be
1997# computed
1998ac_fn_c_compute_int ()
1999{
2000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001 if test "$cross_compiling" = yes; then
2002 # Depending upon the size, compute the lo and hi bounds.
2003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004/* end confdefs.h. */
2005$4
2006int
2007main ()
2008{
2009static int test_array [1 - 2 * !(($2) >= 0)];
2010test_array [0] = 0
2011
2012 ;
2013 return 0;
2014}
2015_ACEOF
2016if ac_fn_c_try_compile "$LINENO"; then :
2017 ac_lo=0 ac_mid=0
2018 while :; do
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020/* end confdefs.h. */
2021$4
2022int
2023main ()
2024{
2025static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2026test_array [0] = 0
2027
2028 ;
2029 return 0;
2030}
2031_ACEOF
2032if ac_fn_c_try_compile "$LINENO"; then :
2033 ac_hi=$ac_mid; break
2034else
2035 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2036 if test $ac_lo -le $ac_mid; then
2037 ac_lo= ac_hi=
2038 break
2039 fi
2040 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2041fi
2042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2043 done
2044else
2045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2046/* end confdefs.h. */
2047$4
2048int
2049main ()
2050{
2051static int test_array [1 - 2 * !(($2) < 0)];
2052test_array [0] = 0
2053
2054 ;
2055 return 0;
2056}
2057_ACEOF
2058if ac_fn_c_try_compile "$LINENO"; then :
2059 ac_hi=-1 ac_mid=-1
2060 while :; do
2061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2062/* end confdefs.h. */
2063$4
2064int
2065main ()
2066{
2067static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2068test_array [0] = 0
2069
2070 ;
2071 return 0;
2072}
2073_ACEOF
2074if ac_fn_c_try_compile "$LINENO"; then :
2075 ac_lo=$ac_mid; break
2076else
2077 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2078 if test $ac_mid -le $ac_hi; then
2079 ac_lo= ac_hi=
2080 break
2081 fi
2082 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085 done
2086else
2087 ac_lo= ac_hi=
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092# Binary search between lo and hi bounds.
2093while test "x$ac_lo" != "x$ac_hi"; do
2094 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096/* end confdefs.h. */
2097$4
2098int
2099main ()
2100{
2101static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2102test_array [0] = 0
2103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid
2110else
2111 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114done
2115case $ac_lo in #((
2116?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2117'') ac_retval=1 ;;
2118esac
2119 else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123static long int longval () { return $2; }
2124static unsigned long int ulongval () { return $2; }
2125#include <stdio.h>
2126#include <stdlib.h>
2127int
2128main ()
2129{
2130
2131 FILE *f = fopen ("conftest.val", "w");
2132 if (! f)
2133 return 1;
2134 if (($2) < 0)
2135 {
2136 long int i = longval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%ld", i);
2140 }
2141 else
2142 {
2143 unsigned long int i = ulongval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%lu", i);
2147 }
2148 /* Do not output a trailing newline, as this causes \r\n confusion
2149 on some platforms. */
2150 return ferror (f) || fclose (f) != 0;
2151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_run "$LINENO"; then :
2157 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2158else
2159 ac_retval=1
2160fi
2161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2162 conftest.$ac_objext conftest.beam conftest.$ac_ext
2163rm -f conftest.val
2164
2165 fi
Charles-François Natali97781b02011-07-22 23:43:42 +02002166 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002167 as_fn_set_status $ac_retval
2168
2169} # ac_fn_c_compute_int
2170
2171# ac_fn_c_check_func LINENO FUNC VAR
2172# ----------------------------------
2173# Tests whether FUNC exists, setting the cache variable VAR accordingly
2174ac_fn_c_check_func ()
2175{
2176 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178$as_echo_n "checking for $2... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02002179if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002180 $as_echo_n "(cached) " >&6
2181else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2186#define $2 innocuous_$2
2187
2188/* System header to define __stub macros and hopefully few prototypes,
2189 which can conflict with char $2 (); below.
2190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2191 <limits.h> exists even on freestanding compilers. */
2192
2193#ifdef __STDC__
2194# include <limits.h>
2195#else
2196# include <assert.h>
2197#endif
2198
2199#undef $2
2200
2201/* Override any GCC internal prototype to avoid an error.
2202 Use char because int might match the return type of a GCC
2203 builtin and then its argument prototype would still apply. */
2204#ifdef __cplusplus
2205extern "C"
2206#endif
2207char $2 ();
2208/* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211#if defined __stub_$2 || defined __stub___$2
2212choke me
2213#endif
2214
2215int
2216main ()
2217{
2218return $2 ();
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_link "$LINENO"; then :
2224 eval "$3=yes"
2225else
2226 eval "$3=no"
2227fi
2228rm -f core conftest.err conftest.$ac_objext \
2229 conftest$ac_exeext conftest.$ac_ext
2230fi
2231eval ac_res=\$$3
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2233$as_echo "$ac_res" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02002234 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002235
2236} # ac_fn_c_check_func
2237
2238# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2239# ----------------------------------------------------
2240# Tries to find if the field MEMBER exists in type AGGR, after including
2241# INCLUDES, setting cache variable VAR accordingly.
2242ac_fn_c_check_member ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2246$as_echo_n "checking for $2.$3... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02002247if eval "test \"\${$4+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002248 $as_echo_n "(cached) " >&6
2249else
2250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h. */
2252$5
2253int
2254main ()
2255{
2256static $2 ac_aggr;
2257if (ac_aggr.$3)
2258return 0;
2259 ;
2260 return 0;
2261}
2262_ACEOF
2263if ac_fn_c_try_compile "$LINENO"; then :
2264 eval "$4=yes"
2265else
2266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2267/* end confdefs.h. */
2268$5
2269int
2270main ()
2271{
2272static $2 ac_aggr;
2273if (sizeof ac_aggr.$3)
2274return 0;
2275 ;
2276 return 0;
2277}
2278_ACEOF
2279if ac_fn_c_try_compile "$LINENO"; then :
2280 eval "$4=yes"
2281else
2282 eval "$4=no"
2283fi
2284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2285fi
2286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2287fi
2288eval ac_res=\$$4
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2290$as_echo "$ac_res" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02002291 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002292
2293} # ac_fn_c_check_member
2294
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002295# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2296# ---------------------------------------------
2297# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2298# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002299ac_fn_c_check_decl ()
2300{
2301 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002302 as_decl_name=`echo $2|sed 's/ *(.*//'`
2303 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2305$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02002306if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002307 $as_echo_n "(cached) " >&6
2308else
2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310/* end confdefs.h. */
2311$4
2312int
2313main ()
2314{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002315#ifndef $as_decl_name
2316#ifdef __cplusplus
2317 (void) $as_decl_use;
2318#else
2319 (void) $as_decl_name;
2320#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002321#endif
2322
2323 ;
2324 return 0;
2325}
2326_ACEOF
2327if ac_fn_c_try_compile "$LINENO"; then :
2328 eval "$3=yes"
2329else
2330 eval "$3=no"
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333fi
2334eval ac_res=\$$3
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02002337 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002338
2339} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002340cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002341This file contains any messages produced by compilers while
2342running configure, to aid debugging if configure makes a mistake.
2343
Martin v. Löwis174440b2008-10-03 08:59:41 +00002344It was created by python $as_me 2.7, which was
Charles-François Natali97781b02011-07-22 23:43:42 +02002345generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
2347 $ $0 $@
2348
2349_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002350exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002351{
2352cat <<_ASUNAME
2353## --------- ##
2354## Platform. ##
2355## --------- ##
2356
2357hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2358uname -m = `(uname -m) 2>/dev/null || echo unknown`
2359uname -r = `(uname -r) 2>/dev/null || echo unknown`
2360uname -s = `(uname -s) 2>/dev/null || echo unknown`
2361uname -v = `(uname -v) 2>/dev/null || echo unknown`
2362
2363/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2364/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2365
2366/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2367/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2368/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002369/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002370/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2371/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2372/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2373
2374_ASUNAME
2375
2376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2377for as_dir in $PATH
2378do
2379 IFS=$as_save_IFS
2380 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002381 $as_echo "PATH: $as_dir"
2382 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002383IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002384
2385} >&5
2386
2387cat >&5 <<_ACEOF
2388
2389
2390## ----------- ##
2391## Core tests. ##
2392## ----------- ##
2393
2394_ACEOF
2395
2396
2397# Keep a trace of the command line.
2398# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002401# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002402ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_configure_args0=
2404ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002405ac_must_keep_next=false
2406for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002407do
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 for ac_arg
2409 do
2410 case $ac_arg in
2411 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2412 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2413 | -silent | --silent | --silen | --sile | --sil)
2414 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002415 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002416 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 esac
2418 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002419 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002421 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002425 case $ac_arg in
2426 *=* | --config-cache | -C | -disable-* | --disable-* \
2427 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2428 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2429 | -with-* | --with-* | -without-* | --without-* | --x)
2430 case "$ac_configure_args0 " in
2431 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2432 esac
2433 ;;
2434 -* ) ac_must_keep_next=true ;;
2435 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002437 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002438 ;;
2439 esac
2440 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002441done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002442{ ac_configure_args0=; unset ac_configure_args0;}
2443{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445# When interrupted or exit'd, cleanup temporary files, and complete
2446# config.log. We remove comments because anyway the quotes in there
2447# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002448# WARNING: Use '\'' to represent an apostrophe within the trap.
2449# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002450trap 'exit_status=$?
2451 # Save into config.log some information that might help in debugging.
2452 {
2453 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002454
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002455 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002456## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002457## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 echo
2459 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002460(
2461 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2462 eval ac_val=\$$ac_var
2463 case $ac_val in #(
2464 *${as_nl}*)
2465 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002466 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2467$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468 esac
2469 case $ac_var in #(
2470 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002471 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2472 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002473 esac ;;
2474 esac
2475 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002477 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2478 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002480 "s/'\''/'\''\\\\'\'''\''/g;
2481 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2482 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002483 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002484 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002485 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002486 esac |
2487 sort
2488)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002490
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002491 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002492## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002493## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 echo
2495 for ac_var in $ac_subst_vars
2496 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002497 eval ac_val=\$$ac_var
2498 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002499 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002500 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002501 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 done | sort
2503 echo
2504
2505 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002506 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002507## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002508## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 echo
2510 for ac_var in $ac_subst_files
2511 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002512 eval ac_val=\$$ac_var
2513 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002515 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002516 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 done | sort
2518 echo
2519 fi
2520
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002522 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002523## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002524## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002526 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 echo
2528 fi
2529 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002530 $as_echo "$as_me: caught signal $ac_signal"
2531 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002533 rm -f core *.core core.conftest.* &&
2534 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002536' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002537for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002538 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002539done
2540ac_signal=0
2541
2542# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002544
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002545$as_echo "/* confdefs.h */" > confdefs.h
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547# Predefined preprocessor variables.
2548
2549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_NAME "$PACKAGE_NAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_VERSION "$PACKAGE_VERSION"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_STRING "$PACKAGE_STRING"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2567_ACEOF
2568
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_URL "$PACKAGE_URL"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573
2574# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002575# Prefer an explicitly selected file to automatically selected ones.
2576ac_site_file1=NONE
2577ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002578if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002579 # We do not want a PATH search for config.site.
2580 case $CONFIG_SITE in #((
2581 -*) ac_site_file1=./$CONFIG_SITE;;
2582 */*) ac_site_file1=$CONFIG_SITE;;
2583 *) ac_site_file1=./$CONFIG_SITE;;
2584 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002585elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002586 ac_site_file1=$prefix/share/config.site
2587 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002588else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002589 ac_site_file1=$ac_default_prefix/share/config.site
2590 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002592for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002593do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002594 test "x$ac_site_file" = xNONE && continue
2595 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2597$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002599 . "$ac_site_file" \
2600 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2602as_fn_error $? "failed to load site script $ac_site_file
Charles-François Natali97781b02011-07-22 23:43:42 +02002603See \`config.log' for more details" "$LINENO" 5 ; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604 fi
2605done
2606
2607if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002608 # Some versions of bash will fail to source /dev/null (special files
2609 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2610 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2612$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002614 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2615 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 esac
2617 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002619 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2620$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 >$cache_file
2622fi
2623
2624# Check that the precious variables saved in the cache have kept the same
2625# value.
2626ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002627for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2629 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002630 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2631 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 case $ac_old_set,$ac_new_set in
2633 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2635$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 ac_cache_corrupted=: ;;
2637 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002638 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2639$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 ac_cache_corrupted=: ;;
2641 ,);;
2642 *)
2643 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002644 # differences in whitespace do not lead to failure.
2645 ac_old_val_w=`echo x $ac_old_val`
2646 ac_new_val_w=`echo x $ac_new_val`
2647 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2649$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2650 ac_cache_corrupted=:
2651 else
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2653$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2654 eval $ac_var=\$ac_old_val
2655 fi
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2657$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2659$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 fi;;
2661 esac
2662 # Pass precious variables to config.status.
2663 if test "$ac_new_set" = set; then
2664 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002665 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 *) ac_arg=$ac_var=$ac_new_val ;;
2667 esac
2668 case " $ac_configure_args " in
2669 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002670 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 esac
2672 fi
2673done
2674if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2678$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002679 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002681## -------------------- ##
2682## Main body of script. ##
2683## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002684
Guido van Rossum7f43da71994-08-01 12:15:30 +00002685ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690
Guido van Rossum627b2d71993-12-24 10:39:16 +00002691
Michael W. Hudson54241132001-12-07 15:38:26 +00002692
Martin v. Löwiseba40652007-08-30 20:10:57 +00002693ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002694
2695
Martin v. Löwis11437992002-04-12 09:54:03 +00002696
Georg Brandlbcd64a32009-03-31 21:45:18 +00002697if test "$prefix" != "/"; then
2698 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2699fi
2700
2701
Martin v. Löwis11437992002-04-12 09:54:03 +00002702
2703
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002704# We don't use PACKAGE_ variables, and they cause conflicts
2705# with other autoconf-based packages that include Python.h
2706grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2707rm confdefs.h
2708mv confdefs.h.new confdefs.h
2709
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002710
Martin v. Löwis174440b2008-10-03 08:59:41 +00002711VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002712
Martin v. Löwis1142de32002-03-29 16:28:31 +00002713
2714SOVERSION=1.0
2715
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002716# The later defininition of _XOPEN_SOURCE disables certain features
2717# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2718
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002719$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002720
2721
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002722# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2723# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2724# them.
2725
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002726$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002727
2728
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002729# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2730# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2731# them.
2732
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002733$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002734
2735
Martin v. Löwisd6320502004-08-12 13:45:08 +00002736# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2737# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2738
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002739$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002740
2741
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002742# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2743# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2744# them.
2745
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002746$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002747
2748
2749
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002750define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002751
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002752# Arguments passed to configure.
2753
2754CONFIG_ARGS="$ac_configure_args"
2755
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2757$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002758# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002759if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002760 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002761 case $enableval in
2762 yes)
2763 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002764 if test ! -d "${enableval}"
2765 then
2766 enableval=/
2767 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002768 ;;
2769 esac
2770 case $enableval in
2771 no)
2772 UNIVERSALSDK=
2773 enable_universalsdk=
2774 ;;
2775 *)
2776 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002777 if test ! -d "${UNIVERSALSDK}"
2778 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002779 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002780 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002781 ;;
2782 esac
2783
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002784
Ronald Oussoren988117f2006-04-29 11:31:35 +00002785else
2786
2787 UNIVERSALSDK=
2788 enable_universalsdk=
2789
Martin v. Löwiseba40652007-08-30 20:10:57 +00002790fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002791
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002792if test -n "${UNIVERSALSDK}"
2793then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2795$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2798$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002799fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002800
Martin v. Löwiseba40652007-08-30 20:10:57 +00002801
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002802
2803
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002804UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002805
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2807$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002808
2809# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002810if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002811 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2813$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002814 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002815 if test "${enable_universalsdk}" ; then
2816 :
2817 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002818 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002819 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002820
2821else
2822
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2824$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002825
2826fi
2827
2828
2829
2830
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002831
2832# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002833if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002834 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002835 if test "${enable_framework}"; then
2836 :
2837 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002838 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002839 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002840 PYTHONFRAMEWORK=${withval}
2841 PYTHONFRAMEWORKDIR=${withval}.framework
2842 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2843
2844else
2845
2846 PYTHONFRAMEWORK=Python
2847 PYTHONFRAMEWORKDIR=Python.framework
2848 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2849
2850fi
2851
Martin v. Löwiseba40652007-08-30 20:10:57 +00002852# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002853if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002854 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002855 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002856 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002857 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002858 esac
2859 case $enableval in
2860 no)
2861 PYTHONFRAMEWORK=
2862 PYTHONFRAMEWORKDIR=no-framework
2863 PYTHONFRAMEWORKPREFIX=
2864 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002865 FRAMEWORKINSTALLFIRST=
2866 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002867 FRAMEWORKALTINSTALLFIRST=
2868 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002869 if test "x${prefix}" = "xNONE"; then
2870 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2871 else
2872 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2873 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002874 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002875 ;;
2876 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002877 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002878 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002879 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002880 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002881 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2882 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002883 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002884
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002885 if test "x${prefix}" = "xNONE" ; then
2886 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002887
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002888 else
2889 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2890 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002891
2892 case "${enableval}" in
2893 /System*)
2894 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2895 if test "${prefix}" = "NONE" ; then
2896 # See below
2897 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2898 fi
2899 ;;
2900
2901 /Library*)
2902 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2903 ;;
2904
2905 */Library/Frameworks)
2906 MDIR="`dirname "${enableval}"`"
2907 MDIR="`dirname "${MDIR}"`"
2908 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2909
2910 if test "${prefix}" = "NONE"; then
2911 # User hasn't specified the
2912 # --prefix option, but wants to install
2913 # the framework in a non-default location,
2914 # ensure that the compatibility links get
2915 # installed relative to that prefix as well
2916 # instead of in /usr/local.
2917 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2918 fi
2919 ;;
2920
2921 *)
2922 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2923 ;;
2924 esac
2925
Jack Jansen127e56e2001-09-11 14:41:54 +00002926 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002927
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002928 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002929 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002930 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002931
Martin v. Löwiseba40652007-08-30 20:10:57 +00002932 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002933
Martin v. Löwiseba40652007-08-30 20:10:57 +00002934 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002935
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002936 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2937
2938 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2939
Jack Jansene578a632001-08-15 01:27:14 +00002940 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002941
Guido van Rossum563e7081996-09-10 18:20:48 +00002942else
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Jack Jansene578a632001-08-15 01:27:14 +00002944 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002945 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002946 PYTHONFRAMEWORKPREFIX=
2947 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002948 FRAMEWORKINSTALLFIRST=
2949 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002950 FRAMEWORKALTINSTALLFIRST=
2951 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002952 if test "x${prefix}" = "xNONE" ; then
2953 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2954 else
2955 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2956 fi
Jack Jansene578a632001-08-15 01:27:14 +00002957 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002958
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002959
Martin v. Löwiseba40652007-08-30 20:10:57 +00002960fi
2961
Michael W. Hudson54241132001-12-07 15:38:26 +00002962
2963
2964
2965
Jack Jansene578a632001-08-15 01:27:14 +00002966
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002967
2968
Ronald Oussoren5b787322006-06-06 19:50:24 +00002969
2970
2971
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002972
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002973
Jack Jansene578a632001-08-15 01:27:14 +00002974##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00002975## AS_HELP_STRING([--with-dyld],
2976## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002977##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002978# Set name for machine-dependent library files
2979
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2981$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002982if test -z "$MACHDEP"
2983then
Guido van Rossum563e7081996-09-10 18:20:48 +00002984 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002985 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002986 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002987 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002988 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002989 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002990 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002991 ac_md_system=`echo $ac_sys_system |
2992 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2993 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002994 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002995 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002996
Guido van Rossum07397971997-04-29 21:49:50 +00002997 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02002998 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002999 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003000 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003001 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003002 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003003 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003004 esac
3005fi
Guido van Rossum91922671997-10-09 20:24:13 +00003006
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003007# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3008# disable features if it is defined, without any means to access these
3009# features as extensions. For these systems, we skip the definition of
3010# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3011# some feature, make sure there is no alternative way to access this
3012# feature. Also, when using wildcards, make sure you have verified the
3013# need for not defining _XOPEN_SOURCE on all systems matching the
3014# wildcard, and that the wildcard does not include future systems
3015# (which may remove their limitations).
3016case $ac_sys_system/$ac_sys_release in
3017 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3018 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003019 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003020 # In addition, Stefan Krah confirms that issue #1244610 exists through
3021 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003022 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003023 define_xopen_source=no
3024 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3025 # also defined. This can be overridden by defining _BSD_SOURCE
3026 # As this has a different meaning on Linux, only define it on OpenBSD
3027
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003028$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003029
3030 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003031 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003032 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3033 # also defined. This can be overridden by defining _BSD_SOURCE
3034 # As this has a different meaning on Linux, only define it on OpenBSD
3035
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003036$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003037
3038 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003039 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3040 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3041 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003042 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003043 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003044 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3045 # request to enable features supported by the standard as a request
3046 # to disable features not supported by the standard. The best way
3047 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3048 # entirely and define __EXTENSIONS__ instead.
3049 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003050 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003051 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3052 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003053 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003054 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003055 define_xopen_source=no;;
3056 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003057 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003058 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003059 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003060 # On FreeBSD 4, the math functions C89 does not cover are never defined
3061 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3062 FreeBSD/4.*)
3063 define_xopen_source=no;;
3064 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3065 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3066 # identifies itself as Darwin/7.*
3067 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3068 # disables platform specific features beyond repair.
3069 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3070 # has no effect, don't bother defining them
3071 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003072 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003073 Darwin/1[0-9].*)
3074 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003075 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3076 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3077 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003078 AIX/4)
3079 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003080 AIX/5)
3081 if test `uname -r` -eq 1; then
3082 define_xopen_source=no
3083 fi
3084 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003085 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3086 # defining NI_NUMERICHOST.
3087 QNX/6.3.2)
3088 define_xopen_source=no
3089 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003090
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003091esac
3092
3093if test $define_xopen_source = yes
3094then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003095
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003096$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003097
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003098
3099 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3100 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3101 # several APIs are not declared. Since this is also needed in some
3102 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003103
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003104$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003105
3106
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003107
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003108$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003109
3110
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003111fi
3112
Guido van Rossum91922671997-10-09 20:24:13 +00003113#
3114# SGI compilers allow the specification of the both the ABI and the
3115# ISA on the command line. Depending on the values of these switches,
3116# different and often incompatable code will be generated.
3117#
3118# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3119# thus supply support for various ABI/ISA combinations. The MACHDEP
3120# variable is also adjusted.
3121#
3122
3123if test ! -z "$SGI_ABI"
3124then
3125 CC="cc $SGI_ABI"
3126 LDFLAGS="$SGI_ABI $LDFLAGS"
3127 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3130$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003131
Jack Jansen83f898c2002-12-30 22:23:40 +00003132# And add extra plat-mac for darwin
3133
Jack Jansen7b59b422003-03-17 15:44:10 +00003134
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3136$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003137if test -z "$EXTRAPLATDIR"
3138then
3139 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003140 darwin)
3141 EXTRAPLATDIR="\$(PLATMACDIRS)"
3142 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3143 ;;
3144 *)
3145 EXTRAPLATDIR=""
3146 EXTRAMACHDEPPATH=""
3147 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003148 esac
3149fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3151$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003152
Jack Jansen6b08a402004-06-03 12:41:45 +00003153# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3154# it may influence the way we can build extensions, so distutils
3155# needs to check it
3156
Ronald Oussoren988117f2006-04-29 11:31:35 +00003157
Jack Jansen6b08a402004-06-03 12:41:45 +00003158CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003159EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003160
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3162$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003163ac_sys_machine=`uname -m`
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3165$as_echo "$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003166
Guido van Rossum627b2d71993-12-24 10:39:16 +00003167# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003168
3169# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3170# for debug/optimization stuff. BASECFLAGS is for flags that are required
3171# just to get things to compile and link. Users are free to override OPT
3172# when running configure or make. The build should not break if they do.
3173# BASECFLAGS should generally not be messed with, however.
3174
3175# XXX shouldn't some/most/all of this code be merged with the stuff later
3176# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3178$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003179
Martin v. Löwiseba40652007-08-30 20:10:57 +00003180# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003181if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003182 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003183 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003184 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003185 without_gcc=yes;;
3186 yes) CC=gcc
3187 without_gcc=no;;
3188 *) CC=$withval
3189 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003190 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003191else
Martin v. Löwis11437992002-04-12 09:54:03 +00003192
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003193 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003194 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003195 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003196 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003197 case $BE_HOST_CPU in
3198 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003199 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003200 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003201 BASECFLAGS="$BASECFLAGS -export pragma"
3202 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003203 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003204 ;;
3205 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003206 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003207 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003208 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003209 ;;
3210 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003211 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003212 ;;
3213 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003214 AR="\$(srcdir)/Modules/ar_beos"
3215 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003216 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003217 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003218 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003219fi
3220
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3222$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003223
Guido van Rossum8b131c51995-03-09 14:10:13 +00003224# If the user switches compilers, we can't believe the cache
3225if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3226then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003227 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003228(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003229fi
3230
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003231# If the user set CFLAGS, use this instead of the automatically
3232# determined setting
3233preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003234ac_ext=c
3235ac_cpp='$CPP $CPPFLAGS'
3236ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3237ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3238ac_compiler_gnu=$ac_cv_c_compiler_gnu
3239if test -n "$ac_tool_prefix"; then
3240 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3241set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3243$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003244if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003245 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003246else
3247 if test -n "$CC"; then
3248 ac_cv_prog_CC="$CC" # Let the user override the test.
3249else
Martin v. Löwis11437992002-04-12 09:54:03 +00003250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3251for as_dir in $PATH
3252do
3253 IFS=$as_save_IFS
3254 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003255 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003256 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003257 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003258 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003259 break 2
3260 fi
3261done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003262 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003263IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003264
Jack Jansendd19cf82001-12-06 22:36:17 +00003265fi
3266fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003267CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003268if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3270$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003271else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3273$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003274fi
3275
Martin v. Löwiseba40652007-08-30 20:10:57 +00003276
Martin v. Löwis11437992002-04-12 09:54:03 +00003277fi
3278if test -z "$ac_cv_prog_CC"; then
3279 ac_ct_CC=$CC
3280 # Extract the first word of "gcc", so it can be a program name with args.
3281set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3283$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003284if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003285 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003286else
3287 if test -n "$ac_ct_CC"; then
3288 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3289else
3290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3291for as_dir in $PATH
3292do
3293 IFS=$as_save_IFS
3294 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003295 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003296 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003297 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003298 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003299 break 2
3300 fi
3301done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003302 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003303IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003304
3305fi
3306fi
3307ac_ct_CC=$ac_cv_prog_ac_ct_CC
3308if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3310$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003311else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3313$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003314fi
3315
Martin v. Löwiseba40652007-08-30 20:10:57 +00003316 if test "x$ac_ct_CC" = x; then
3317 CC=""
3318 else
3319 case $cross_compiling:$ac_tool_warned in
3320yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003321{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3322$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003323ac_tool_warned=yes ;;
3324esac
3325 CC=$ac_ct_CC
3326 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003327else
3328 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003329fi
3330
Jack Jansendd19cf82001-12-06 22:36:17 +00003331if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003332 if test -n "$ac_tool_prefix"; then
3333 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003334set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3336$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003337if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003338 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003339else
3340 if test -n "$CC"; then
3341 ac_cv_prog_CC="$CC" # Let the user override the test.
3342else
Martin v. Löwis11437992002-04-12 09:54:03 +00003343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3344for as_dir in $PATH
3345do
3346 IFS=$as_save_IFS
3347 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003348 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003349 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003350 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003351 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003352 break 2
3353 fi
3354done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003355 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003356IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003357
3358fi
3359fi
3360CC=$ac_cv_prog_CC
3361if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3363$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3366$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003367fi
3368
Martin v. Löwiseba40652007-08-30 20:10:57 +00003369
Martin v. Löwis11437992002-04-12 09:54:03 +00003370 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003371fi
3372if test -z "$CC"; then
3373 # Extract the first word of "cc", so it can be a program name with args.
3374set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3376$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003377if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003378 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003379else
3380 if test -n "$CC"; then
3381 ac_cv_prog_CC="$CC" # Let the user override the test.
3382else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003383 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3385for as_dir in $PATH
3386do
3387 IFS=$as_save_IFS
3388 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003389 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003390 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003391 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3392 ac_prog_rejected=yes
3393 continue
3394 fi
3395 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003396 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003397 break 2
3398 fi
3399done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003400 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003402
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003403if test $ac_prog_rejected = yes; then
3404 # We found a bogon in the path, so make sure we never use it.
3405 set dummy $ac_cv_prog_CC
3406 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003408 # We chose a different compiler from the bogus one.
3409 # However, it has the same basename, so the bogon will be chosen
3410 # first if we set CC to just the basename; use the full file name.
3411 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003412 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003413 fi
3414fi
3415fi
3416fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003417CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003418if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3420$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3423$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003424fi
3425
Martin v. Löwiseba40652007-08-30 20:10:57 +00003426
Martin v. Löwis11437992002-04-12 09:54:03 +00003427fi
3428if test -z "$CC"; then
3429 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003430 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003431 do
3432 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3433set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3435$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003436if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003437 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003438else
3439 if test -n "$CC"; then
3440 ac_cv_prog_CC="$CC" # Let the user override the test.
3441else
Martin v. Löwis11437992002-04-12 09:54:03 +00003442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3443for as_dir in $PATH
3444do
3445 IFS=$as_save_IFS
3446 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003447 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003448 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003449 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003450 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003451 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003452 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003453done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003454 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003455IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003456
3457fi
3458fi
3459CC=$ac_cv_prog_CC
3460if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3462$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003463else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3465$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003466fi
3467
Martin v. Löwiseba40652007-08-30 20:10:57 +00003468
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 test -n "$CC" && break
3470 done
3471fi
3472if test -z "$CC"; then
3473 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003474 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003475do
3476 # Extract the first word of "$ac_prog", so it can be a program name with args.
3477set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3479$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003480if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003481 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003482else
3483 if test -n "$ac_ct_CC"; then
3484 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3485else
3486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3487for as_dir in $PATH
3488do
3489 IFS=$as_save_IFS
3490 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003491 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003492 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003493 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003494 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003495 break 2
3496 fi
3497done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003498 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003499IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003500
Martin v. Löwis11437992002-04-12 09:54:03 +00003501fi
3502fi
3503ac_ct_CC=$ac_cv_prog_ac_ct_CC
3504if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3506$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003507else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3509$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003510fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003511
Martin v. Löwiseba40652007-08-30 20:10:57 +00003512
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 test -n "$ac_ct_CC" && break
3514done
Michael W. Hudson54241132001-12-07 15:38:26 +00003515
Martin v. Löwiseba40652007-08-30 20:10:57 +00003516 if test "x$ac_ct_CC" = x; then
3517 CC=""
3518 else
3519 case $cross_compiling:$ac_tool_warned in
3520yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003521{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3522$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003523ac_tool_warned=yes ;;
3524esac
3525 CC=$ac_ct_CC
3526 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003527fi
3528
3529fi
3530
3531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003532test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3533$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003534as_fn_error $? "no acceptable C compiler found in \$PATH
Charles-François Natali97781b02011-07-22 23:43:42 +02003535See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003536
3537# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003538$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3539set X $ac_compile
3540ac_compiler=$2
3541for ac_option in --version -v -V -qversion; do
3542 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003543case "(($ac_try" in
3544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3545 *) ac_try_echo=$ac_try;;
3546esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003547eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3548$as_echo "$ac_try_echo"; } >&5
3549 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003550 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003551 if test -s conftest.err; then
3552 sed '10a\
3553... rest of stderr output deleted ...
3554 10q' conftest.err >conftest.er1
3555 cat conftest.er1 >&5
3556 fi
3557 rm -f conftest.er1 conftest.err
3558 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3559 test $ac_status = 0; }
3560done
Martin v. Löwis11437992002-04-12 09:54:03 +00003561
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003563/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003564
Martin v. Löwis11437992002-04-12 09:54:03 +00003565int
3566main ()
3567{
3568
3569 ;
3570 return 0;
3571}
3572_ACEOF
3573ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003574ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003575# Try to create an executable without -o first, disregard a.out.
3576# It will help us diagnose broken compilers, and finding out an intuition
3577# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3579$as_echo_n "checking whether the C compiler works... " >&6; }
3580ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3581
3582# The possible output files:
3583ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3584
Martin v. Löwiseba40652007-08-30 20:10:57 +00003585ac_rmfiles=
3586for ac_file in $ac_files
3587do
3588 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003589 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003590 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3591 esac
3592done
3593rm -f $ac_rmfiles
3594
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003595if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003596case "(($ac_try" in
3597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3598 *) ac_try_echo=$ac_try;;
3599esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003600eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3601$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003602 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003603 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003604 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3605 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003606 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3607# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3608# in a Makefile. We should not override ac_cv_exeext if it was cached,
3609# so that the user can short-circuit this test for compilers unknown to
3610# Autoconf.
3611for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003612do
3613 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003614 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003615 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003616 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003617 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003618 # We found the default executable, but exeext='' is most
3619 # certainly right.
3620 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003621 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003622 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003623 then :; else
3624 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3625 fi
3626 # We set ac_cv_exeext here because the later test for it is not
3627 # safe: cross compilers may not add the suffix if given an `-o'
3628 # argument, so we may need to know it at that point already.
3629 # Even if this section looks crufty: it has the advantage of
3630 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003631 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003632 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003633 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 esac
3635done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003636test "$ac_cv_exeext" = no && ac_cv_exeext=
3637
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003638else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003639 ac_file=''
3640fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003641if test -z "$ac_file"; then :
3642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3643$as_echo "no" >&6; }
3644$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003645sed 's/^/| /' conftest.$ac_ext >&5
3646
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003647{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3648$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003649as_fn_error 77 "C compiler cannot create executables
Charles-François Natali97781b02011-07-22 23:43:42 +02003650See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003651else
3652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3653$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003654fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3656$as_echo_n "checking for C compiler default output file name... " >&6; }
3657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3658$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003659ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003660
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003661rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003662ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3664$as_echo_n "checking for suffix of executables... " >&6; }
3665if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003666case "(($ac_try" in
3667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3668 *) ac_try_echo=$ac_try;;
3669esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003670eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3671$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003672 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003674 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3675 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003676 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3677# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3678# work properly (i.e., refer to `conftest.exe'), while it won't with
3679# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003680for ac_file in conftest.exe conftest conftest.*; do
3681 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003683 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003684 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003685 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003686 * ) break;;
3687 esac
3688done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003689else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003692as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Charles-François Natali97781b02011-07-22 23:43:42 +02003693See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003694fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003695rm -f conftest conftest$ac_cv_exeext
3696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3697$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003698
3699rm -f conftest.$ac_ext
3700EXEEXT=$ac_cv_exeext
3701ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3703/* end confdefs.h. */
3704#include <stdio.h>
3705int
3706main ()
3707{
3708FILE *f = fopen ("conftest.out", "w");
3709 return ferror (f) || fclose (f) != 0;
3710
3711 ;
3712 return 0;
3713}
Skip Montanaro6dead952003-09-25 14:50:04 +00003714_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003715ac_clean_files="$ac_clean_files conftest.out"
3716# Check that the compiler produces executables we can run. If not, either
3717# the compiler is broken, or we cross compile.
3718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3719$as_echo_n "checking whether we are cross compiling... " >&6; }
3720if test "$cross_compiling" != yes; then
3721 { { ac_try="$ac_link"
3722case "(($ac_try" in
3723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3724 *) ac_try_echo=$ac_try;;
3725esac
3726eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3727$as_echo "$ac_try_echo"; } >&5
3728 (eval "$ac_link") 2>&5
3729 ac_status=$?
3730 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3731 test $ac_status = 0; }
3732 if { ac_try='./conftest$ac_cv_exeext'
3733 { { case "(($ac_try" in
3734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3735 *) ac_try_echo=$ac_try;;
3736esac
3737eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3738$as_echo "$ac_try_echo"; } >&5
3739 (eval "$ac_try") 2>&5
3740 ac_status=$?
3741 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3742 test $ac_status = 0; }; }; then
3743 cross_compiling=no
3744 else
3745 if test "$cross_compiling" = maybe; then
3746 cross_compiling=yes
3747 else
3748 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3749$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003750as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003751If you meant to cross compile, use \`--host'.
Charles-François Natali97781b02011-07-22 23:43:42 +02003752See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003753 fi
3754 fi
3755fi
3756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3757$as_echo "$cross_compiling" >&6; }
3758
3759rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3760ac_clean_files=$ac_clean_files_save
3761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3762$as_echo_n "checking for suffix of object files... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003763if test "${ac_cv_objext+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003764 $as_echo_n "(cached) " >&6
3765else
3766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003768
Martin v. Löwis11437992002-04-12 09:54:03 +00003769int
3770main ()
3771{
3772
3773 ;
3774 return 0;
3775}
3776_ACEOF
3777rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003778if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003779case "(($ac_try" in
3780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3781 *) ac_try_echo=$ac_try;;
3782esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003783eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3784$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003785 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003787 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3788 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003789 for ac_file in conftest.o conftest.obj conftest.*; do
3790 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003792 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003793 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3794 break;;
3795 esac
3796done
3797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003798 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003799sed 's/^/| /' conftest.$ac_ext >&5
3800
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003801{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003803as_fn_error $? "cannot compute suffix of object files: cannot compile
Charles-François Natali97781b02011-07-22 23:43:42 +02003804See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003805fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003806rm -f conftest.$ac_cv_objext conftest.$ac_ext
3807fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3809$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003810OBJEXT=$ac_cv_objext
3811ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3813$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003814if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003815 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003816else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003819
Martin v. Löwis11437992002-04-12 09:54:03 +00003820int
3821main ()
3822{
3823#ifndef __GNUC__
3824 choke me
3825#endif
3826
3827 ;
3828 return 0;
3829}
3830_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003831if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003832 ac_compiler_gnu=yes
3833else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003834 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003837ac_cv_c_compiler_gnu=$ac_compiler_gnu
3838
3839fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3841$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3842if test $ac_compiler_gnu = yes; then
3843 GCC=yes
3844else
3845 GCC=
3846fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003847ac_test_CFLAGS=${CFLAGS+set}
3848ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3850$as_echo_n "checking whether $CC accepts -g... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003851if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003852 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003853else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003854 ac_save_c_werror_flag=$ac_c_werror_flag
3855 ac_c_werror_flag=yes
3856 ac_cv_prog_cc_g=no
3857 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003860
Martin v. Löwis11437992002-04-12 09:54:03 +00003861int
3862main ()
3863{
3864
3865 ;
3866 return 0;
3867}
3868_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003869if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003870 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003871else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003872 CFLAGS=""
3873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003874/* end confdefs.h. */
3875
3876int
3877main ()
3878{
3879
3880 ;
3881 return 0;
3882}
3883_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003884if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003885
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003886else
3887 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00003888 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003890/* end confdefs.h. */
3891
3892int
3893main ()
3894{
3895
3896 ;
3897 return 0;
3898}
3899_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003900if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003901 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3908 ac_c_werror_flag=$ac_save_c_werror_flag
3909fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3911$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003912if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003913 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003914elif test $ac_cv_prog_cc_g = yes; then
3915 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003916 CFLAGS="-g -O2"
3917 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003918 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003919 fi
3920else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003921 if test "$GCC" = yes; then
3922 CFLAGS="-O2"
3923 else
3924 CFLAGS=
3925 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003926fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3928$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003929if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003930 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003931else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003932 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003933ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003935/* end confdefs.h. */
3936#include <stdarg.h>
3937#include <stdio.h>
3938#include <sys/types.h>
3939#include <sys/stat.h>
3940/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3941struct buf { int x; };
3942FILE * (*rcsopen) (struct buf *, struct stat *, int);
3943static char *e (p, i)
3944 char **p;
3945 int i;
3946{
3947 return p[i];
3948}
3949static char *f (char * (*g) (char **, int), char **p, ...)
3950{
3951 char *s;
3952 va_list v;
3953 va_start (v,p);
3954 s = g (p, va_arg (v,int));
3955 va_end (v);
3956 return s;
3957}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003958
3959/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3960 function prototypes and stuff, but not '\xHH' hex character constants.
3961 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003962 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003963 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3964 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003965 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003966int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3967
Martin v. Löwiseba40652007-08-30 20:10:57 +00003968/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3969 inside strings and character constants. */
3970#define FOO(x) 'x'
3971int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3972
Skip Montanaro6dead952003-09-25 14:50:04 +00003973int test (int i, double x);
3974struct s1 {int (*f) (int a);};
3975struct s2 {int (*f) (double a);};
3976int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3977int argc;
3978char **argv;
3979int
3980main ()
3981{
3982return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3983 ;
3984 return 0;
3985}
3986_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003987for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3988 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003989do
3990 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003991 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003992 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003994rm -f core conftest.err conftest.$ac_objext
3995 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003996done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003997rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003998CC=$ac_save_CC
3999
4000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004001# AC_CACHE_VAL
4002case "x$ac_cv_prog_cc_c89" in
4003 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4005$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004006 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4008$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004009 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004010 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4012$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004013esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004014if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004015
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004016fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004017
Martin v. Löwis11437992002-04-12 09:54:03 +00004018ac_ext=c
4019ac_cpp='$CPP $CPPFLAGS'
4020ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4021ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4022ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004023
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004024if test ! -z "$preset_cflags"
4025then
4026 CFLAGS=$preset_cflags
4027fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004028
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004029
4030
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4032$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004033
Martin v. Löwiseba40652007-08-30 20:10:57 +00004034# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004035if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004036 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004037
4038 case $withval in
4039 no) with_cxx_main=no
4040 MAINCC='$(CC)';;
4041 yes) with_cxx_main=yes
4042 MAINCC='$(CXX)';;
4043 *) with_cxx_main=yes
4044 MAINCC=$withval
4045 if test -z "$CXX"
4046 then
4047 CXX=$withval
4048 fi;;
4049 esac
4050else
4051
4052 with_cxx_main=no
4053 MAINCC='$(CC)'
4054
Martin v. Löwiseba40652007-08-30 20:10:57 +00004055fi
4056
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4058$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004059
4060preset_cxx="$CXX"
4061if test -z "$CXX"
4062then
4063 case "$CC" in
4064 gcc) # Extract the first word of "g++", so it can be a program name with args.
4065set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4067$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004068if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004069 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004070else
4071 case $CXX in
4072 [\\/]* | ?:[\\/]*)
4073 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4074 ;;
4075 *)
4076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4077for as_dir in notfound
4078do
4079 IFS=$as_save_IFS
4080 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004081 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004082 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004083 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004085 break 2
4086 fi
4087done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004088 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004089IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004090
4091 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4092 ;;
4093esac
4094fi
4095CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004096if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4098$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004099else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4101$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004103
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004104 ;;
4105 cc) # Extract the first word of "c++", so it can be a program name with args.
4106set dummy c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4108$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004109if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004110 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004111else
4112 case $CXX in
4113 [\\/]* | ?:[\\/]*)
4114 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4115 ;;
4116 *)
4117 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4118for as_dir in notfound
4119do
4120 IFS=$as_save_IFS
4121 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004122 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004123 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004124 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004126 break 2
4127 fi
4128done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004129 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004130IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004131
4132 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4133 ;;
4134esac
4135fi
4136CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004137if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4139$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004140else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4142$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004144
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004145 ;;
4146 esac
4147 if test "$CXX" = "notfound"
4148 then
4149 CXX=""
4150 fi
4151fi
4152if test -z "$CXX"
4153then
4154 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4155do
4156 # Extract the first word of "$ac_prog", so it can be a program name with args.
4157set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4159$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004160if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004161 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004162else
4163 if test -n "$CXX"; then
4164 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4165else
4166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4167for as_dir in $PATH
4168do
4169 IFS=$as_save_IFS
4170 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004171 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004172 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004173 ac_cv_prog_CXX="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004174 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004175 break 2
4176 fi
4177done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004178 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004179IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004180
4181fi
4182fi
4183CXX=$ac_cv_prog_CXX
4184if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4186$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004187else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4189$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004190fi
4191
Martin v. Löwiseba40652007-08-30 20:10:57 +00004192
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004193 test -n "$CXX" && break
4194done
4195test -n "$CXX" || CXX="notfound"
4196
4197 if test "$CXX" = "notfound"
4198 then
4199 CXX=""
4200 fi
4201fi
4202if test "$preset_cxx" != "$CXX"
4203then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004204 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004205
4206 By default, distutils will build C++ extension modules with \"$CXX\".
4207 If this is not intended, then set CXX on the configure command line.
4208 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004209$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004210
4211 By default, distutils will build C++ extension modules with \"$CXX\".
4212 If this is not intended, then set CXX on the configure command line.
4213 " >&2;}
4214fi
4215
4216
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004217# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004218
4219ac_ext=c
4220ac_cpp='$CPP $CPPFLAGS'
4221ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4222ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4223ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4225$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004226# On Suns, sometimes $CPP names a directory.
4227if test -n "$CPP" && test -d "$CPP"; then
4228 CPP=
4229fi
4230if test -z "$CPP"; then
Charles-François Natali97781b02011-07-22 23:43:42 +02004231 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004232 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004233else
Martin v. Löwis11437992002-04-12 09:54:03 +00004234 # Double quotes because CPP needs to be expanded
4235 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4236 do
4237 ac_preproc_ok=false
4238for ac_c_preproc_warn_flag in '' yes
4239do
4240 # Use a header file that comes with gcc, so configuring glibc
4241 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004242 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4243 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004244 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004245 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004247/* end confdefs.h. */
4248#ifdef __STDC__
4249# include <limits.h>
4250#else
4251# include <assert.h>
4252#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004253 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004254_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004255if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004256
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004257else
Martin v. Löwis11437992002-04-12 09:54:03 +00004258 # Broken: fails on valid input.
4259continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004260fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004261rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004262
Martin v. Löwiseba40652007-08-30 20:10:57 +00004263 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004267#include <ac_nonexistent.h>
4268_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004269if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004270 # Broken: success on invalid input.
4271continue
4272else
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 # Passes both tests.
4274ac_preproc_ok=:
4275break
4276fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004277rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004278
4279done
4280# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004281rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004282if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004283 break
4284fi
4285
4286 done
4287 ac_cv_prog_CPP=$CPP
4288
4289fi
4290 CPP=$ac_cv_prog_CPP
4291else
4292 ac_cv_prog_CPP=$CPP
4293fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4295$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004296ac_preproc_ok=false
4297for ac_c_preproc_warn_flag in '' yes
4298do
4299 # Use a header file that comes with gcc, so configuring glibc
4300 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004301 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4302 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004303 # On the NeXT, cc -E runs the code through the compiler's parser,
4304 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004306/* end confdefs.h. */
4307#ifdef __STDC__
4308# include <limits.h>
4309#else
4310# include <assert.h>
4311#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004312 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004313_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004314if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004315
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004316else
Martin v. Löwis11437992002-04-12 09:54:03 +00004317 # Broken: fails on valid input.
4318continue
4319fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004320rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004321
Martin v. Löwiseba40652007-08-30 20:10:57 +00004322 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004323 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004326#include <ac_nonexistent.h>
4327_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004328if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004329 # Broken: success on invalid input.
4330continue
4331else
Martin v. Löwis11437992002-04-12 09:54:03 +00004332 # Passes both tests.
4333ac_preproc_ok=:
4334break
4335fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004336rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004337
4338done
4339# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004340rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004341if $ac_preproc_ok; then :
4342
Martin v. Löwis11437992002-04-12 09:54:03 +00004343else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004344 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4345$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004346as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Charles-François Natali97781b02011-07-22 23:43:42 +02004347See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004348fi
4349
4350ac_ext=c
4351ac_cpp='$CPP $CPPFLAGS'
4352ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4353ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4354ac_compiler_gnu=$ac_cv_c_compiler_gnu
4355
4356
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4358$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004359if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004360 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004361else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004362 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004363 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004364 # Loop through the user's path and test for each of PROGNAME-LIST
4365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004366for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4367do
4368 IFS=$as_save_IFS
4369 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004370 for ac_prog in grep ggrep; do
4371 for ac_exec_ext in '' $ac_executable_extensions; do
4372 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4373 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4374# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004375 # Check for GNU $ac_path_GREP
4376case `"$ac_path_GREP" --version 2>&1` in
4377*GNU*)
4378 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4379*)
4380 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004381 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004382 while :
4383 do
4384 cat "conftest.in" "conftest.in" >"conftest.tmp"
4385 mv "conftest.tmp" "conftest.in"
4386 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004387 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004388 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4389 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004390 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004391 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4392 # Best one so far, save it but keep looking for a better one
4393 ac_cv_path_GREP="$ac_path_GREP"
4394 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004395 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004396 # 10*(2^10) chars as input seems more than enough
4397 test $ac_count -gt 10 && break
4398 done
4399 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4400esac
4401
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004402 $ac_path_GREP_found && break 3
4403 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004404 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004405 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004406IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004407 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004408 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004409 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004410else
4411 ac_cv_path_GREP=$GREP
4412fi
4413
Martin v. Löwiseba40652007-08-30 20:10:57 +00004414fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4416$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004417 GREP="$ac_cv_path_GREP"
4418
4419
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4421$as_echo_n "checking for egrep... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004422if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004423 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004424else
4425 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4426 then ac_cv_path_EGREP="$GREP -E"
4427 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004428 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004429 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004430 # Loop through the user's path and test for each of PROGNAME-LIST
4431 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004432for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4433do
4434 IFS=$as_save_IFS
4435 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004436 for ac_prog in egrep; do
4437 for ac_exec_ext in '' $ac_executable_extensions; do
4438 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4439 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4440# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004441 # Check for GNU $ac_path_EGREP
4442case `"$ac_path_EGREP" --version 2>&1` in
4443*GNU*)
4444 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4445*)
4446 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004447 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004448 while :
4449 do
4450 cat "conftest.in" "conftest.in" >"conftest.tmp"
4451 mv "conftest.tmp" "conftest.in"
4452 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004453 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004454 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4455 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004456 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004457 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4458 # Best one so far, save it but keep looking for a better one
4459 ac_cv_path_EGREP="$ac_path_EGREP"
4460 ac_path_EGREP_max=$ac_count
4461 fi
4462 # 10*(2^10) chars as input seems more than enough
4463 test $ac_count -gt 10 && break
4464 done
4465 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4466esac
4467
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004468 $ac_path_EGREP_found && break 3
4469 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004470 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004471 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004472IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004473 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004474 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004475 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004476else
4477 ac_cv_path_EGREP=$EGREP
4478fi
4479
Martin v. Löwiseba40652007-08-30 20:10:57 +00004480 fi
4481fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4483$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004484 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004485
4486
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4488$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004489if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004490 $as_echo_n "(cached) " >&6
4491else
4492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004493/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004494#include <stdlib.h>
4495#include <stdarg.h>
4496#include <string.h>
4497#include <float.h>
4498
4499int
4500main ()
4501{
4502
4503 ;
4504 return 0;
4505}
4506_ACEOF
4507if ac_fn_c_try_compile "$LINENO"; then :
4508 ac_cv_header_stdc=yes
4509else
4510 ac_cv_header_stdc=no
4511fi
4512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4513
4514if test $ac_cv_header_stdc = yes; then
4515 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4517/* end confdefs.h. */
4518#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004519
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004520_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004521if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004522 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004523
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004524else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004525 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004526fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004527rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004528
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004529fi
4530
4531if test $ac_cv_header_stdc = yes; then
4532 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4534/* end confdefs.h. */
4535#include <stdlib.h>
4536
4537_ACEOF
4538if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4539 $EGREP "free" >/dev/null 2>&1; then :
4540
4541else
4542 ac_cv_header_stdc=no
4543fi
4544rm -f conftest*
4545
4546fi
4547
4548if test $ac_cv_header_stdc = yes; then
4549 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4550 if test "$cross_compiling" = yes; then :
4551 :
4552else
4553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4554/* end confdefs.h. */
4555#include <ctype.h>
4556#include <stdlib.h>
4557#if ((' ' & 0x0FF) == 0x020)
4558# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4559# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4560#else
4561# define ISLOWER(c) \
4562 (('a' <= (c) && (c) <= 'i') \
4563 || ('j' <= (c) && (c) <= 'r') \
4564 || ('s' <= (c) && (c) <= 'z'))
4565# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4566#endif
4567
4568#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4569int
4570main ()
4571{
4572 int i;
4573 for (i = 0; i < 256; i++)
4574 if (XOR (islower (i), ISLOWER (i))
4575 || toupper (i) != TOUPPER (i))
4576 return 2;
4577 return 0;
4578}
4579_ACEOF
4580if ac_fn_c_try_run "$LINENO"; then :
4581
4582else
4583 ac_cv_header_stdc=no
4584fi
4585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4586 conftest.$ac_objext conftest.beam conftest.$ac_ext
4587fi
4588
4589fi
4590fi
4591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4592$as_echo "$ac_cv_header_stdc" >&6; }
4593if test $ac_cv_header_stdc = yes; then
4594
4595$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4596
4597fi
4598
4599# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4600for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4601 inttypes.h stdint.h unistd.h
4602do :
4603 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4604ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4605"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004606if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004607 cat >>confdefs.h <<_ACEOF
4608#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4609_ACEOF
4610
4611fi
4612
4613done
4614
4615
4616
4617 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02004618if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004619 MINIX=yes
4620else
4621 MINIX=
4622fi
4623
4624
4625 if test "$MINIX" = yes; then
4626
4627$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4628
4629
4630$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4631
4632
4633$as_echo "#define _MINIX 1" >>confdefs.h
4634
4635 fi
4636
4637
4638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4639$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004640if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004641 $as_echo_n "(cached) " >&6
4642else
4643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4644/* end confdefs.h. */
4645
4646# define __EXTENSIONS__ 1
4647 $ac_includes_default
4648int
4649main ()
4650{
4651
4652 ;
4653 return 0;
4654}
4655_ACEOF
4656if ac_fn_c_try_compile "$LINENO"; then :
4657 ac_cv_safe_to_define___extensions__=yes
4658else
4659 ac_cv_safe_to_define___extensions__=no
4660fi
4661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4662fi
4663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4664$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4665 test $ac_cv_safe_to_define___extensions__ = yes &&
4666 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4667
4668 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4669
4670 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4671
4672 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4673
4674 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4675
4676
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004677
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004678# Check for unsupported systems
4679case $ac_sys_system/$ac_sys_release in
4680atheos*|Linux*/1*)
4681 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4682 echo See README for details.
4683 exit 1;;
4684esac
4685
4686
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4688$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004689
4690# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004691if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004692 withval=$with_suffix;
4693 case $withval in
4694 no) EXEEXT=;;
4695 yes) EXEEXT=.exe;;
4696 *) EXEEXT=$withval;;
4697 esac
4698fi
4699
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4701$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004702
4703# Test whether we're running on a non-case-sensitive system, in which
4704# case we give a warning if no ext is given
4705
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4707$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004708if test ! -d CaseSensitiveTestDir; then
4709mkdir CaseSensitiveTestDir
4710fi
4711
4712if test -d casesensitivetestdir
4713then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4715$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004716 BUILDEXEEXT=.exe
4717else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4719$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004720 BUILDEXEEXT=$EXEEXT
4721fi
4722rmdir CaseSensitiveTestDir
4723
4724case $MACHDEP in
4725bsdos*)
4726 case $CC in
4727 gcc) CC="$CC -D_HAVE_BSDI";;
4728 esac;;
4729esac
4730
4731case $ac_sys_system in
4732hp*|HP*)
4733 case $CC in
4734 cc|*/cc) CC="$CC -Ae";;
4735 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004736SunOS*)
4737 # Some functions have a prototype only with that define, e.g. confstr
4738
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004739$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004740
4741 ;;
4742esac
4743
4744
4745
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4747$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004748if test -z "$LIBRARY"
4749then
4750 LIBRARY='libpython$(VERSION).a'
4751fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4753$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004754
4755# LDLIBRARY is the name of the library to link against (as opposed to the
4756# name of the library into which to insert object files). BLDLIBRARY is also
4757# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4758# is blank as the main program is not linked directly against LDLIBRARY.
4759# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4760# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4761# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4762# DLLLIBRARY is the shared (i.e., DLL) library.
4763#
4764# RUNSHARED is used to run shared python without installed libraries
4765#
4766# INSTSONAME is the name of the shared library that will be use to install
4767# on the system - some systems like version suffix, others don't
4768
4769
4770
4771
4772
4773
4774LDLIBRARY="$LIBRARY"
4775BLDLIBRARY='$(LDLIBRARY)'
4776INSTSONAME='$(LDLIBRARY)'
4777DLLLIBRARY=''
4778LDLIBRARYDIR=''
4779RUNSHARED=''
4780
4781# LINKCC is the command that links the python executable -- default is $(CC).
4782# If CXX is set, and if it is needed to link a main function that was
4783# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4784# python might then depend on the C++ runtime
4785# This is altered for AIX in order to build the export list before
4786# linking.
4787
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4789$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004790if test -z "$LINKCC"
4791then
4792 LINKCC='$(PURIFY) $(MAINCC)'
4793 case $ac_sys_system in
4794 AIX*)
4795 exp_extra="\"\""
4796 if test $ac_sys_release -ge 5 -o \
4797 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4798 exp_extra="."
4799 fi
4800 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004801 QNX*)
4802 # qcc must be used because the other compilers do not
4803 # support -N.
4804 LINKCC=qcc;;
4805 esac
4806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4808$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004809
4810# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4811# make sure we default having it set to "no": this is used by
4812# distutils.unixccompiler to know if it should add --enable-new-dtags
4813# to linker command lines, and failing to detect GNU ld simply results
4814# in the same bahaviour as before.
4815
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4817$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004818ac_prog=ld
4819if test "$GCC" = yes; then
4820 ac_prog=`$CC -print-prog-name=ld`
4821fi
4822case `"$ac_prog" -V 2>&1 < /dev/null` in
4823 *GNU*)
4824 GNULD=yes;;
4825 *)
4826 GNULD=no;;
4827esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4829$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004830
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4832$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004833# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004834if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004835 enableval=$enable_shared;
4836fi
4837
4838
4839if test -z "$enable_shared"
4840then
4841 case $ac_sys_system in
4842 CYGWIN* | atheos*)
4843 enable_shared="yes";;
4844 *)
4845 enable_shared="no";;
4846 esac
4847fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4849$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004850
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4852$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004853# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004854if test "${enable_profiling+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004855 enableval=$enable_profiling; ac_save_cc="$CC"
4856 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004857 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004858 ac_enable_profiling="no"
4859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004861/* end confdefs.h. */
4862int main() { return 0; }
4863_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004864if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004865 ac_enable_profiling="yes"
4866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004867 ac_enable_profiling="no"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4870 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004871fi
4872
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004873 CC="$ac_save_cc"
4874fi
4875
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4877$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004878
4879case "$ac_enable_profiling" in
4880 "yes")
4881 BASECFLAGS="-pg $BASECFLAGS"
4882 LDFLAGS="-pg $LDFLAGS"
4883 ;;
4884esac
4885
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4887$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004888
4889# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4890# library that we build, but we do not want to link against it (we
4891# will find it with a -framework option). For this reason there is an
4892# extra variable BLDLIBRARY against which Python and the extension
4893# modules are linked, BLDLIBRARY. This is normally the same as
4894# LDLIBRARY, but empty for MacOSX framework builds.
4895if test "$enable_framework"
4896then
4897 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4898 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4899 BLDLIBRARY=''
4900else
4901 BLDLIBRARY='$(LDLIBRARY)'
4902fi
4903
4904# Other platforms follow
4905if test $enable_shared = "yes"; then
4906
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004907$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004908
4909 case $ac_sys_system in
4910 BeOS*)
4911 LDLIBRARY='libpython$(VERSION).so'
4912 ;;
4913 CYGWIN*)
4914 LDLIBRARY='libpython$(VERSION).dll.a'
4915 DLLLIBRARY='libpython$(VERSION).dll'
4916 ;;
4917 SunOS*)
4918 LDLIBRARY='libpython$(VERSION).so'
4919 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4920 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4921 INSTSONAME="$LDLIBRARY".$SOVERSION
4922 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02004923 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004924 LDLIBRARY='libpython$(VERSION).so'
4925 BLDLIBRARY='-L. -lpython$(VERSION)'
4926 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4927 case $ac_sys_system in
4928 FreeBSD*)
4929 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4930 ;;
4931 esac
4932 INSTSONAME="$LDLIBRARY".$SOVERSION
4933 ;;
4934 hp*|HP*)
4935 case `uname -m` in
4936 ia64)
4937 LDLIBRARY='libpython$(VERSION).so'
4938 ;;
4939 *)
4940 LDLIBRARY='libpython$(VERSION).sl'
4941 ;;
4942 esac
4943 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4944 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4945 ;;
4946 OSF*)
4947 LDLIBRARY='libpython$(VERSION).so'
4948 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4949 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4950 ;;
4951 atheos*)
4952 LDLIBRARY='libpython$(VERSION).so'
4953 BLDLIBRARY='-L. -lpython$(VERSION)'
4954 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4955 ;;
4956 Darwin*)
4957 LDLIBRARY='libpython$(VERSION).dylib'
4958 BLDLIBRARY='-L. -lpython$(VERSION)'
4959 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4960 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00004961 AIX*)
4962 LDLIBRARY='libpython$(VERSION).so'
4963 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4964 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004965
4966 esac
4967else # shared is disabled
4968 case $ac_sys_system in
4969 CYGWIN*)
4970 BLDLIBRARY='$(LIBRARY)'
4971 LDLIBRARY='libpython$(VERSION).dll.a'
4972 ;;
4973 esac
4974fi
4975
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4977$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004978
4979if test -n "$ac_tool_prefix"; then
4980 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4981set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4983$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004984if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004985 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004986else
4987 if test -n "$RANLIB"; then
4988 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4989else
4990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4991for as_dir in $PATH
4992do
4993 IFS=$as_save_IFS
4994 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004995 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004996 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4997 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004999 break 2
5000 fi
5001done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005002 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005003IFS=$as_save_IFS
5004
5005fi
5006fi
5007RANLIB=$ac_cv_prog_RANLIB
5008if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5010$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5013$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005014fi
5015
5016
5017fi
5018if test -z "$ac_cv_prog_RANLIB"; then
5019 ac_ct_RANLIB=$RANLIB
5020 # Extract the first word of "ranlib", so it can be a program name with args.
5021set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5023$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005024if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005025 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005026else
5027 if test -n "$ac_ct_RANLIB"; then
5028 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5029else
5030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5031for as_dir in $PATH
5032do
5033 IFS=$as_save_IFS
5034 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005035 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005036 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5037 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005039 break 2
5040 fi
5041done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005042 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005043IFS=$as_save_IFS
5044
5045fi
5046fi
5047ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5048if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5050$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005051else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5053$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005054fi
5055
5056 if test "x$ac_ct_RANLIB" = x; then
5057 RANLIB=":"
5058 else
5059 case $cross_compiling:$ac_tool_warned in
5060yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005061{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5062$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005063ac_tool_warned=yes ;;
5064esac
5065 RANLIB=$ac_ct_RANLIB
5066 fi
5067else
5068 RANLIB="$ac_cv_prog_RANLIB"
5069fi
5070
5071
5072for ac_prog in ar aal
5073do
5074 # Extract the first word of "$ac_prog", so it can be a program name with args.
5075set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5077$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005078if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005079 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005080else
5081 if test -n "$AR"; then
5082 ac_cv_prog_AR="$AR" # Let the user override the test.
5083else
5084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5085for as_dir in $PATH
5086do
5087 IFS=$as_save_IFS
5088 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005089 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005090 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5091 ac_cv_prog_AR="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005093 break 2
5094 fi
5095done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005096 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005097IFS=$as_save_IFS
5098
5099fi
5100fi
5101AR=$ac_cv_prog_AR
5102if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5104$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005105else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5107$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005108fi
5109
5110
5111 test -n "$AR" && break
5112done
5113test -n "$AR" || AR="ar"
5114
5115
5116# tweak ARFLAGS only if the user didn't set it on the command line
5117
5118if test -z "$ARFLAGS"
5119then
5120 ARFLAGS="rc"
5121fi
5122
5123
5124# Extract the first word of "svnversion", so it can be a program name with args.
5125set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5127$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005128if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005129 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005130else
5131 if test -n "$SVNVERSION"; then
5132 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5133else
5134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5135for as_dir in $PATH
5136do
5137 IFS=$as_save_IFS
5138 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005139 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005140 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5141 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005142 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005143 break 2
5144 fi
5145done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005146 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005147IFS=$as_save_IFS
5148
5149 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5150fi
5151fi
5152SVNVERSION=$ac_cv_prog_SVNVERSION
5153if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5155$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005156else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5158$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005159fi
5160
5161
5162if test $SVNVERSION = found
5163then
5164 SVNVERSION="svnversion \$(srcdir)"
5165else
5166 SVNVERSION="echo Unversioned directory"
5167fi
5168
Georg Brandl3a5508e2011-03-06 10:42:21 +01005169
5170
5171
5172# Extract the first word of "hg", so it can be a program name with args.
5173set dummy hg; ac_word=$2
5174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5175$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005176if test "${ac_cv_prog_HAS_HG+set}" = set; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005177 $as_echo_n "(cached) " >&6
5178else
5179 if test -n "$HAS_HG"; then
5180 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5181else
5182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5183for as_dir in $PATH
5184do
5185 IFS=$as_save_IFS
5186 test -z "$as_dir" && as_dir=.
5187 for ac_exec_ext in '' $ac_executable_extensions; do
5188 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5189 ac_cv_prog_HAS_HG="found"
5190 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5191 break 2
5192 fi
5193done
5194 done
5195IFS=$as_save_IFS
5196
5197 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5198fi
5199fi
5200HAS_HG=$ac_cv_prog_HAS_HG
5201if test -n "$HAS_HG"; then
5202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5203$as_echo "$HAS_HG" >&6; }
5204else
5205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5206$as_echo "no" >&6; }
5207fi
5208
5209
5210if test $HAS_HG = found
5211then
5212 HGVERSION="hg id -i \$(srcdir)"
5213 HGTAG="hg id -t \$(srcdir)"
5214 HGBRANCH="hg id -b \$(srcdir)"
5215else
5216 HGVERSION=""
5217 HGTAG=""
5218 HGBRANCH=""
5219fi
5220
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005221case $MACHDEP in
5222bsdos*|hp*|HP*)
5223 # install -d does not work on BSDI or HP-UX
5224 if test -z "$INSTALL"
5225 then
5226 INSTALL="${srcdir}/install-sh -c"
5227 fi
5228esac
5229ac_aux_dir=
5230for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005231 if test -f "$ac_dir/install-sh"; then
5232 ac_aux_dir=$ac_dir
5233 ac_install_sh="$ac_aux_dir/install-sh -c"
5234 break
5235 elif test -f "$ac_dir/install.sh"; then
5236 ac_aux_dir=$ac_dir
5237 ac_install_sh="$ac_aux_dir/install.sh -c"
5238 break
5239 elif test -f "$ac_dir/shtool"; then
5240 ac_aux_dir=$ac_dir
5241 ac_install_sh="$ac_aux_dir/shtool install -c"
5242 break
5243 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005244done
5245if test -z "$ac_aux_dir"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005246 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005247fi
5248
5249# These three variables are undocumented and unsupported,
5250# and are intended to be withdrawn in a future Autoconf release.
5251# They can cause serious problems if a builder's source tree is in a directory
5252# whose full name contains unusual characters.
5253ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5254ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5255ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5256
5257
5258# Find a good install program. We prefer a C program (faster),
5259# so one script is as good as another. But avoid the broken or
5260# incompatible versions:
5261# SysV /etc/install, /usr/sbin/install
5262# SunOS /usr/etc/install
5263# IRIX /sbin/install
5264# AIX /bin/install
5265# AmigaOS /C/install, which installs bootblocks on floppy discs
5266# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5267# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5268# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5269# OS/2's system install, which has a completely different semantic
5270# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005271# Reject install programs that cannot install multiple files.
5272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5273$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005274if test -z "$INSTALL"; then
Charles-François Natali97781b02011-07-22 23:43:42 +02005275if test "${ac_cv_path_install+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005276 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005277else
5278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5279for as_dir in $PATH
5280do
5281 IFS=$as_save_IFS
5282 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005283 # Account for people who put trailing slashes in PATH elements.
5284case $as_dir/ in #((
5285 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005286 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005287 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005288 /usr/ucb/* ) ;;
5289 *)
5290 # OSF1 and SCO ODT 3.0 have their own names for install.
5291 # Don't use installbsd from OSF since it installs stuff as root
5292 # by default.
5293 for ac_prog in ginstall scoinst install; do
5294 for ac_exec_ext in '' $ac_executable_extensions; do
5295 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5296 if test $ac_prog = install &&
5297 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5298 # AIX install. It has an incompatible calling convention.
5299 :
5300 elif test $ac_prog = install &&
5301 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5302 # program-specific install script used by HP pwplus--don't use.
5303 :
5304 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005305 rm -rf conftest.one conftest.two conftest.dir
5306 echo one > conftest.one
5307 echo two > conftest.two
5308 mkdir conftest.dir
5309 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5310 test -s conftest.one && test -s conftest.two &&
5311 test -s conftest.dir/conftest.one &&
5312 test -s conftest.dir/conftest.two
5313 then
5314 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5315 break 3
5316 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005317 fi
5318 fi
5319 done
5320 done
5321 ;;
5322esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005323
5324 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005325IFS=$as_save_IFS
5326
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005327rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005328
5329fi
5330 if test "${ac_cv_path_install+set}" = set; then
5331 INSTALL=$ac_cv_path_install
5332 else
5333 # As a last resort, use the slow shell script. Don't cache a
5334 # value for INSTALL within a source directory, because that will
5335 # break other packages using the cache if that directory is
5336 # removed, or if the value is a relative name.
5337 INSTALL=$ac_install_sh
5338 fi
5339fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5341$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005342
5343# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5344# It thinks the first close brace ends the variable substitution.
5345test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5346
5347test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5348
5349test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5350
5351
5352# Not every filesystem supports hard links
5353
5354if test -z "$LN" ; then
5355 case $ac_sys_system in
5356 BeOS*) LN="ln -s";;
5357 CYGWIN*) LN="ln -s";;
5358 atheos*) LN="ln -s";;
5359 *) LN=ln;;
5360 esac
5361fi
5362
5363# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5365$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005366
5367# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005368if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005369 withval=$with_pydebug;
5370if test "$withval" != no
5371then
5372
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005373$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005374
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5376$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005377 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005378else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5379$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005380fi
5381else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5383$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005384fi
5385
5386
5387# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5388# merged with this chunk of code?
5389
5390# Optimizer/debugger flags
5391# ------------------------
5392# (The following bit of code is complicated enough - please keep things
5393# indented properly. Just pretend you're editing Python code. ;-)
5394
5395# There are two parallel sets of case statements below, one that checks to
5396# see if OPT was set and one that does BASECFLAGS setting based upon
5397# compiler and platform. BASECFLAGS tweaks need to be made even if the
5398# user set OPT.
5399
5400# tweak OPT based on compiler and platform, only if the user didn't set
5401# it on the command line
5402
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005403if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005404then
5405 case $GCC in
5406 yes)
5407 if test "$CC" != 'g++' ; then
5408 STRICT_PROTO="-Wstrict-prototypes"
5409 fi
5410 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5411 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5412 WRAP="-fwrapv"
5413 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005414
5415 # Clang also needs -fwrapv
5416 if test "$CC" = "clang" ; then
5417 WRAP="-fwrapv"
5418 fi
5419
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005420 case $ac_cv_prog_cc_g in
5421 yes)
5422 if test "$Py_DEBUG" = 'true' ; then
5423 # Optimization messes up debuggers, so turn it off for
5424 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005425 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005426 else
5427 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5428 fi
5429 ;;
5430 *)
5431 OPT="-O3 -Wall $STRICT_PROTO"
5432 ;;
5433 esac
5434 case $ac_sys_system in
5435 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5436 ;;
5437 esac
5438 ;;
5439
5440 *)
5441 OPT="-O"
5442 ;;
5443 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005444fi
5445
5446
5447
5448# The -arch flags for universal builds on OSX
5449UNIVERSAL_ARCH_FLAGS=
5450
5451
5452# tweak BASECFLAGS based on compiler and platform
5453case $GCC in
5454yes)
5455 # Python violates C99 rules, by casting between incompatible
5456 # pointer types. GCC may generate bad code as a result of that,
5457 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5459$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005460 ac_save_cc="$CC"
5461 CC="$CC -fno-strict-aliasing"
Charles-François Natali97781b02011-07-22 23:43:42 +02005462 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005463 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005464else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005466/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005467
5468int
5469main ()
5470{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005471
Gregory P. Smith373469a2009-11-01 21:03:38 +00005472 ;
5473 return 0;
5474}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005475_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005476if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005477 ac_cv_no_strict_aliasing_ok=yes
5478else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005479 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005480fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005482fi
5483
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005484 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5486$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005487 if test $ac_cv_no_strict_aliasing_ok = yes
5488 then
5489 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5490 fi
5491
5492 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5493 # support. Without this, treatment of subnormals doesn't follow
5494 # the standard.
5495 case $ac_sys_machine in
5496 alpha*)
5497 BASECFLAGS="$BASECFLAGS -mieee"
5498 ;;
5499 esac
5500
5501 case $ac_sys_system in
5502 SCO_SV*)
5503 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5504 ;;
5505 # is there any other compiler on Darwin besides gcc?
5506 Darwin*)
5507 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5508 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005509 if test "${CC}" = gcc
5510 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5512$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005513 case "${UNIVERSALSDK}" in
5514 */MacOSX10.4u.sdk)
5515 # Build using 10.4 SDK, force usage of gcc when the
5516 # compiler is gcc, otherwise the user will get very
5517 # confusing error messages when building on OSX 10.6
5518 CC=gcc-4.0
5519 CPP=cpp-4.0
5520 ;;
5521 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5523$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005524 fi
5525
5526 # Calculate the right deployment target for this build.
5527 #
5528 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5529 if test ${cur_target} '>' 10.2; then
5530 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00005531 if test ${enable_universalsdk}; then
5532 if test "${UNIVERSAL_ARCHS}" = "all"; then
5533 # Ensure that the default platform for a
5534 # 4-way universal build is OSX 10.5,
5535 # that's the first OS release where
5536 # 4-way builds make sense.
5537 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00005538
5539 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5540 cur_target='10.5'
5541
5542 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5543 cur_target='10.5'
5544
5545 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5546 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00005547 fi
5548 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00005549 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00005550 # On Intel macs default to a deployment
5551 # target of 10.4, that's the first OSX
5552 # release with Intel support.
5553 cur_target="10.4"
5554 fi
5555 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005556 fi
5557 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5558
5559 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5560 # environment with a value that is the same as what we'll use
5561 # in the Makefile to ensure that we'll get the same compiler
5562 # environment during configure and build time.
5563 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5564 export MACOSX_DEPLOYMENT_TARGET
5565 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5566
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005567 if test "${enable_universalsdk}"; then
5568 UNIVERSAL_ARCH_FLAGS=""
5569 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5570 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5571 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00005572 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005573
5574 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5575 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5576 LIPO_32BIT_FLAGS=""
5577 ARCH_RUN_32BIT="true"
5578
5579 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5580 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5581 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005582 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005583
5584 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5585 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5586 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005587 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005588
5589 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5590 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5591 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00005592 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005593
5594 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005595 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005596
5597 fi
5598
5599
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00005600 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5601 if test "${UNIVERSALSDK}" != "/"
5602 then
5603 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5604 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5605 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005606 fi
5607
5608 fi
5609
5610
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005611 ;;
5612 OSF*)
5613 BASECFLAGS="$BASECFLAGS -mieee"
5614 ;;
5615 esac
5616 ;;
5617
5618*)
5619 case $ac_sys_system in
5620 OpenUNIX*|UnixWare*)
5621 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5622 ;;
5623 OSF*)
5624 BASECFLAGS="$BASECFLAGS -ieee -std"
5625 ;;
5626 SCO_SV*)
5627 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5628 ;;
5629 esac
5630 ;;
5631esac
5632
5633if test "$Py_DEBUG" = 'true'; then
5634 :
5635else
5636 OPT="-DNDEBUG $OPT"
5637fi
5638
5639if test "$ac_arch_flags"
5640then
5641 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5642fi
5643
5644# disable check for icc since it seems to pass, but generates a warning
5645if test "$CC" = icc
5646then
5647 ac_cv_opt_olimit_ok=no
5648fi
5649
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5651$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005652if test "${ac_cv_opt_olimit_ok+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005653 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005654else
5655 ac_save_cc="$CC"
5656CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005658/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005659
5660int
5661main ()
5662{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005663
Gregory P. Smith373469a2009-11-01 21:03:38 +00005664 ;
5665 return 0;
5666}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005667_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005668if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005669 ac_cv_opt_olimit_ok=yes
5670else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005671 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005672
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005673fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005675CC="$ac_save_cc"
5676fi
5677
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5679$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005680if test $ac_cv_opt_olimit_ok = yes; then
5681 case $ac_sys_system in
5682 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5683 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5684 # environment?
5685 Darwin*)
5686 ;;
5687 *)
5688 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5689 ;;
5690 esac
5691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5693$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005694 if test "${ac_cv_olimit_ok+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005695 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005696else
5697 ac_save_cc="$CC"
5698 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005700/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005701
5702int
5703main ()
5704{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005705
Gregory P. Smith373469a2009-11-01 21:03:38 +00005706 ;
5707 return 0;
5708}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005709_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005710if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005711 ac_cv_olimit_ok=yes
5712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005713 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005714
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005715fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005717 CC="$ac_save_cc"
5718fi
5719
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5721$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005722 if test $ac_cv_olimit_ok = yes; then
5723 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5724 fi
5725fi
5726
5727# Check whether GCC supports PyArg_ParseTuple format
5728if test "$GCC" = "yes"
5729then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5731$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005732 save_CFLAGS=$CFLAGS
5733 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005735/* end confdefs.h. */
5736
5737 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005738int
5739main ()
5740{
5741
5742 ;
5743 return 0;
5744}
Matthias Klosec511b472010-05-08 11:01:39 +00005745
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005746_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005747if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005748
Matthias Klosec511b472010-05-08 11:01:39 +00005749
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005750$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005751
Matthias Klosec511b472010-05-08 11:01:39 +00005752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005753$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00005754
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005755else
Matthias Klosec511b472010-05-08 11:01:39 +00005756
5757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005758$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005759
5760fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5762 CFLAGS=$save_CFLAGS
5763fi
5764
5765# On some compilers, pthreads are available without further options
5766# (e.g. MacOS X). On some of these systems, the compiler will not
5767# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5768# So we have to see first whether pthreads are available without
5769# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5771$as_echo_n "checking whether pthreads are available without options... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005772if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005773 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005774else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005775 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005776 ac_cv_pthread_is_default=no
5777else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005779/* end confdefs.h. */
5780
5781#include <pthread.h>
5782
5783void* routine(void* p){return NULL;}
5784
5785int main(){
5786 pthread_t p;
5787 if(pthread_create(&p,NULL,routine,NULL)!=0)
5788 return 1;
5789 (void)pthread_detach(p);
5790 return 0;
5791}
5792
5793_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005794if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005795
5796 ac_cv_pthread_is_default=yes
5797 ac_cv_kthread=no
5798 ac_cv_pthread=no
5799
5800else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005801 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005802fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005803rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5804 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005805fi
5806
5807
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005808fi
5809
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5811$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005812
5813
5814if test $ac_cv_pthread_is_default = yes
5815then
5816 ac_cv_kpthread=no
5817else
5818# -Kpthread, if available, provides the right #defines
5819# and linker options to make pthread_create available
5820# Some compilers won't report that they do not support -Kpthread,
5821# so we need to run a program to see whether it really made the
5822# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5824$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005825if test "${ac_cv_kpthread+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005826 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005827else
5828 ac_save_cc="$CC"
5829CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005830if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005831 ac_cv_kpthread=no
5832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005834/* end confdefs.h. */
5835
5836#include <pthread.h>
5837
5838void* routine(void* p){return NULL;}
5839
5840int main(){
5841 pthread_t p;
5842 if(pthread_create(&p,NULL,routine,NULL)!=0)
5843 return 1;
5844 (void)pthread_detach(p);
5845 return 0;
5846}
5847
5848_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005849if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005850 ac_cv_kpthread=yes
5851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005852 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005853fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5855 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005856fi
5857
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005858CC="$ac_save_cc"
5859fi
5860
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5862$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005863fi
5864
5865if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5866then
5867# -Kthread, if available, provides the right #defines
5868# and linker options to make pthread_create available
5869# Some compilers won't report that they do not support -Kthread,
5870# so we need to run a program to see whether it really made the
5871# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5873$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005874if test "${ac_cv_kthread+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005875 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005876else
5877 ac_save_cc="$CC"
5878CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005879if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005880 ac_cv_kthread=no
5881else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005883/* end confdefs.h. */
5884
5885#include <pthread.h>
5886
5887void* routine(void* p){return NULL;}
5888
5889int main(){
5890 pthread_t p;
5891 if(pthread_create(&p,NULL,routine,NULL)!=0)
5892 return 1;
5893 (void)pthread_detach(p);
5894 return 0;
5895}
5896
5897_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005898if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005899 ac_cv_kthread=yes
5900else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005901 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005902fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5904 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005905fi
5906
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005907CC="$ac_save_cc"
5908fi
5909
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5911$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005912fi
5913
5914if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5915then
5916# -pthread, if available, provides the right #defines
5917# and linker options to make pthread_create available
5918# Some compilers won't report that they do not support -pthread,
5919# so we need to run a program to see whether it really made the
5920# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5922$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005923if test "${ac_cv_thread+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005924 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005925else
5926 ac_save_cc="$CC"
5927CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005928if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005929 ac_cv_pthread=no
5930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005932/* end confdefs.h. */
5933
5934#include <pthread.h>
5935
5936void* routine(void* p){return NULL;}
5937
5938int main(){
5939 pthread_t p;
5940 if(pthread_create(&p,NULL,routine,NULL)!=0)
5941 return 1;
5942 (void)pthread_detach(p);
5943 return 0;
5944}
5945
5946_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005947if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005948 ac_cv_pthread=yes
5949else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005950 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005951fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5953 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005954fi
5955
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005956CC="$ac_save_cc"
5957fi
5958
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5960$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005961fi
5962
5963# If we have set a CC compiler flag for thread support then
5964# check if it works for CXX, too.
5965ac_cv_cxx_thread=no
5966if test ! -z "$CXX"
5967then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5969$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005970ac_save_cxx="$CXX"
5971
5972if test "$ac_cv_kpthread" = "yes"
5973then
5974 CXX="$CXX -Kpthread"
5975 ac_cv_cxx_thread=yes
5976elif test "$ac_cv_kthread" = "yes"
5977then
5978 CXX="$CXX -Kthread"
5979 ac_cv_cxx_thread=yes
5980elif test "$ac_cv_pthread" = "yes"
5981then
5982 CXX="$CXX -pthread"
5983 ac_cv_cxx_thread=yes
5984fi
5985
5986if test $ac_cv_cxx_thread = yes
5987then
5988 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5989 $CXX -c conftest.$ac_ext 2>&5
5990 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5991 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5992 then
5993 ac_cv_cxx_thread=yes
5994 else
5995 ac_cv_cxx_thread=no
5996 fi
5997 rm -fr conftest*
5998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6000$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006001fi
6002CXX="$ac_save_cxx"
6003
6004
6005# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6007$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006008if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006009 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006012/* end confdefs.h. */
6013#include <stdlib.h>
6014#include <stdarg.h>
6015#include <string.h>
6016#include <float.h>
6017
6018int
6019main ()
6020{
6021
6022 ;
6023 return 0;
6024}
6025_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006026if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006027 ac_cv_header_stdc=yes
6028else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006029 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006030fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6032
6033if test $ac_cv_header_stdc = yes; then
6034 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006036/* end confdefs.h. */
6037#include <string.h>
6038
6039_ACEOF
6040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006041 $EGREP "memchr" >/dev/null 2>&1; then :
6042
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006043else
6044 ac_cv_header_stdc=no
6045fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006046rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006047
6048fi
6049
6050if test $ac_cv_header_stdc = yes; then
6051 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006053/* end confdefs.h. */
6054#include <stdlib.h>
6055
6056_ACEOF
6057if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006058 $EGREP "free" >/dev/null 2>&1; then :
6059
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006060else
6061 ac_cv_header_stdc=no
6062fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006063rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006064
6065fi
6066
6067if test $ac_cv_header_stdc = yes; then
6068 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006069 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006070 :
6071else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006073/* end confdefs.h. */
6074#include <ctype.h>
6075#include <stdlib.h>
6076#if ((' ' & 0x0FF) == 0x020)
6077# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6078# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6079#else
6080# define ISLOWER(c) \
6081 (('a' <= (c) && (c) <= 'i') \
6082 || ('j' <= (c) && (c) <= 'r') \
6083 || ('s' <= (c) && (c) <= 'z'))
6084# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6085#endif
6086
6087#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6088int
6089main ()
6090{
6091 int i;
6092 for (i = 0; i < 256; i++)
6093 if (XOR (islower (i), ISLOWER (i))
6094 || toupper (i) != TOUPPER (i))
6095 return 2;
6096 return 0;
6097}
6098_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006099if ac_fn_c_try_run "$LINENO"; then :
6100
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006101else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006102 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006103fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006104rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6105 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006106fi
6107
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006108fi
6109fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6111$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006112if test $ac_cv_header_stdc = yes; then
6113
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006114$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006115
6116fi
6117
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006118for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6119fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006120ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006121shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006122unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006123sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6124sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006125sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00006126sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006127sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00006128sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006129bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006130do :
6131 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6132ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006133if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006134 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006135#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006136_ACEOF
6137
6138fi
6139
Guido van Rossum627b2d71993-12-24 10:39:16 +00006140done
6141
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006142ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006143for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006144 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6146$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006147if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006148 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006149else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006151/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006152#include <sys/types.h>
6153#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006154
Martin v. Löwis11437992002-04-12 09:54:03 +00006155int
6156main ()
6157{
6158if ((DIR *) 0)
6159return 0;
6160 ;
6161 return 0;
6162}
6163_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006164if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006165 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006166else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006167 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006170fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006171eval ac_res=\$$as_ac_Header
6172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6173$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006174if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006175 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006176#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006177_ACEOF
6178
6179ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006180fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006181
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006182done
6183# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6184if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6186$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006187if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006188 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006189else
Martin v. Löwis11437992002-04-12 09:54:03 +00006190 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006193
Martin v. Löwiseba40652007-08-30 20:10:57 +00006194/* Override any GCC internal prototype to avoid an error.
6195 Use char because int might match the return type of a GCC
6196 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006197#ifdef __cplusplus
6198extern "C"
6199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006200char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006201int
6202main ()
6203{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006204return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006205 ;
6206 return 0;
6207}
6208_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006209for ac_lib in '' dir; do
6210 if test -z "$ac_lib"; then
6211 ac_res="none required"
6212 else
6213 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006214 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006215 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006216 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006217 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006218fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006219rm -f core conftest.err conftest.$ac_objext \
6220 conftest$ac_exeext
Charles-François Natali97781b02011-07-22 23:43:42 +02006221 if test "${ac_cv_search_opendir+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006222 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006224done
Charles-François Natali97781b02011-07-22 23:43:42 +02006225if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006226
Martin v. Löwiseba40652007-08-30 20:10:57 +00006227else
6228 ac_cv_search_opendir=no
6229fi
6230rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006231LIBS=$ac_func_search_save_LIBS
6232fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6234$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006235ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006236if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006237 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006238
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006239fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006240
Michael W. Hudson54241132001-12-07 15:38:26 +00006241else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6243$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006244if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006245 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006246else
6247 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006250
Martin v. Löwiseba40652007-08-30 20:10:57 +00006251/* Override any GCC internal prototype to avoid an error.
6252 Use char because int might match the return type of a GCC
6253 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006254#ifdef __cplusplus
6255extern "C"
6256#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006257char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006258int
6259main ()
6260{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006261return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006262 ;
6263 return 0;
6264}
6265_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006266for ac_lib in '' x; do
6267 if test -z "$ac_lib"; then
6268 ac_res="none required"
6269 else
6270 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006271 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006272 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006273 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006274 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006275fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006276rm -f core conftest.err conftest.$ac_objext \
6277 conftest$ac_exeext
Charles-François Natali97781b02011-07-22 23:43:42 +02006278 if test "${ac_cv_search_opendir+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006279 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006281done
Charles-François Natali97781b02011-07-22 23:43:42 +02006282if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006283
Martin v. Löwiseba40652007-08-30 20:10:57 +00006284else
6285 ac_cv_search_opendir=no
6286fi
6287rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006288LIBS=$ac_func_search_save_LIBS
6289fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6291$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006292ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006293if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006294 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006295
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006296fi
6297
6298fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006299
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6301$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006302if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006303 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006306/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006307#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308int
6309main ()
6310{
6311return makedev(0, 0);
6312 ;
6313 return 0;
6314}
6315_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006316if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006317 ac_cv_header_sys_types_h_makedev=yes
6318else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006319 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006320fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006321rm -f core conftest.err conftest.$ac_objext \
6322 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006323
6324fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6326$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006327
6328if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006329ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006330if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006332$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006333
6334fi
6335
6336
6337
6338 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006339 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006340if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006341
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006342$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006343
6344fi
6345
6346
6347 fi
6348fi
6349
Michael W. Hudson54241132001-12-07 15:38:26 +00006350
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006351# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006352for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006353do :
6354 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006355#ifdef HAVE_CURSES_H
6356#include <curses.h>
6357#endif
6358
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006359"
Charles-François Natali97781b02011-07-22 23:43:42 +02006360if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006361 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006362#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006363_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006364
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006365fi
6366
6367done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006368
6369
Martin v. Löwis11017b12006-01-14 18:12:57 +00006370# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006371for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006372do :
6373 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00006374#ifdef HAVE_ASM_TYPES_H
6375#include <asm/types.h>
6376#endif
6377#ifdef HAVE_SYS_SOCKET_H
6378#include <sys/socket.h>
6379#endif
6380
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006381"
Charles-François Natali97781b02011-07-22 23:43:42 +02006382if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006383 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006384#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006385_ACEOF
6386
6387fi
6388
6389done
6390
6391
Guido van Rossum627b2d71993-12-24 10:39:16 +00006392# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006393was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6395$as_echo_n "checking for clock_t in time.h... " >&6; }
6396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006397/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006398#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006399
6400_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006401if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006402 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006403 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006404else
Martin v. Löwis11437992002-04-12 09:54:03 +00006405
6406
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006407$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006408
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006409
Guido van Rossum627b2d71993-12-24 10:39:16 +00006410fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006411rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006412
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6414$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006415
Neal Norwitz11690112002-07-30 01:08:28 +00006416# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6418$as_echo_n "checking for makedev... " >&6; }
6419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006420/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006421
6422#if defined(MAJOR_IN_MKDEV)
6423#include <sys/mkdev.h>
6424#elif defined(MAJOR_IN_SYSMACROS)
6425#include <sys/sysmacros.h>
6426#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006427#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006428#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006429int
6430main ()
6431{
6432 makedev(0, 0)
6433 ;
6434 return 0;
6435}
6436_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006437if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006438 ac_cv_has_makedev=yes
6439else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006440 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006441fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006442rm -f core conftest.err conftest.$ac_objext \
6443 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006444if test "$ac_cv_has_makedev" = "no"; then
6445 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006447/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006448
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006449#define _OSF_SOURCE 1
6450#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006451
Neal Norwitz11690112002-07-30 01:08:28 +00006452int
6453main ()
6454{
6455 makedev(0, 0)
6456 ;
6457 return 0;
6458}
6459_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006460if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006461 ac_cv_has_makedev=yes
6462else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006463 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006464fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006465rm -f core conftest.err conftest.$ac_objext \
6466 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006467 if test "$ac_cv_has_makedev" = "yes"; then
6468
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006469$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006470
6471 fi
6472fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6474$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006475if test "$ac_cv_has_makedev" = "yes"; then
6476
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006477$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006478
6479fi
6480
Martin v. Löwis399a6892002-10-04 10:22:02 +00006481# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6482# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6483# defined, but the compiler does not support pragma redefine_extname,
6484# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6485# structures (such as rlimit64) without declaring them. As a
6486# work-around, disable LFS on such configurations
6487
6488use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6490$as_echo_n "checking Solaris LFS bug... " >&6; }
6491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006492/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006493
6494#define _LARGEFILE_SOURCE 1
6495#define _FILE_OFFSET_BITS 64
6496#include <sys/resource.h>
6497
Martin v. Löwis399a6892002-10-04 10:22:02 +00006498int
6499main ()
6500{
6501struct rlimit foo;
6502 ;
6503 return 0;
6504}
6505_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006506if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006507 sol_lfs_bug=no
6508else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006509 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6513$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006514if test "$sol_lfs_bug" = "yes"; then
6515 use_lfs=no
6516fi
6517
6518if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006519# Two defines needed to enable largefile support on various platforms
6520# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00006521case $ac_sys_system/$ac_sys_release in
6522AIX*)
6523
6524$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6525
6526 ;;
6527esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006528
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006529$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006530
6531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006532$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006533
Martin v. Löwis399a6892002-10-04 10:22:02 +00006534fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006535
Guido van Rossum84e7b241996-08-19 21:59:00 +00006536# Add some code to confdefs.h so that the test for off_t works on SCO
6537cat >> confdefs.h <<\EOF
6538#if defined(SCO_DS)
6539#undef _OFF_T
6540#endif
6541EOF
6542
Guido van Rossumef2255b2000-03-10 22:30:29 +00006543# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006544ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006545if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006546
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006547else
Martin v. Löwis11437992002-04-12 09:54:03 +00006548
6549cat >>confdefs.h <<_ACEOF
6550#define mode_t int
6551_ACEOF
6552
6553fi
6554
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006555ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006556if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006557
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006558else
Martin v. Löwis11437992002-04-12 09:54:03 +00006559
6560cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006561#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006562_ACEOF
6563
6564fi
6565
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006566ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006567if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006568
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006569else
Martin v. Löwis11437992002-04-12 09:54:03 +00006570
6571cat >>confdefs.h <<_ACEOF
6572#define pid_t int
6573_ACEOF
6574
6575fi
6576
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006577
Martin v. Löwis11437992002-04-12 09:54:03 +00006578cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00006579#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006580_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006581
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006582ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006583if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006584
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006585else
Martin v. Löwis11437992002-04-12 09:54:03 +00006586
6587cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006588#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006589_ACEOF
6590
6591fi
6592
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6594$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006595if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006596 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006597else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006599/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006600#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006601
6602_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006603if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006604 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006605 ac_cv_type_uid_t=yes
6606else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006607 ac_cv_type_uid_t=no
6608fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006609rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006610
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006611fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6613$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006614if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006615
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006616$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006617
6618
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006619$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006620
6621fi
6622
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006623ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6624case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006625 no|yes) ;; #(
6626 *)
6627
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006628$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006629
6630
6631cat >>confdefs.h <<_ACEOF
6632#define uint32_t $ac_cv_c_uint32_t
6633_ACEOF
6634;;
6635 esac
6636
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006637ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6638case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006639 no|yes) ;; #(
6640 *)
6641
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006642$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006643
6644
6645cat >>confdefs.h <<_ACEOF
6646#define uint64_t $ac_cv_c_uint64_t
6647_ACEOF
6648;;
6649 esac
6650
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006651ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6652case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006653 no|yes) ;; #(
6654 *)
6655
6656cat >>confdefs.h <<_ACEOF
6657#define int32_t $ac_cv_c_int32_t
6658_ACEOF
6659;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006660esac
6661
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006662ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6663case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006664 no|yes) ;; #(
6665 *)
6666
6667cat >>confdefs.h <<_ACEOF
6668#define int64_t $ac_cv_c_int64_t
6669_ACEOF
6670;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006671esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006672
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006673ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006674if test "x$ac_cv_type_ssize_t" = x""yes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006675
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006676$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006677
6678fi
6679
Jack Jansendd19cf82001-12-06 22:36:17 +00006680
Michael W. Hudson54241132001-12-07 15:38:26 +00006681# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006682# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006683# The cast to long int works around a bug in the HP C Compiler
6684# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6685# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6686# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6688$as_echo_n "checking size of int... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006689if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006690 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006692 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006693
Martin v. Löwis11437992002-04-12 09:54:03 +00006694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006695 if test "$ac_cv_type_int" = yes; then
6696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006698as_fn_error 77 "cannot compute sizeof (int)
Charles-François Natali97781b02011-07-22 23:43:42 +02006699See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006700 else
6701 ac_cv_sizeof_int=0
6702 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006703fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006704
Martin v. Löwis11437992002-04-12 09:54:03 +00006705fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6707$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006708
6709
6710
Martin v. Löwis11437992002-04-12 09:54:03 +00006711cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006712#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006713_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006714
6715
Martin v. Löwiseba40652007-08-30 20:10:57 +00006716# The cast to long int works around a bug in the HP C Compiler
6717# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6718# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6719# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6721$as_echo_n "checking size of long... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006722if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006723 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006724else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006725 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006726
Martin v. Löwis11437992002-04-12 09:54:03 +00006727else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006728 if test "$ac_cv_type_long" = yes; then
6729 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6730$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006731as_fn_error 77 "cannot compute sizeof (long)
Charles-François Natali97781b02011-07-22 23:43:42 +02006732See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006733 else
6734 ac_cv_sizeof_long=0
6735 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006736fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006737
Martin v. Löwis11437992002-04-12 09:54:03 +00006738fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6740$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006741
6742
6743
Martin v. Löwis11437992002-04-12 09:54:03 +00006744cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006745#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006746_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006747
6748
Martin v. Löwiseba40652007-08-30 20:10:57 +00006749# The cast to long int works around a bug in the HP C Compiler
6750# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6751# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6752# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6754$as_echo_n "checking size of void *... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006755if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006756 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006757else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006758 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006759
Martin v. Löwis11437992002-04-12 09:54:03 +00006760else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006761 if test "$ac_cv_type_void_p" = yes; then
6762 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6763$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006764as_fn_error 77 "cannot compute sizeof (void *)
Charles-François Natali97781b02011-07-22 23:43:42 +02006765See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006766 else
6767 ac_cv_sizeof_void_p=0
6768 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006769fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006770
Martin v. Löwis11437992002-04-12 09:54:03 +00006771fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6773$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006774
6775
6776
Martin v. Löwis11437992002-04-12 09:54:03 +00006777cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006778#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006779_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006780
6781
Martin v. Löwiseba40652007-08-30 20:10:57 +00006782# The cast to long int works around a bug in the HP C Compiler
6783# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6784# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6785# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6787$as_echo_n "checking size of short... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006788if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006789 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006790else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006791 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006792
Martin v. Löwis11437992002-04-12 09:54:03 +00006793else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006794 if test "$ac_cv_type_short" = yes; then
6795 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006797as_fn_error 77 "cannot compute sizeof (short)
Charles-François Natali97781b02011-07-22 23:43:42 +02006798See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006799 else
6800 ac_cv_sizeof_short=0
6801 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006802fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006803
Martin v. Löwis11437992002-04-12 09:54:03 +00006804fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6806$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006807
6808
6809
Martin v. Löwis11437992002-04-12 09:54:03 +00006810cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006811#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006812_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006813
6814
Martin v. Löwiseba40652007-08-30 20:10:57 +00006815# The cast to long int works around a bug in the HP C Compiler
6816# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6817# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6818# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6820$as_echo_n "checking size of float... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006821if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006822 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006824 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006825
Martin v. Löwis11437992002-04-12 09:54:03 +00006826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006827 if test "$ac_cv_type_float" = yes; then
6828 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006830as_fn_error 77 "cannot compute sizeof (float)
Charles-François Natali97781b02011-07-22 23:43:42 +02006831See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006832 else
6833 ac_cv_sizeof_float=0
6834 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006835fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006836
Martin v. Löwis11437992002-04-12 09:54:03 +00006837fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6839$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006840
6841
6842
Martin v. Löwis11437992002-04-12 09:54:03 +00006843cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006844#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006845_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006846
6847
Martin v. Löwiseba40652007-08-30 20:10:57 +00006848# The cast to long int works around a bug in the HP C Compiler
6849# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6850# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6851# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6853$as_echo_n "checking size of double... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006854if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006855 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006857 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006858
Martin v. Löwis11437992002-04-12 09:54:03 +00006859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006860 if test "$ac_cv_type_double" = yes; then
6861 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006863as_fn_error 77 "cannot compute sizeof (double)
Charles-François Natali97781b02011-07-22 23:43:42 +02006864See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006865 else
6866 ac_cv_sizeof_double=0
6867 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006869
Martin v. Löwis11437992002-04-12 09:54:03 +00006870fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6872$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006873
6874
6875
Martin v. Löwis11437992002-04-12 09:54:03 +00006876cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006877#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006878_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006879
6880
Martin v. Löwiseba40652007-08-30 20:10:57 +00006881# The cast to long int works around a bug in the HP C Compiler
6882# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6883# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6884# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6886$as_echo_n "checking size of fpos_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006887if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006888 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006889else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006890 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006891
Martin v. Löwis11437992002-04-12 09:54:03 +00006892else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006893 if test "$ac_cv_type_fpos_t" = yes; then
6894 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006896as_fn_error 77 "cannot compute sizeof (fpos_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02006897See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006898 else
6899 ac_cv_sizeof_fpos_t=0
6900 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006901fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006902
Martin v. Löwis11437992002-04-12 09:54:03 +00006903fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6905$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006906
6907
6908
Martin v. Löwis11437992002-04-12 09:54:03 +00006909cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006910#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006911_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006912
Michael W. Hudson54241132001-12-07 15:38:26 +00006913
Martin v. Löwiseba40652007-08-30 20:10:57 +00006914# The cast to long int works around a bug in the HP C Compiler
6915# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6916# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6917# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6919$as_echo_n "checking size of size_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006920if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006921 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006922else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006923 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00006924
Martin v. Löwis18e16552006-02-15 17:27:45 +00006925else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006926 if test "$ac_cv_type_size_t" = yes; then
6927 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6928$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006929as_fn_error 77 "cannot compute sizeof (size_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02006930See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006931 else
6932 ac_cv_sizeof_size_t=0
6933 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006934fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006935
Martin v. Löwis18e16552006-02-15 17:27:45 +00006936fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6938$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006939
6940
6941
Martin v. Löwis18e16552006-02-15 17:27:45 +00006942cat >>confdefs.h <<_ACEOF
6943#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6944_ACEOF
6945
6946
Christian Heimes951cc0f2008-01-31 23:08:23 +00006947# The cast to long int works around a bug in the HP C Compiler
6948# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6949# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6950# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6952$as_echo_n "checking size of pid_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006953if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006954 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00006955else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006956 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes951cc0f2008-01-31 23:08:23 +00006957
Christian Heimes951cc0f2008-01-31 23:08:23 +00006958else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006959 if test "$ac_cv_type_pid_t" = yes; then
6960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006962as_fn_error 77 "cannot compute sizeof (pid_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02006963See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006964 else
6965 ac_cv_sizeof_pid_t=0
6966 fi
6967fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006968
Christian Heimes951cc0f2008-01-31 23:08:23 +00006969fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6971$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006972
6973
6974
6975cat >>confdefs.h <<_ACEOF
6976#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6977_ACEOF
6978
6979
Michael W. Hudson54241132001-12-07 15:38:26 +00006980
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6982$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006983have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006985/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006986
Martin v. Löwis11437992002-04-12 09:54:03 +00006987int
6988main ()
6989{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006990long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006991 ;
6992 return 0;
6993}
6994_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006995if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006996
6997
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006998$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006999
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007000 have_long_long=yes
7001
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7005$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007006if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007007# The cast to long int works around a bug in the HP C Compiler
7008# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7009# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7010# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7012$as_echo_n "checking size of long long... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007013if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007014 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007015else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007016 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007017
Martin v. Löwis11437992002-04-12 09:54:03 +00007018else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007019 if test "$ac_cv_type_long_long" = yes; then
7020 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7021$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007022as_fn_error 77 "cannot compute sizeof (long long)
Charles-François Natali97781b02011-07-22 23:43:42 +02007023See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007024 else
7025 ac_cv_sizeof_long_long=0
7026 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007027fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007028
Martin v. Löwis11437992002-04-12 09:54:03 +00007029fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7031$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007032
7033
7034
Martin v. Löwis11437992002-04-12 09:54:03 +00007035cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007036#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007037_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007038
Michael W. Hudson54241132001-12-07 15:38:26 +00007039
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007040fi
7041
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7043$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007044have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007046/* end confdefs.h. */
7047
7048int
7049main ()
7050{
Matthias Klosec511b472010-05-08 11:01:39 +00007051long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007052 ;
7053 return 0;
7054}
7055_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007056if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007057
7058
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007059$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007060
7061 have_long_double=yes
7062
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007063fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7066$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007067if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007068# The cast to long int works around a bug in the HP C Compiler
7069# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7070# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7071# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7073$as_echo_n "checking size of long double... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007074if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007075 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007076else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007077 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007078
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007080 if test "$ac_cv_type_long_double" = yes; then
7081 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7082$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007083as_fn_error 77 "cannot compute sizeof (long double)
Charles-François Natali97781b02011-07-22 23:43:42 +02007084See \`config.log' for more details" "$LINENO" 5 ; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007085 else
7086 ac_cv_sizeof_long_double=0
7087 fi
7088fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007089
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007090fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7092$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007093
7094
7095
7096cat >>confdefs.h <<_ACEOF
7097#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7098_ACEOF
7099
7100
7101fi
7102
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7104$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007105have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007107/* end confdefs.h. */
7108
7109int
7110main ()
7111{
7112_Bool x; x = (_Bool)0;
7113 ;
7114 return 0;
7115}
7116_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007117if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007118
7119
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007120$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007121
7122 have_c99_bool=yes
7123
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7127$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007128if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007129# The cast to long int works around a bug in the HP C Compiler
7130# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7131# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7132# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7134$as_echo_n "checking size of _Bool... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007135if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007136 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007137else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007138 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007139
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007140else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007141 if test "$ac_cv_type__Bool" = yes; then
7142 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7143$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007144as_fn_error 77 "cannot compute sizeof (_Bool)
Charles-François Natali97781b02011-07-22 23:43:42 +02007145See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007146 else
7147 ac_cv_sizeof__Bool=0
7148 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007149fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007150
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007151fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7153$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007154
7155
7156
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007157cat >>confdefs.h <<_ACEOF
7158#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7159_ACEOF
7160
7161
7162fi
7163
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007164ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007165 #include <stdint.h>
7166 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007167 #ifdef HAVE_INTTYPES_H
7168 #include <inttypes.h>
7169 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007170"
Charles-François Natali97781b02011-07-22 23:43:42 +02007171if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007172
7173cat >>confdefs.h <<_ACEOF
7174#define HAVE_UINTPTR_T 1
7175_ACEOF
7176
Martin v. Löwiseba40652007-08-30 20:10:57 +00007177# The cast to long int works around a bug in the HP C Compiler
7178# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7179# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7180# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7182$as_echo_n "checking size of uintptr_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007183if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007184 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007185else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007186 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007187
Martin v. Löwis11437992002-04-12 09:54:03 +00007188else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007189 if test "$ac_cv_type_uintptr_t" = yes; then
7190 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007192as_fn_error 77 "cannot compute sizeof (uintptr_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007193See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007194 else
7195 ac_cv_sizeof_uintptr_t=0
7196 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007197fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007198
Martin v. Löwis11437992002-04-12 09:54:03 +00007199fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7201$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007202
7203
7204
Martin v. Löwis11437992002-04-12 09:54:03 +00007205cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007206#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007207_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007208
Michael W. Hudson54241132001-12-07 15:38:26 +00007209
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007210fi
7211
Martin v. Löwisebe26702006-10-02 14:55:51 +00007212
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007213# The cast to long int works around a bug in the HP C Compiler
7214# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7215# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7216# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7218$as_echo_n "checking size of off_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007219if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007220 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007221else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007222 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007223#ifdef HAVE_SYS_TYPES_H
7224#include <sys/types.h>
7225#endif
7226
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007227"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007228
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007229else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007230 if test "$ac_cv_type_off_t" = yes; then
7231 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7232$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007233as_fn_error 77 "cannot compute sizeof (off_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007234See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007235 else
7236 ac_cv_sizeof_off_t=0
7237 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007238fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007239
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007240fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7242$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007243
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007244
7245
Martin v. Löwis11437992002-04-12 09:54:03 +00007246cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007247#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007248_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007249
Michael W. Hudson54241132001-12-07 15:38:26 +00007250
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007251
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7253$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007254if test "$have_long_long" = yes
7255then
7256if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007257 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007258
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007259$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007260
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7262$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007263else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7265$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007266fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7269$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007270fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007271
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007272# The cast to long int works around a bug in the HP C Compiler
7273# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7274# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7275# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7277$as_echo_n "checking size of time_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007278if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007279 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007280else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007281 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007282#ifdef HAVE_SYS_TYPES_H
7283#include <sys/types.h>
7284#endif
7285#ifdef HAVE_TIME_H
7286#include <time.h>
7287#endif
7288
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007289"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007290
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007291else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007292 if test "$ac_cv_type_time_t" = yes; then
7293 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007295as_fn_error 77 "cannot compute sizeof (time_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007296See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007297 else
7298 ac_cv_sizeof_time_t=0
7299 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007300fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007301
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007302fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7304$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007305
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007306
7307
Martin v. Löwis11437992002-04-12 09:54:03 +00007308cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007309#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007310_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007311
Michael W. Hudson54241132001-12-07 15:38:26 +00007312
7313
Trent Mick635f6fb2000-08-23 21:33:05 +00007314# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007315ac_save_cc="$CC"
7316if test "$ac_cv_kpthread" = "yes"
7317then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007318elif test "$ac_cv_kthread" = "yes"
7319then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007320elif test "$ac_cv_pthread" = "yes"
7321then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007322fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7324$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007325have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007327/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007328
7329 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007330int
7331main ()
7332{
Guido van Rossum12580492000-09-24 16:47:19 +00007333pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007334 ;
7335 return 0;
7336}
Matthias Klosec511b472010-05-08 11:01:39 +00007337
Martin v. Löwis11437992002-04-12 09:54:03 +00007338_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007339if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007340 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7344$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007345if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007346 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007347# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7348# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7349# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7351$as_echo_n "checking size of pthread_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007352if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007353 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007354else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007355 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007356#ifdef HAVE_PTHREAD_H
7357#include <pthread.h>
7358#endif
7359
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007360"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007361
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007362else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007363 if test "$ac_cv_type_pthread_t" = yes; then
7364 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7365$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007366as_fn_error 77 "cannot compute sizeof (pthread_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007367See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007368 else
7369 ac_cv_sizeof_pthread_t=0
7370 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007371fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007372
Trent Mick635f6fb2000-08-23 21:33:05 +00007373fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7375$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007376
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007377
7378
Martin v. Löwis11437992002-04-12 09:54:03 +00007379cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007380#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007381_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007382
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007383
Trent Mick635f6fb2000-08-23 21:33:05 +00007384fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007385CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007386
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7388$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007389# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007390if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007391 enableval=$enable_toolbox_glue;
7392fi
Jack Jansene578a632001-08-15 01:27:14 +00007393
7394
7395if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007396then
Jack Jansene578a632001-08-15 01:27:14 +00007397 case $ac_sys_system/$ac_sys_release in
7398 Darwin/*)
7399 enable_toolbox_glue="yes";;
7400 *)
7401 enable_toolbox_glue="no";;
7402 esac
7403fi
7404case "$enable_toolbox_glue" in
7405yes)
Jack Jansene578a632001-08-15 01:27:14 +00007406 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007407 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007408
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007409$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007410
7411 ;;
7412*)
Jack Jansene578a632001-08-15 01:27:14 +00007413 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007414 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007415 ;;
7416esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7418$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007419
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007420
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007421
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007422case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007423 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007424 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7425 ;;
7426 Darwin/*)
7427 OTHER_LIBTOOL_OPT=""
7428 ;;
7429esac
7430
7431
Ronald Oussoren25967582009-09-06 10:00:26 +00007432ARCH_RUN_32BIT=""
7433
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007434case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007435 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007436 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7437 if test "${enable_universalsdk}"; then
7438 :
7439 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007440 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007441 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007442 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007443 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007444 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007445 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007446 if test ${gcc_version} '<' 4.0
7447 then
7448 LIBTOOL_CRUFT="-lcc_dynamic"
7449 else
7450 LIBTOOL_CRUFT=""
7451 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007452 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00007453 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00007454else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007456/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00007457
Ronald Oussoren25967582009-09-06 10:00:26 +00007458 #include <unistd.h>
7459 int main(int argc, char*argv[])
7460 {
7461 if (sizeof(long) == 4) {
7462 return 0;
7463 } else {
7464 return 1;
7465 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00007466 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00007467
Ronald Oussoren25967582009-09-06 10:00:26 +00007468_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007469if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00007470 ac_osx_32bit=yes
7471else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007472 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00007473fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7475 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007476fi
7477
7478
Ronald Oussoren25967582009-09-06 10:00:26 +00007479 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007480 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007481 i386)
7482 MACOSX_DEFAULT_ARCH="i386"
7483 ;;
7484 ppc)
7485 MACOSX_DEFAULT_ARCH="ppc"
7486 ;;
7487 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007488 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007489 ;;
7490 esac
7491 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007492 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007493 i386)
7494 MACOSX_DEFAULT_ARCH="x86_64"
7495 ;;
7496 ppc)
7497 MACOSX_DEFAULT_ARCH="ppc64"
7498 ;;
7499 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007500 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007501 ;;
7502 esac
7503
7504 #ARCH_RUN_32BIT="true"
7505 fi
7506
7507 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007508 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007509 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007510esac
7511
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7513$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007514if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007515then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007516 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007517 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007518 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007519
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007520$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007521
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7523$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00007524 if test $enable_shared = "yes"
7525 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007526 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." "$LINENO" 5
Ronald Oussoren450d5612009-06-08 21:12:41 +00007527 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007528else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7530$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007531fi
7532
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7534$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007535case $ac_sys_system/$ac_sys_release in
7536 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007537
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007538$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007539
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7541$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007542 ;;
7543 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7545$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007546 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007547esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007548
Guido van Rossum0a516c91994-09-12 10:58:40 +00007549# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007550
Michael W. Hudson54241132001-12-07 15:38:26 +00007551
7552
7553
7554
Ronald Oussoren75912852010-04-08 08:13:31 +00007555
Guido van Rossum0a516c91994-09-12 10:58:40 +00007556# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007557# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7559$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007560if test -z "$SO"
7561then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007562 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00007563 hp*|HP*)
7564 case `uname -m` in
7565 ia64) SO=.so;;
7566 *) SO=.sl;;
7567 esac
7568 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007569 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007570 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007571 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007572else
7573 # this might also be a termcap variable, see #610332
7574 echo
7575 echo '====================================================================='
7576 echo '+ +'
7577 echo '+ WARNING: You have set SO in your environment. +'
7578 echo '+ Do you really mean to change the extension for shared libraries? +'
7579 echo '+ Continuing in 10 seconds to let you to ponder. +'
7580 echo '+ +'
7581 echo '====================================================================='
7582 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007583fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7585$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00007586
Ronald Oussoren79f90492009-01-02 10:44:46 +00007587
Neal Norwitz58e28882006-05-19 07:00:58 +00007588cat >>confdefs.h <<_ACEOF
7589#define SHLIB_EXT "$SO"
7590_ACEOF
7591
Guido van Rossum0a516c91994-09-12 10:58:40 +00007592# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007593# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007594# (Shared libraries in this instance are shared modules to be loaded into
7595# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7597$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007598if test -z "$LDSHARED"
7599then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007600 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007601 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007602 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007603 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007604 ;;
7605 BeOS*)
7606 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00007607 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007608 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007609 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007610 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007611 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007612 if test "$GCC" = "yes" ; then
7613 LDSHARED='$(CC) -shared'
7614 LDCXXSHARED='$(CXX) -shared'
7615 else
7616 LDSHARED='$(CC) -G'
7617 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00007618 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00007619 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007620 if test "$GCC" = "yes" ; then
7621 LDSHARED='$(CC) -shared'
7622 LDCXXSHARED='$(CXX) -shared'
7623 else
7624 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00007625 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007626 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007627 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007628 LDSHARED='$(CC) -bundle'
7629 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007630 if test "$enable_framework" ; then
7631 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007632 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7633 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007634 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007635 else
7636 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007637 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00007638 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007639 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007640 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007641 LDSHARED='$(CC) -bundle'
7642 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007643 if test "$enable_framework" ; then
7644 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007645 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7646 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007647 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007648 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007649 # No framework, use the Python app as bundle-loader
7650 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007651 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007652 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007653 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007654 Darwin/*)
7655 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7656 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00007657
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007658 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007659 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00007660 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007661 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007662 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00007663 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7664 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007665 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007666 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007667 LDSHARED='$(CC) -bundle'
7668 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007669 if test "$enable_framework" ; then
7670 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007671 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7672 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007673 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007674 else
7675 # No framework, use the Python app as bundle-loader
7676 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7677 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007678 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007679 fi
7680 fi
7681 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007682 Linux*|GNU*|QNX*)
7683 LDSHARED='$(CC) -shared'
7684 LDCXXSHARED='$(CXX) -shared';;
7685 BSD/OS*/4*)
7686 LDSHARED="gcc -shared"
7687 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007688 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007689 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007690 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007691 LDSHARED='$(CC) -shared'
7692 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007693 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007694 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007695 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007696 OpenBSD*)
7697 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7698 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007699 LDSHARED='$(CC) -shared $(CCSHARED)'
7700 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007701 else
7702 case `uname -r` in
7703 [01].* | 2.[0-7] | 2.[0-7].*)
7704 LDSHARED="ld -Bshareable ${LDFLAGS}"
7705 ;;
7706 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007707 LDSHARED='$(CC) -shared $(CCSHARED)'
7708 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007709 ;;
7710 esac
7711 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007712 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00007713 LDSHARED='$(CC) -shared'
7714 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007715 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007716 if test "$GCC" = "yes" ; then
7717 LDSHARED='$(CC) -shared'
7718 LDCXXSHARED='$(CXX) -shared'
7719 else
7720 LDSHARED='$(CC) -G'
7721 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007722 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007723 SCO_SV*)
7724 LDSHARED='$(CC) -Wl,-G,-Bexport'
7725 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7726 CYGWIN*)
7727 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7728 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7729 atheos*)
7730 LDSHARED="gcc -shared"
7731 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007732 *) LDSHARED="ld";;
7733 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007734fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7736$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00007737LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007738BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007739# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007740# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7742$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007743if test -z "$CCSHARED"
7744then
Guido van Rossum07397971997-04-29 21:49:50 +00007745 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007746 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00007747 then CCSHARED="-fPIC";
7748 elif test `uname -p` = sparc;
7749 then CCSHARED="-xcode=pic32";
7750 else CCSHARED="-Kpic";
7751 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007752 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007753 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007754 else CCSHARED="+z";
7755 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007756 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007757 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007758 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007759 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007760 if test "$GCC" = "yes"
7761 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007762 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007763 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007764 SCO_SV*)
7765 if test "$GCC" = "yes"
7766 then CCSHARED="-fPIC"
7767 else CCSHARED="-Kpic -belf"
7768 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007769 IRIX*/6*) case $CC in
7770 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007771 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007772 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007773 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007774 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007775fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7777$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007778# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007779# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7781$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007782if test -z "$LINKFORSHARED"
7783then
Guido van Rossum07397971997-04-29 21:49:50 +00007784 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007785 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007786 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007787 LINKFORSHARED="-Wl,-E -Wl,+s";;
7788# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007789 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007790 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007791 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007793 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7794 # which is
Jack Jansene578a632001-08-15 01:27:14 +00007795 # not used by the core itself but which needs to be in the core so
7796 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00007797 # -prebind is no longer used, because it actually seems to give a
7798 # slowdown in stead of a speedup, maybe due to the large number of
7799 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007800
7801 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00007802 if test "$enable_framework"
7803 then
Jack Jansenda49e192005-01-07 13:08:22 +00007804 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007805 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007806 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007807 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007808 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007809 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007810 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007811 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7812 then
7813 LINKFORSHARED="-Wl,--export-dynamic"
7814 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007815 SunOS/5*) case $CC in
7816 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007817 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007818 then
7819 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007820 fi;;
7821 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007822 CYGWIN*)
7823 if test $enable_shared = "no"
7824 then
7825 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7826 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007827 QNX*)
7828 # -Wl,-E causes the symbols to be added to the dynamic
7829 # symbol table so that they can be found when a module
7830 # is loaded. -N 2048K causes the stack size to be set
7831 # to 2048 kilobytes so that the stack doesn't overflow
7832 # when running test_compile.py.
7833 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007834 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007835fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7837$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007838
Michael W. Hudson54241132001-12-07 15:38:26 +00007839
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007840
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7842$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007843if test ! "$LIBRARY" = "$LDLIBRARY"
7844then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007845 case $ac_sys_system in
7846 CYGWIN*)
7847 # Cygwin needs CCSHARED when building extension DLLs
7848 # but not when building the interpreter DLL.
7849 CFLAGSFORSHARED='';;
7850 *)
7851 CFLAGSFORSHARED='$(CCSHARED)'
7852 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007853fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7855$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007856
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007857# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7858# library (with --enable-shared).
7859# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007860# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7861# if it is not required, since it creates a dependency of the shared library
7862# to LIBS. This, in turn, means that applications linking the shared libpython
7863# don't need to link LIBS explicitly. The default should be only changed
7864# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007865
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7867$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007868case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007869 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007870 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007871esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7873$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007874
7875
Guido van Rossum627b2d71993-12-24 10:39:16 +00007876# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7878$as_echo_n "checking for dlopen in -ldl... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007879if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007880 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007881else
Martin v. Löwis11437992002-04-12 09:54:03 +00007882 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007883LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007886
Martin v. Löwiseba40652007-08-30 20:10:57 +00007887/* Override any GCC internal prototype to avoid an error.
7888 Use char because int might match the return type of a GCC
7889 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007890#ifdef __cplusplus
7891extern "C"
7892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007893char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007894int
7895main ()
7896{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007897return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007898 ;
7899 return 0;
7900}
7901_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007902if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007903 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007905 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007906fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007907rm -f core conftest.err conftest.$ac_objext \
7908 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007909LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007910fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7912$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007913if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007914 cat >>confdefs.h <<_ACEOF
7915#define HAVE_LIBDL 1
7916_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007917
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007918 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007919
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007920fi
7921 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7923$as_echo_n "checking for shl_load in -ldld... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007924if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007925 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007926else
Martin v. Löwis11437992002-04-12 09:54:03 +00007927 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007928LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007931
Martin v. Löwiseba40652007-08-30 20:10:57 +00007932/* Override any GCC internal prototype to avoid an error.
7933 Use char because int might match the return type of a GCC
7934 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007935#ifdef __cplusplus
7936extern "C"
7937#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007938char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007939int
7940main ()
7941{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007942return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007943 ;
7944 return 0;
7945}
7946_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007947if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007948 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007949else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007950 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007951fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007952rm -f core conftest.err conftest.$ac_objext \
7953 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007954LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007955fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7957$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007958if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 cat >>confdefs.h <<_ACEOF
7960#define HAVE_LIBDLD 1
7961_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007962
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007963 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007964
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007965fi
7966 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007967
Ronald Oussoren79f90492009-01-02 10:44:46 +00007968# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007969if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7971$as_echo_n "checking for library containing sem_init... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007972if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007973 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007974else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007975 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007978
Martin v. Löwiseba40652007-08-30 20:10:57 +00007979/* Override any GCC internal prototype to avoid an error.
7980 Use char because int might match the return type of a GCC
7981 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007982#ifdef __cplusplus
7983extern "C"
7984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007985char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007986int
7987main ()
7988{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007989return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007990 ;
7991 return 0;
7992}
7993_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007994for ac_lib in '' pthread rt posix4; do
7995 if test -z "$ac_lib"; then
7996 ac_res="none required"
7997 else
7998 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007999 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008000 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008001 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008002 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008003fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008004rm -f core conftest.err conftest.$ac_objext \
8005 conftest$ac_exeext
Charles-François Natali97781b02011-07-22 23:43:42 +02008006 if test "${ac_cv_search_sem_init+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008007 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008009done
Charles-François Natali97781b02011-07-22 23:43:42 +02008010if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008011
Martin v. Löwiseba40652007-08-30 20:10:57 +00008012else
8013 ac_cv_search_sem_init=no
8014fi
8015rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008016LIBS=$ac_func_search_save_LIBS
8017fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8019$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008020ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008021if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008022 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008023
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008024fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008025 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008026 # posix4 on Solaris 2.6
8027 # pthread (first!) on Linux
8028fi
8029
Martin v. Löwis19d17342003-06-14 21:03:05 +00008030# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8032$as_echo_n "checking for textdomain in -lintl... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008033if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008034 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008035else
8036 ac_check_lib_save_LIBS=$LIBS
8037LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008039/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008040
Martin v. Löwiseba40652007-08-30 20:10:57 +00008041/* Override any GCC internal prototype to avoid an error.
8042 Use char because int might match the return type of a GCC
8043 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008044#ifdef __cplusplus
8045extern "C"
8046#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008047char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008048int
8049main ()
8050{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008051return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008052 ;
8053 return 0;
8054}
8055_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008056if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008057 ac_cv_lib_intl_textdomain=yes
8058else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008059 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008060fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008061rm -f core conftest.err conftest.$ac_objext \
8062 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008063LIBS=$ac_check_lib_save_LIBS
8064fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8066$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008067if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008068
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008069$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008070
8071fi
8072
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008073
8074# checks for system dependent C++ extensions support
8075case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008076 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8077$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008079/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008080
Georg Brandl94800df2011-02-25 11:09:02 +00008081 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008082int
8083main ()
8084{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008085loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008086 ;
8087 return 0;
8088}
Matthias Klosec511b472010-05-08 11:01:39 +00008089
Martin v. Löwis11437992002-04-12 09:54:03 +00008090_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008091if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008092
Matthias Klosec511b472010-05-08 11:01:39 +00008093
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008094$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008095
Matthias Klosec511b472010-05-08 11:01:39 +00008096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008097$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008098
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008099else
Matthias Klosec511b472010-05-08 11:01:39 +00008100
8101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008102$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008103
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008104fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008105rm -f core conftest.err conftest.$ac_objext \
8106 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008107 *) ;;
8108esac
8109
Guido van Rossum70c7f481998-03-26 18:44:10 +00008110# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008111# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8113$as_echo_n "checking for t_open in -lnsl... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008114if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008115 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008116else
Martin v. Löwis11437992002-04-12 09:54:03 +00008117 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008118LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008121
Martin v. Löwiseba40652007-08-30 20:10:57 +00008122/* Override any GCC internal prototype to avoid an error.
8123 Use char because int might match the return type of a GCC
8124 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008125#ifdef __cplusplus
8126extern "C"
8127#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008128char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008129int
8130main ()
8131{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008132return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008133 ;
8134 return 0;
8135}
8136_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008137if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008138 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008139else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008140 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008141fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008142rm -f core conftest.err conftest.$ac_objext \
8143 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008144LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008145fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8147$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008148if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008149 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008150fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008151 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8153$as_echo_n "checking for socket in -lsocket... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008154if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008155 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008156else
Martin v. Löwis11437992002-04-12 09:54:03 +00008157 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008158LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008161
Martin v. Löwiseba40652007-08-30 20:10:57 +00008162/* Override any GCC internal prototype to avoid an error.
8163 Use char because int might match the return type of a GCC
8164 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008165#ifdef __cplusplus
8166extern "C"
8167#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008168char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008169int
8170main ()
8171{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008172return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008173 ;
8174 return 0;
8175}
8176_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008177if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008178 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008179else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008180 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008181fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008182rm -f core conftest.err conftest.$ac_objext \
8183 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008184LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008185fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8187$as_echo "$ac_cv_lib_socket_socket" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008188if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008189 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008190fi
8191 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008192
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008193case "$ac_sys_system" in
8194BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8196$as_echo_n "checking for socket in -lnet... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008197if test "${ac_cv_lib_net_socket+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008198 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008199else
Martin v. Löwis11437992002-04-12 09:54:03 +00008200 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008201LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008204
Martin v. Löwiseba40652007-08-30 20:10:57 +00008205/* Override any GCC internal prototype to avoid an error.
8206 Use char because int might match the return type of a GCC
8207 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008208#ifdef __cplusplus
8209extern "C"
8210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008211char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008212int
8213main ()
8214{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008215return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008216 ;
8217 return 0;
8218}
8219_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008220if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008221 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008222else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008223 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008224fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008225rm -f core conftest.err conftest.$ac_objext \
8226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008227LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008228fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8230$as_echo "$ac_cv_lib_net_socket" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008231if test "x$ac_cv_lib_net_socket" = x""yes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008232 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008233fi
8234 # BeOS
8235;;
8236esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008237
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8239$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
Martin v. Löwiseba40652007-08-30 20:10:57 +00008241# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008242if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008243 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8245$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008246LIBS="$withval $LIBS"
8247
8248else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8250$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008251fi
8252
Guido van Rossum7f43da71994-08-01 12:15:30 +00008253
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008254if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008255 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8256set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8258$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008259if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008260 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008261else
8262 case $PKG_CONFIG in
8263 [\\/]* | ?:[\\/]*)
8264 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8265 ;;
8266 *)
8267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8268for as_dir in $PATH
8269do
8270 IFS=$as_save_IFS
8271 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008272 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008273 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8274 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008275 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008276 break 2
8277 fi
8278done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008279 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008280IFS=$as_save_IFS
8281
8282 ;;
8283esac
8284fi
8285PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8286if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8288$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008289else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8291$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008292fi
8293
8294
8295fi
8296if test -z "$ac_cv_path_PKG_CONFIG"; then
8297 ac_pt_PKG_CONFIG=$PKG_CONFIG
8298 # Extract the first word of "pkg-config", so it can be a program name with args.
8299set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8301$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008302if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008303 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008304else
8305 case $ac_pt_PKG_CONFIG in
8306 [\\/]* | ?:[\\/]*)
8307 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8308 ;;
8309 *)
8310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8311for as_dir in $PATH
8312do
8313 IFS=$as_save_IFS
8314 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008315 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008316 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8317 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008318 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008319 break 2
8320 fi
8321done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008322 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008323IFS=$as_save_IFS
8324
8325 ;;
8326esac
8327fi
8328ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8329if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8331$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008332else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8334$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008335fi
8336
8337 if test "x$ac_pt_PKG_CONFIG" = x; then
8338 PKG_CONFIG=""
8339 else
8340 case $cross_compiling:$ac_tool_warned in
8341yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008342{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8343$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008344ac_tool_warned=yes ;;
8345esac
8346 PKG_CONFIG=$ac_pt_PKG_CONFIG
8347 fi
8348else
8349 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8350fi
8351
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008352
8353# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8355$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008356
8357# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008358if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008359 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008360else
8361 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008362fi
8363
8364
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8366$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008367
8368# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8370$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008371
8372# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008373if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008374 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008375else
8376 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008377fi
8378
8379
8380if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008381 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8382else
8383 LIBFFI_INCLUDEDIR=""
8384fi
8385
8386
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8388$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008389
Benjamin Peterson867475c2009-04-29 20:36:25 +00008390# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8392$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008393
8394# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008395if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008396 withval=$with_dbmliborder;
8397if test x$with_dbmliborder = xyes
8398then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008399as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008400else
8401 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8402 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8403 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008404 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008405 fi
8406 done
8407fi
8408fi
8409
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8411$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008412
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008413# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008414
8415
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8417$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008418
Martin v. Löwiseba40652007-08-30 20:10:57 +00008419# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008420if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008421 withval=$with_signal_module;
8422fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008423
8424
8425if test -z "$with_signal_module"
8426then with_signal_module="yes"
8427fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8429$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008430
8431if test "${with_signal_module}" = "yes"; then
8432 USE_SIGNAL_MODULE=""
8433 SIGNAL_OBJS=""
8434else
8435 USE_SIGNAL_MODULE="#"
8436 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8437fi
8438
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008439# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008440
Barry Warsawc0d24d82000-06-29 16:12:00 +00008441USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008442
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8444$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008445
Guido van Rossumec2f0731997-01-22 20:54:01 +00008446
Martin v. Löwiseba40652007-08-30 20:10:57 +00008447# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008448if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008449 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8451$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008452LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008453if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008454 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008455fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008456else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8458$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008459fi
8460
Martin v. Löwis11437992002-04-12 09:54:03 +00008461
8462# Templates for things AC_DEFINEd more than once.
8463# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008464
8465
Martin v. Löwis11437992002-04-12 09:54:03 +00008466
8467
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8469$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008470
Martin v. Löwiseba40652007-08-30 20:10:57 +00008471# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008472if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008473 withval=$with_threads;
8474fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008475
8476
Barry Warsawc0d24d82000-06-29 16:12:00 +00008477# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008478
Martin v. Löwiseba40652007-08-30 20:10:57 +00008479# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008480if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008481 withval=$with_thread; with_threads=$with_thread
8482fi
8483
Barry Warsawc0d24d82000-06-29 16:12:00 +00008484
8485if test -z "$with_threads"
8486then with_threads="yes"
8487fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8489$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00008490
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008491
Barry Warsawc0d24d82000-06-29 16:12:00 +00008492if test "$with_threads" = "no"
8493then
8494 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008495elif test "$ac_cv_pthread_is_default" = yes
8496then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008497 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008498
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008499 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008500 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008501
8502 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008504elif test "$ac_cv_kpthread" = "yes"
8505then
8506 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008507 if test "$ac_cv_cxx_thread" = "yes"; then
8508 CXX="$CXX -Kpthread"
8509 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008510 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008511
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008512 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008513 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008514elif test "$ac_cv_kthread" = "yes"
8515then
8516 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008517 if test "$ac_cv_cxx_thread" = "yes"; then
8518 CXX="$CXX -Kthread"
8519 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008520 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008521
8522 posix_threads=yes
8523 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008524elif test "$ac_cv_pthread" = "yes"
8525then
8526 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008527 if test "$ac_cv_cxx_thread" = "yes"; then
8528 CXX="$CXX -pthread"
8529 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008530 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008531
8532 posix_threads=yes
8533 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008534else
8535 if test ! -z "$with_threads" -a -d "$with_threads"
8536 then LDFLAGS="$LDFLAGS -L$with_threads"
8537 fi
8538 if test ! -z "$withval" -a -d "$withval"
8539 then LDFLAGS="$LDFLAGS -L$withval"
8540 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008541
8542 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008543 # define _POSIX_THREADS in unistd.h. Some apparently don't
8544 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8546$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008548/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008549
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008550#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008551#ifdef _POSIX_THREADS
8552yes
8553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008554
8555_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008556if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008557 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008558 unistd_defines_pthreads=yes
8559else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008560 unistd_defines_pthreads=no
8561fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00008562rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008563
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8565$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008566
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008567 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008568
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008569 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02008570if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008571 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008572
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008573 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008574
Martin v. Löwis11437992002-04-12 09:54:03 +00008575
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008576$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008577
8578 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008579 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008580else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008581
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008582 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02008583if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008584 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008585
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008586 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008587
Martin v. Löwis11437992002-04-12 09:54:03 +00008588
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008589$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008590
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008591 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008592else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008593
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8595$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008596
Martin v. Löwiseba40652007-08-30 20:10:57 +00008597# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008598if test "${with_pth+set}" = set; then :
8599 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8600$as_echo "$withval" >&6; }
8601 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008602
8603
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008604$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008605
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008606 LIBS="-lpth $LIBS"
8607 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008608else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8610$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008611
8612 # Just looking for pthread_create in libpthread is not enough:
8613 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8614 # So we really have to include pthread.h, and then link.
8615 _libs=$LIBS
8616 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8618$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008620/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008621#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008622
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008623void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008624int
8625main ()
8626{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008627
8628pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 ;
8630 return 0;
8631}
8632_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008633if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008634
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8636$as_echo "yes" >&6; }
8637 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008638
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008639 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008640 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008641else
Martin v. Löwis11437992002-04-12 09:54:03 +00008642
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008643 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008644 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Charles-François Natali97781b02011-07-22 23:43:42 +02008645if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008646 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008647
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008648 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008649 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008650else
Guido van Rossumad678af1998-10-02 14:42:15 +00008651
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008652 ac_fn_c_check_header_mongrel "$LINENO" "atheos/threads.h" "ac_cv_header_atheos_threads_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02008653if test "x$ac_cv_header_atheos_threads_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008654 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008655
8656
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008657$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008658
8659 THREADOBJ="Python/thread.o"
8660else
8661
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008662 ac_fn_c_check_header_mongrel "$LINENO" "kernel/OS.h" "ac_cv_header_kernel_OS_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02008663if test "x$ac_cv_header_kernel_OS_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008664 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008665
8666
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008667$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008668
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008669 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008670else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008671
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8673$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008674if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008675 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008676else
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008678LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008681
Martin v. Löwiseba40652007-08-30 20:10:57 +00008682/* Override any GCC internal prototype to avoid an error.
8683 Use char because int might match the return type of a GCC
8684 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008685#ifdef __cplusplus
8686extern "C"
8687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008688char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008689int
8690main ()
8691{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008692return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008693 ;
8694 return 0;
8695}
8696_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008697if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008700 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008701fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008702rm -f core conftest.err conftest.$ac_objext \
8703 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008704LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008705fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8707$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008708if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008709 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008710
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008711 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008712 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008713 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008714else
Greg Steinadf63d62000-07-05 10:38:09 +00008715
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8717$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008718if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008719 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008720else
Martin v. Löwis11437992002-04-12 09:54:03 +00008721 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008722LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008725
Martin v. Löwiseba40652007-08-30 20:10:57 +00008726/* Override any GCC internal prototype to avoid an error.
8727 Use char because int might match the return type of a GCC
8728 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008729#ifdef __cplusplus
8730extern "C"
8731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008732char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008733int
8734main ()
8735{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008736return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008737 ;
8738 return 0;
8739}
8740_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008741if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008743else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008744 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008745fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008746rm -f core conftest.err conftest.$ac_objext \
8747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008748LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008749fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8751$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008752if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008753 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008754
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008755 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008756 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008757 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008758else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008759
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8761$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008762if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008763 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008764else
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008766LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008769
Martin v. Löwiseba40652007-08-30 20:10:57 +00008770/* Override any GCC internal prototype to avoid an error.
8771 Use char because int might match the return type of a GCC
8772 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008773#ifdef __cplusplus
8774extern "C"
8775#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008776char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008777int
8778main ()
8779{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008780return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008781 ;
8782 return 0;
8783}
8784_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008785if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008787else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008788 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008789fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008790rm -f core conftest.err conftest.$ac_objext \
8791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008792LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008793fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8795$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008796if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008797 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008798
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008799 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008800 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008801 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008802else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008803
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8805$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008806if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008807 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008808else
Martin v. Löwis11437992002-04-12 09:54:03 +00008809 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008810LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008813
Martin v. Löwiseba40652007-08-30 20:10:57 +00008814/* Override any GCC internal prototype to avoid an error.
8815 Use char because int might match the return type of a GCC
8816 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008817#ifdef __cplusplus
8818extern "C"
8819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008820char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008821int
8822main ()
8823{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008824return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008825 ;
8826 return 0;
8827}
8828_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008829if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008831else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008832 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008833fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008834rm -f core conftest.err conftest.$ac_objext \
8835 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008836LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008837fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8839$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008840if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008841 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008842
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008843 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008844 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008845 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008846else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008847
Martin v. Löwis130fb172001-07-19 11:00:41 +00008848 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008849fi
8850
Guido van Rossum627b2d71993-12-24 10:39:16 +00008851
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008852fi
8853
Guido van Rossum0be3e491997-05-22 20:33:33 +00008854fi
8855
Guido van Rossum49545951997-12-02 19:28:29 +00008856fi
8857
Guido van Rossumb93a8621998-05-07 13:27:32 +00008858fi
8859
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008860
Michael W. Hudson54241132001-12-07 15:38:26 +00008861fi
8862
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008863
8864fi
8865
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008866fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008867rm -f core conftest.err conftest.$ac_objext \
8868 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008869fi
8870
Martin v. Löwis11437992002-04-12 09:54:03 +00008871fi
8872
8873
8874fi
8875
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008876
Michael W. Hudson54241132001-12-07 15:38:26 +00008877
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8879$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008880if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008881 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008882else
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008884LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008886/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008887
Martin v. Löwiseba40652007-08-30 20:10:57 +00008888/* Override any GCC internal prototype to avoid an error.
8889 Use char because int might match the return type of a GCC
8890 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008891#ifdef __cplusplus
8892extern "C"
8893#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008894char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008895int
8896main ()
8897{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008898return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008899 ;
8900 return 0;
8901}
8902_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008903if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008904 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008905else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008906 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008907fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008908rm -f core conftest.err conftest.$ac_objext \
8909 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008910LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008911fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8913$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008914if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008915 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008916
Martin v. Löwis130fb172001-07-19 11:00:41 +00008917 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008918 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008919 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008920fi
8921
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008922
Neal Norwitza978ab02002-11-02 16:58:05 +00008923 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8925$as_echo_n "checking for thr_create in -lthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008926if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008927 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008928else
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008930LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008933
Martin v. Löwiseba40652007-08-30 20:10:57 +00008934/* Override any GCC internal prototype to avoid an error.
8935 Use char because int might match the return type of a GCC
8936 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008937#ifdef __cplusplus
8938extern "C"
8939#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008940char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008941int
8942main ()
8943{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008944return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008945 ;
8946 return 0;
8947}
8948_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008949if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008950 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008951else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008952 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008953fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008954rm -f core conftest.err conftest.$ac_objext \
8955 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008956LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008957fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8959$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008960if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008961 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008962
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008963 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008964 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008965 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008966fi
8967
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008968 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008969
Martin v. Löwis130fb172001-07-19 11:00:41 +00008970 if test "$USE_THREAD_MODULE" != "#"
8971 then
8972 # If the above checks didn't disable threads, (at least) OSF1
8973 # needs this '-threads' argument during linking.
8974 case $ac_sys_system in
8975 OSF1) LDLAST=-threads;;
8976 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008977 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008978fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008979
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008980if test "$posix_threads" = "yes"; then
8981 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008982
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008983$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008984
8985 fi
8986
8987 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8988 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02008989 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008990$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008991
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008992 ;;
8993 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008994$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008995
8996 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02008997 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008998$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00008999
9000 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009001 esac
9002
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9004$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009005 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009006 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009007else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009008 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009009 ac_cv_pthread_system_supported=no
9010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009012/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009013#include <pthread.h>
9014 void *foo(void *parm) {
9015 return NULL;
9016 }
9017 main() {
9018 pthread_attr_t attr;
9019 pthread_t id;
9020 if (pthread_attr_init(&attr)) exit(-1);
9021 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9022 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9023 exit(0);
9024 }
9025_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009026if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009027 ac_cv_pthread_system_supported=yes
9028else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009029 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9032 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009033fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009034
Martin v. Löwiseba40652007-08-30 20:10:57 +00009035
Guido van Rossum627b2d71993-12-24 10:39:16 +00009036fi
9037
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9039$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009040 if test "$ac_cv_pthread_system_supported" = "yes"; then
9041
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009042$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009043
9044 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009045 for ac_func in pthread_sigmask
9046do :
9047 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Charles-François Natali97781b02011-07-22 23:43:42 +02009048if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009049 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009050#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009051_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009052 case $ac_sys_system in
9053 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009054
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009055$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009056
9057 ;;
9058 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009059fi
9060done
9061
9062fi
9063
9064
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009065# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009066
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9068$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009069# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009070if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009071 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009072 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9074$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009075 ipv6=no
9076 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009077 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9078$as_echo "yes" >&6; }
9079 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009080
9081 ipv6=yes
9082 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009083 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009084else
Martin v. Löwis11437992002-04-12 09:54:03 +00009085
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009086 if test "$cross_compiling" = yes; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009087
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9089$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009090 ipv6=no
9091
9092else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009094/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009095 /* AF_INET6 available check */
9096#include <sys/types.h>
9097#include <sys/socket.h>
9098main()
9099{
9100 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9101 exit(1);
9102 else
9103 exit(0);
9104}
9105
Martin v. Löwis11437992002-04-12 09:54:03 +00009106_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009107if ac_fn_c_try_run "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009108
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9110$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009111 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009112
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009113else
Matthias Klosec511b472010-05-08 11:01:39 +00009114
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9116$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009117 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009118
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009119fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009120rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9121 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009122fi
9123
Martin v. Löwiseba40652007-08-30 20:10:57 +00009124
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009125if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9127$as_echo_n "checking if RFC2553 API is available... " >&6; }
9128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009129/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009130
9131 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009132#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009133int
9134main ()
9135{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009136struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009137 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 ;
9139 return 0;
9140}
Matthias Klosec511b472010-05-08 11:01:39 +00009141
Martin v. Löwis11437992002-04-12 09:54:03 +00009142_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009143if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009144
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009146$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009147 ipv6=yes
9148
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009149else
Matthias Klosec511b472010-05-08 11:01:39 +00009150
9151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009152$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009153 ipv6=no
9154
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009157fi
9158
9159if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009160 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009161
9162fi
9163
Martin v. Löwiseba40652007-08-30 20:10:57 +00009164fi
9165
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009166
9167ipv6type=unknown
9168ipv6lib=none
9169ipv6trylibc=no
9170
9171if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9173$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009174 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9175 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009176 case $i in
9177 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009179/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009180
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009181#include <netinet/in.h>
9182#ifdef IPV6_INRIA_VERSION
9183yes
9184#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009185_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009186if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009187 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009188 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009189fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009190rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009191
9192 ;;
9193 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009195/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009196
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009197#include <netinet/in.h>
9198#ifdef __KAME__
9199yes
9200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009201_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009203 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009204 ipv6type=$i;
9205 ipv6lib=inet6
9206 ipv6libdir=/usr/local/v6/lib
9207 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009208fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009209rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009210
9211 ;;
9212 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009214/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009215
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009216#include <features.h>
9217#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9218yes
9219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009220_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009222 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009223 ipv6type=$i;
9224 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009225fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009226rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009227
9228 ;;
9229 linux-inet6)
9230 if test -d /usr/inet6; then
9231 ipv6type=$i
9232 ipv6lib=inet6
9233 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009234 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009235 fi
9236 ;;
9237 solaris)
9238 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009239 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009240 ipv6type=$i
9241 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009242 fi
9243 fi
9244 ;;
9245 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009247/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009248
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009249#include <sys/param.h>
9250#ifdef _TOSHIBA_INET6
9251yes
9252#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009253_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009255 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009256 ipv6type=$i;
9257 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009258 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009259fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009260rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009261
9262 ;;
9263 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009265/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009266
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009267#include </usr/local/v6/include/sys/v6config.h>
9268#ifdef __V6D__
9269yes
9270#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009271_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009272if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009273 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009274 ipv6type=$i;
9275 ipv6lib=v6;
9276 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009277 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009278fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009279rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009280
9281 ;;
9282 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009284/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009285
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009286#include <sys/param.h>
9287#ifdef _ZETA_MINAMI_INET6
9288yes
9289#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009290_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009291if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009292 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009293 ipv6type=$i;
9294 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009295 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009296fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009297rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009298
9299 ;;
9300 esac
9301 if test "$ipv6type" != "unknown"; then
9302 break
9303 fi
9304 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9306$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009307fi
9308
9309if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9310 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9311 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9312 echo "using lib$ipv6lib"
9313 else
9314 if test $ipv6trylibc = "yes"; then
9315 echo "using libc"
9316 else
9317 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9318 echo "You need to fetch lib$ipv6lib.a from appropriate"
9319 echo 'ipv6 kit and compile beforehand.'
9320 exit 1
9321 fi
9322 fi
9323fi
9324
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9326$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009328/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009329
9330 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009331int
9332main ()
9333{
9334FSIORefNum fRef = 0
9335 ;
9336 return 0;
9337}
Mark Dickinson0712b562010-05-08 19:13:21 +00009338
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009339_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009340if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009341
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009342
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009343$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009344
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9346$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009347
Mark Dickinson0712b562010-05-08 19:13:21 +00009348else
9349
9350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9351$as_echo "no" >&6; }
9352
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009353fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9355
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009356# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9358$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009359
Martin v. Löwiseba40652007-08-30 20:10:57 +00009360# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009361if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009362 withval=$with_doc_strings;
9363fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009364
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009365
9366if test -z "$with_doc_strings"
9367then with_doc_strings="yes"
9368fi
9369if test "$with_doc_strings" != "no"
9370then
9371
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009372$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009373
9374fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9376$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009377
Neil Schemenauera35c6882001-02-27 04:45:05 +00009378# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9380$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009381
Martin v. Löwiseba40652007-08-30 20:10:57 +00009382# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009383if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009384 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009385if test "$withval" != no
9386then
9387
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009388$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009389
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9391$as_echo "yes" >&6; }
9392else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9393$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009394fi
9395else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9397$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009398fi
9399
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009400
9401# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9403$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009404
Martin v. Löwiseba40652007-08-30 20:10:57 +00009405# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009406if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009407 withval=$with_pymalloc;
9408fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009409
Neil Schemenauera35c6882001-02-27 04:45:05 +00009410
Neil Schemenauer16c22972002-03-22 15:34:49 +00009411if test -z "$with_pymalloc"
9412then with_pymalloc="yes"
9413fi
9414if test "$with_pymalloc" != "no"
9415then
Martin v. Löwis11437992002-04-12 09:54:03 +00009416
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009417$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009418
9419fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9421$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009422
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009423# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9425$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009426
9427# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009428if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009429 withval=$with_valgrind;
9430else
9431 with_valgrind=no
9432fi
9433
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9435$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009436if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009437 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02009438if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009439
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009440$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009441
9442else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009443 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009444
9445fi
9446
9447
9448fi
9449
Barry Warsawef82cd72000-06-30 16:21:01 +00009450# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9452$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009453
Martin v. Löwiseba40652007-08-30 20:10:57 +00009454# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009455if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009456 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009457if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009458then
9459
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009460$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009461
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9463$as_echo "yes" >&6; }
9464else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9465$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009466fi
9467else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9469$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009470fi
9471
Barry Warsawef82cd72000-06-30 16:21:01 +00009472
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009473# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009474
Guido van Rossum98935bf2001-09-05 19:13:16 +00009475DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009476
Guido van Rossume97ee181999-12-20 21:27:22 +00009477# the dlopen() function means we might want to use dynload_shlib.o. some
9478# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009479for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009480do :
9481 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Charles-François Natali97781b02011-07-22 23:43:42 +02009482if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009484#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009485_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009486
Guido van Rossume97ee181999-12-20 21:27:22 +00009487fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009488done
Guido van Rossume97ee181999-12-20 21:27:22 +00009489
Michael W. Hudson54241132001-12-07 15:38:26 +00009490
Guido van Rossume97ee181999-12-20 21:27:22 +00009491# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9492# loading of modules.
9493
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9495$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009496if test -z "$DYNLOADFILE"
9497then
9498 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009499 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9500 if test "$ac_cv_func_dlopen" = yes
9501 then DYNLOADFILE="dynload_shlib.o"
9502 else DYNLOADFILE="dynload_aix.o"
9503 fi
9504 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009505 BeOS*) DYNLOADFILE="dynload_beos.o";;
9506 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009507 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9508 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009509 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009510 *)
9511 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9512 # out any dynamic loading
9513 if test "$ac_cv_func_dlopen" = yes
9514 then DYNLOADFILE="dynload_shlib.o"
9515 else DYNLOADFILE="dynload_stub.o"
9516 fi
9517 ;;
9518 esac
9519fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9521$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009522if test "$DYNLOADFILE" != "dynload_stub.o"
9523then
Martin v. Löwis11437992002-04-12 09:54:03 +00009524
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009525$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009526
9527fi
9528
Neil Schemenauer4e425612001-06-19 15:44:15 +00009529# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9530
Michael W. Hudson54241132001-12-07 15:38:26 +00009531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9533$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009534if test -z "$MACHDEP_OBJS"
9535then
Jack Jansene578a632001-08-15 01:27:14 +00009536 MACHDEP_OBJS=$extra_machdep_objs
9537else
9538 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009539fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9541$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009542
Guido van Rossum627b2d71993-12-24 10:39:16 +00009543# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009544for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9545 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009546 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009547 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009548 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009549 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009550 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009551 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9552 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009553 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009554 setlocale setregid setreuid setresuid setresgid \
9555 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009556 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009557 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009558 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009559do :
9560 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9561ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009562if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009563 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009564#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009565_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009566
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009567fi
9568done
9569
Michael W. Hudson54241132001-12-07 15:38:26 +00009570
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009571# For some functions, having a definition is not sufficient, since
9572# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9574$as_echo_n "checking for chroot... " >&6; }
9575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009576/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009577#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009578int
9579main ()
9580{
9581void *x=chroot
9582 ;
9583 return 0;
9584}
9585_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009586if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009587
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009588$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009589
Matthias Klosec511b472010-05-08 11:01:39 +00009590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009591$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009592else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9594$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009595
9596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9599$as_echo_n "checking for link... " >&6; }
9600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009601/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009602#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009603int
9604main ()
9605{
9606void *x=link
9607 ;
9608 return 0;
9609}
9610_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009611if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009612
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009613$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009614
Matthias Klosec511b472010-05-08 11:01:39 +00009615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009616$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009617else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9619$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009620
9621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9624$as_echo_n "checking for symlink... " >&6; }
9625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009626/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009627#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009628int
9629main ()
9630{
9631void *x=symlink
9632 ;
9633 return 0;
9634}
9635_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009636if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009637
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009638$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009639
Matthias Klosec511b472010-05-08 11:01:39 +00009640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009641$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009642else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9644$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009645
9646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9649$as_echo_n "checking for fchdir... " >&6; }
9650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009651/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009652#include <unistd.h>
9653int
9654main ()
9655{
9656void *x=fchdir
9657 ;
9658 return 0;
9659}
9660_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009661if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009662
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009663$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009664
Matthias Klosec511b472010-05-08 11:01:39 +00009665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009666$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009667else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9669$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009670
9671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9674$as_echo_n "checking for fsync... " >&6; }
9675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009676/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009677#include <unistd.h>
9678int
9679main ()
9680{
9681void *x=fsync
9682 ;
9683 return 0;
9684}
9685_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009686if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009687
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009688$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009689
Matthias Klosec511b472010-05-08 11:01:39 +00009690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009691$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009692else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9694$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009695
9696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9699$as_echo_n "checking for fdatasync... " >&6; }
9700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009701/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009702#include <unistd.h>
9703int
9704main ()
9705{
9706void *x=fdatasync
9707 ;
9708 return 0;
9709}
9710_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009711if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009712
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009713$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009714
Matthias Klosec511b472010-05-08 11:01:39 +00009715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009716$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009717else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9719$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009720
9721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9724$as_echo_n "checking for epoll... " >&6; }
9725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009726/* end confdefs.h. */
9727#include <sys/epoll.h>
9728int
9729main ()
9730{
9731void *x=epoll_create
9732 ;
9733 return 0;
9734}
9735_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009736if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009737
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009738$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009739
Matthias Klosec511b472010-05-08 11:01:39 +00009740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009741$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009742else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9744$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009745
9746fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9749$as_echo_n "checking for kqueue... " >&6; }
9750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009751/* end confdefs.h. */
9752
9753#include <sys/types.h>
9754#include <sys/event.h>
9755
9756int
9757main ()
9758{
9759int x=kqueue()
9760 ;
9761 return 0;
9762}
9763_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009764if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009765
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009766$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009767
Matthias Klosec511b472010-05-08 11:01:39 +00009768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009769$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009770else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9772$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009773
9774fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009776# On some systems (eg. FreeBSD 5), we would find a definition of the
9777# functions ctermid_r, setgroups in the library, but no prototype
9778# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9779# address to avoid compiler warnings and potential miscompilations
9780# because of the missing prototypes.
9781
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9783$as_echo_n "checking for ctermid_r... " >&6; }
9784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009785/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009786
Martin v. Löwisd5843682002-11-21 20:41:28 +00009787#include <stdio.h>
9788
Martin v. Löwisd5843682002-11-21 20:41:28 +00009789int
9790main ()
9791{
9792void* p = ctermid_r
9793 ;
9794 return 0;
9795}
9796_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009797if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009798
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009799$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009800
Matthias Klosec511b472010-05-08 11:01:39 +00009801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009802$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009803else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9805$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009806
9807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9809
Antoine Pitroub170f172010-09-10 18:47:36 +00009810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9811$as_echo_n "checking for flock declaration... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009812if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009813 $as_echo_n "(cached) " >&6
9814else
9815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009816/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009817#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009818int
9819main ()
9820{
9821void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +00009822
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009823 ;
9824 return 0;
9825}
9826_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009827if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009828 ac_cv_flock_decl=yes
9829else
9830 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009831
9832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +00009834
Antoine Pitroub170f172010-09-10 18:47:36 +00009835fi
9836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9837$as_echo "$ac_cv_flock_decl" >&6; }
9838if test "x${ac_cv_flock_decl}" = xyes; then
9839 for ac_func in flock
9840do :
9841 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Charles-François Natali97781b02011-07-22 23:43:42 +02009842if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009843 cat >>confdefs.h <<_ACEOF
9844#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +00009845_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +00009846
Antoine Pitrou85729812010-09-07 14:55:24 +00009847else
Antoine Pitroub170f172010-09-10 18:47:36 +00009848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +00009849$as_echo_n "checking for flock in -lbsd... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009850if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitrou85729812010-09-07 14:55:24 +00009851 $as_echo_n "(cached) " >&6
9852else
9853 ac_check_lib_save_LIBS=$LIBS
9854LIBS="-lbsd $LIBS"
9855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9856/* end confdefs.h. */
9857
9858/* Override any GCC internal prototype to avoid an error.
9859 Use char because int might match the return type of a GCC
9860 builtin and then its argument prototype would still apply. */
9861#ifdef __cplusplus
9862extern "C"
9863#endif
9864char flock ();
9865int
9866main ()
9867{
9868return flock ();
9869 ;
9870 return 0;
9871}
9872_ACEOF
9873if ac_fn_c_try_link "$LINENO"; then :
9874 ac_cv_lib_bsd_flock=yes
9875else
9876 ac_cv_lib_bsd_flock=no
9877fi
9878rm -f core conftest.err conftest.$ac_objext \
9879 conftest$ac_exeext conftest.$ac_ext
9880LIBS=$ac_check_lib_save_LIBS
9881fi
9882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9883$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009884if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009885 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +00009886
9887
9888$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9889
9890
9891fi
9892
9893
9894fi
Antoine Pitroub170f172010-09-10 18:47:36 +00009895done
9896
Antoine Pitrou85729812010-09-07 14:55:24 +00009897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009898
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9900$as_echo_n "checking for getpagesize... " >&6; }
9901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009902/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009903
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009904#include <unistd.h>
9905
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009906int
9907main ()
9908{
9909void* p = getpagesize
9910 ;
9911 return 0;
9912}
9913_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009914if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009915
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009916$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009917
Matthias Klosec511b472010-05-08 11:01:39 +00009918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009919$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009920else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9922$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009923
9924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009926
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009927for ac_prog in true
9928do
9929 # Extract the first word of "$ac_prog", so it can be a program name with args.
9930set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9932$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009933if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009934 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009935else
9936 if test -n "$TRUE"; then
9937 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9938else
9939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9940for as_dir in $PATH
9941do
9942 IFS=$as_save_IFS
9943 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009944 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00009945 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 +00009946 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009947 $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 +00009948 break 2
9949 fi
9950done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009951 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00009952IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009953
9954fi
9955fi
9956TRUE=$ac_cv_prog_TRUE
9957if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9959$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009960else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9962$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009963fi
9964
Martin v. Löwiseba40652007-08-30 20:10:57 +00009965
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009966 test -n "$TRUE" && break
9967done
9968test -n "$TRUE" || TRUE="/bin/true"
9969
9970
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9972$as_echo_n "checking for inet_aton in -lc... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009973if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009974 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009975else
9976 ac_check_lib_save_LIBS=$LIBS
9977LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009979/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009980
Martin v. Löwiseba40652007-08-30 20:10:57 +00009981/* Override any GCC internal prototype to avoid an error.
9982 Use char because int might match the return type of a GCC
9983 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009984#ifdef __cplusplus
9985extern "C"
9986#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009987char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009988int
9989main ()
9990{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009991return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009992 ;
9993 return 0;
9994}
9995_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009996if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009997 ac_cv_lib_c_inet_aton=yes
9998else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009999 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010000fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010001rm -f core conftest.err conftest.$ac_objext \
10002 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010003LIBS=$ac_check_lib_save_LIBS
10004fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10006$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010007if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010008 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010009else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10011$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010012if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010013 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010014else
10015 ac_check_lib_save_LIBS=$LIBS
10016LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010018/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010019
Martin v. Löwiseba40652007-08-30 20:10:57 +000010020/* Override any GCC internal prototype to avoid an error.
10021 Use char because int might match the return type of a GCC
10022 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010023#ifdef __cplusplus
10024extern "C"
10025#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010026char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010027int
10028main ()
10029{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010030return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010031 ;
10032 return 0;
10033}
10034_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010035if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010036 ac_cv_lib_resolv_inet_aton=yes
10037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010038 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010039fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010040rm -f core conftest.err conftest.$ac_objext \
10041 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010042LIBS=$ac_check_lib_save_LIBS
10043fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10045$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010046if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010047 cat >>confdefs.h <<_ACEOF
10048#define HAVE_LIBRESOLV 1
10049_ACEOF
10050
10051 LIBS="-lresolv $LIBS"
10052
10053fi
10054
10055
10056fi
10057
10058
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010059# On Tru64, chflags seems to be present, but calling it will
10060# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10062$as_echo_n "checking for chflags... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010063if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010064 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010065else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010066 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010067 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010068else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010070/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010071
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010072#include <sys/stat.h>
10073#include <unistd.h>
10074int main(int argc, char*argv[])
10075{
10076 if(chflags(argv[0], 0) != 0)
10077 return 1;
10078 return 0;
10079}
Ned Deily43e10542011-06-27 23:41:53 -070010080
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010081_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010082if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010083 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010084else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010085 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010086fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10088 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010089fi
10090
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010091
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010092fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10094$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010095if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010096 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Charles-François Natali97781b02011-07-22 23:43:42 +020010097if test "x$ac_cv_func_chflags" = x""yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010098 ac_cv_have_chflags="yes"
10099else
10100 ac_cv_have_chflags="no"
10101fi
10102
10103fi
10104if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010105
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010106$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010107
10108fi
10109
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10111$as_echo_n "checking for lchflags... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010112if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010113 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010114else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010115 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010116 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010117else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010119/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010120
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010121#include <sys/stat.h>
10122#include <unistd.h>
10123int main(int argc, char*argv[])
10124{
10125 if(lchflags(argv[0], 0) != 0)
10126 return 1;
10127 return 0;
10128}
Ned Deily43e10542011-06-27 23:41:53 -070010129
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010130_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010131if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010132 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010133else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010134 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010135fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10137 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010138fi
10139
10140
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010141fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10143$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010144if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010145 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Charles-François Natali97781b02011-07-22 23:43:42 +020010146if test "x$ac_cv_func_lchflags" = x""yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010147 ac_cv_have_lchflags="yes"
10148else
10149 ac_cv_have_lchflags="no"
10150fi
10151
10152fi
10153if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010154
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010155$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010156
10157fi
10158
Ronald Oussorenf8752642006-07-06 10:13:35 +000010159case $ac_sys_system/$ac_sys_release in
10160Darwin/*)
10161 _CUR_CFLAGS="${CFLAGS}"
10162 _CUR_LDFLAGS="${LDFLAGS}"
10163 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10164 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10165 ;;
10166esac
10167
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10169$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010170if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010171 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010172else
10173 ac_check_lib_save_LIBS=$LIBS
10174LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010176/* end confdefs.h. */
10177
Martin v. Löwiseba40652007-08-30 20:10:57 +000010178/* Override any GCC internal prototype to avoid an error.
10179 Use char because int might match the return type of a GCC
10180 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010181#ifdef __cplusplus
10182extern "C"
10183#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010184char inflateCopy ();
10185int
10186main ()
10187{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010188return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010189 ;
10190 return 0;
10191}
10192_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010193if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010194 ac_cv_lib_z_inflateCopy=yes
10195else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010196 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010197fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010198rm -f core conftest.err conftest.$ac_objext \
10199 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010200LIBS=$ac_check_lib_save_LIBS
10201fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10203$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010204if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010205
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010206$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010207
10208fi
10209
10210
Ronald Oussorenf8752642006-07-06 10:13:35 +000010211case $ac_sys_system/$ac_sys_release in
10212Darwin/*)
10213 CFLAGS="${_CUR_CFLAGS}"
10214 LDFLAGS="${_CUR_LDFLAGS}"
10215 ;;
10216esac
10217
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10219$as_echo_n "checking for hstrerror... " >&6; }
10220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010221/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010222
Martin v. Löwise9416172003-05-03 10:12:45 +000010223#include <netdb.h>
10224
Martin v. Löwise9416172003-05-03 10:12:45 +000010225int
10226main ()
10227{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010228void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010229 ;
10230 return 0;
10231}
10232_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010233if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010234
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010235$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010236
Matthias Klosec511b472010-05-08 11:01:39 +000010237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010238$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010239else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10241$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010242
10243fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010244rm -f core conftest.err conftest.$ac_objext \
10245 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010246
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10248$as_echo_n "checking for inet_aton... " >&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öwis86d66262006-02-17 08:40:11 +000010252#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010253#include <sys/socket.h>
10254#include <netinet/in.h>
10255#include <arpa/inet.h>
10256
Martin v. Löwise9416172003-05-03 10:12:45 +000010257int
10258main ()
10259{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010260void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010261 ;
10262 return 0;
10263}
10264_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010265if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010266
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010267$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010268
Matthias Klosec511b472010-05-08 11:01:39 +000010269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010270$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010271else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10273$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010274
10275fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010276rm -f core conftest.err conftest.$ac_objext \
10277 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010278
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10280$as_echo_n "checking for inet_pton... " >&6; }
10281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010282/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010283
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010284#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010285#include <sys/socket.h>
10286#include <netinet/in.h>
10287#include <arpa/inet.h>
10288
Martin v. Löwise9416172003-05-03 10:12:45 +000010289int
10290main ()
10291{
10292void* p = inet_pton
10293 ;
10294 return 0;
10295}
10296_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010297if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010298
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010299$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010300
Matthias Klosec511b472010-05-08 11:01:39 +000010301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010302$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010303else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10305$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010306
10307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010309
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010310# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10312$as_echo_n "checking for setgroups... " >&6; }
10313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010314/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010315
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010316#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010317#ifdef HAVE_GRP_H
10318#include <grp.h>
10319#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010320
Martin v. Löwisd5843682002-11-21 20:41:28 +000010321int
10322main ()
10323{
10324void* p = setgroups
10325 ;
10326 return 0;
10327}
10328_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010329if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010330
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010331$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010332
Matthias Klosec511b472010-05-08 11:01:39 +000010333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010334$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010335else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10337$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010338
10339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010341
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010342# check for openpty and forkpty
10343
10344for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010345do :
10346 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Charles-François Natali97781b02011-07-22 23:43:42 +020010347if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010349#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010350_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010351
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010352else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10354$as_echo_n "checking for openpty in -lutil... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010355if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010356 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010357else
Martin v. Löwis11437992002-04-12 09:54:03 +000010358 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010359LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010362
Martin v. Löwiseba40652007-08-30 20:10:57 +000010363/* Override any GCC internal prototype to avoid an error.
10364 Use char because int might match the return type of a GCC
10365 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010366#ifdef __cplusplus
10367extern "C"
10368#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010369char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010370int
10371main ()
10372{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010373return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 ;
10375 return 0;
10376}
10377_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010378if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010380else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010381 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010382fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010383rm -f core conftest.err conftest.$ac_objext \
10384 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010385LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010386fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10388$as_echo "$ac_cv_lib_util_openpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010389if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010390 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010391 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010392else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10394$as_echo_n "checking for openpty in -lbsd... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010395if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010396 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010397else
10398 ac_check_lib_save_LIBS=$LIBS
10399LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010401/* end confdefs.h. */
10402
Martin v. Löwiseba40652007-08-30 20:10:57 +000010403/* Override any GCC internal prototype to avoid an error.
10404 Use char because int might match the return type of a GCC
10405 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010406#ifdef __cplusplus
10407extern "C"
10408#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010409char openpty ();
10410int
10411main ()
10412{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010413return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010414 ;
10415 return 0;
10416}
10417_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010418if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010419 ac_cv_lib_bsd_openpty=yes
10420else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010421 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010422fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010423rm -f core conftest.err conftest.$ac_objext \
10424 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010425LIBS=$ac_check_lib_save_LIBS
10426fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10428$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010429if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010430 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010431 LIBS="$LIBS -lbsd"
10432fi
10433
10434
10435fi
10436
Fred Drake8cef4cf2000-06-28 16:40:38 +000010437
10438fi
10439done
10440
10441for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010442do :
10443 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Charles-François Natali97781b02011-07-22 23:43:42 +020010444if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010445 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010446#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010447_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010448
Fred Drake8cef4cf2000-06-28 16:40:38 +000010449else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10451$as_echo_n "checking for forkpty in -lutil... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010452if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010453 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010454else
Martin v. Löwis11437992002-04-12 09:54:03 +000010455 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010456LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010459
Martin v. Löwiseba40652007-08-30 20:10:57 +000010460/* Override any GCC internal prototype to avoid an error.
10461 Use char because int might match the return type of a GCC
10462 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010463#ifdef __cplusplus
10464extern "C"
10465#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010466char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010467int
10468main ()
10469{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010470return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010471 ;
10472 return 0;
10473}
10474_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010475if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010476 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010477else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010478 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010479fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010480rm -f core conftest.err conftest.$ac_objext \
10481 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010482LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010483fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10485$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010486if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010487 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010488 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010489else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10491$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010492if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010493 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010494else
10495 ac_check_lib_save_LIBS=$LIBS
10496LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010498/* end confdefs.h. */
10499
Martin v. Löwiseba40652007-08-30 20:10:57 +000010500/* Override any GCC internal prototype to avoid an error.
10501 Use char because int might match the return type of a GCC
10502 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010503#ifdef __cplusplus
10504extern "C"
10505#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010506char forkpty ();
10507int
10508main ()
10509{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010510return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010511 ;
10512 return 0;
10513}
10514_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010515if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010516 ac_cv_lib_bsd_forkpty=yes
10517else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010518 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010519fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010520rm -f core conftest.err conftest.$ac_objext \
10521 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010522LIBS=$ac_check_lib_save_LIBS
10523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10525$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010526if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010527 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010528 LIBS="$LIBS -lbsd"
10529fi
10530
10531
10532fi
10533
Fred Drake8cef4cf2000-06-28 16:40:38 +000010534
10535fi
10536done
10537
Jack Jansendd19cf82001-12-06 22:36:17 +000010538
Brett Cannonaa5778d2008-03-18 04:09:00 +000010539# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010540for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010541do :
10542 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Charles-François Natali97781b02011-07-22 23:43:42 +020010543if test "x$ac_cv_func_memmove" = x""yes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010544 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010545#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010546_ACEOF
10547
10548fi
10549done
10550
10551
Michael W. Hudson54241132001-12-07 15:38:26 +000010552# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010553for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010554do :
10555 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10556ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010557if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010558 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010559#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010560_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010561
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010562fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010563done
10564
Michael W. Hudson54241132001-12-07 15:38:26 +000010565
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010566ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Charles-François Natali97781b02011-07-22 23:43:42 +020010567if test "x$ac_cv_func_dup2" = x""yes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010568 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010569
Martin v. Löwis1142de32002-03-29 16:28:31 +000010570else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010571 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010572 *" dup2.$ac_objext "* ) ;;
10573 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000010574 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010575esac
10576
Martin v. Löwis1142de32002-03-29 16:28:31 +000010577fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010578
10579ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Charles-François Natali97781b02011-07-22 23:43:42 +020010580if test "x$ac_cv_func_getcwd" = x""yes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010581 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10582
10583else
10584 case " $LIBOBJS " in
10585 *" getcwd.$ac_objext "* ) ;;
10586 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10587 ;;
10588esac
10589
10590fi
10591
10592ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Charles-François Natali97781b02011-07-22 23:43:42 +020010593if test "x$ac_cv_func_strdup" = x""yes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010594 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10595
10596else
10597 case " $LIBOBJS " in
10598 *" strdup.$ac_objext "* ) ;;
10599 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10600 ;;
10601esac
10602
10603fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010604
10605
10606for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010607do :
10608 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Charles-François Natali97781b02011-07-22 23:43:42 +020010609if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010610 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010611#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010612_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010614/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010615#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010616int
10617main ()
10618{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010619getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010620 ;
10621 return 0;
10622}
10623_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010624if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010625
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010626$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010627
Guido van Rossum627b2d71993-12-24 10:39:16 +000010628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010630
Guido van Rossum627b2d71993-12-24 10:39:16 +000010631fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010632done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010633
Jack Jansen150753c2003-03-29 22:07:47 +000010634for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010635do :
10636 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Charles-François Natali97781b02011-07-22 23:43:42 +020010637if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010638 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010639#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010640_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010642/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010643#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010644int
10645main ()
10646{
10647setpgrp(0,0);
10648 ;
10649 return 0;
10650}
10651_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010652if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010653
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010654$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010655
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010658
10659fi
10660done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010661
Thomas Wouters3a584202000-08-05 23:28:51 +000010662for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010663do :
10664 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Charles-François Natali97781b02011-07-22 23:43:42 +020010665if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010666 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010667#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010668_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010670/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010671#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010672int
10673main ()
10674{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010675gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010676 ;
10677 return 0;
10678}
10679_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010680if ac_fn_c_try_compile "$LINENO"; then :
10681
Guido van Rossum627b2d71993-12-24 10:39:16 +000010682else
Skip Montanaro6dead952003-09-25 14:50:04 +000010683
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010684$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010685
Martin v. Löwis11437992002-04-12 09:54:03 +000010686
Guido van Rossum627b2d71993-12-24 10:39:16 +000010687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010689
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010690fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010691done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010692
Michael W. Hudson54241132001-12-07 15:38:26 +000010693
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10695$as_echo_n "checking for major... " >&6; }
10696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010697/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010698
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010699#if defined(MAJOR_IN_MKDEV)
10700#include <sys/mkdev.h>
10701#elif defined(MAJOR_IN_SYSMACROS)
10702#include <sys/sysmacros.h>
10703#else
10704#include <sys/types.h>
10705#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010706
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010707int
10708main ()
10709{
10710
10711 makedev(major(0),minor(0));
10712
10713 ;
10714 return 0;
10715}
10716_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010717if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010718
10719
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010720$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010721
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10723$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010724
10725else
Skip Montanaro6dead952003-09-25 14:50:04 +000010726
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10728$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010729
10730fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010731rm -f core conftest.err conftest.$ac_objext \
10732 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010733
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010734# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010735# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10737$as_echo_n "checking for getaddrinfo... " >&6; }
10738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010739/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010740
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010741#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010742#include <sys/socket.h>
10743#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010744#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010745
Martin v. Löwis11437992002-04-12 09:54:03 +000010746int
10747main ()
10748{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010749getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010750 ;
10751 return 0;
10752}
10753_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010754if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010755 have_getaddrinfo=yes
10756else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010757 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010758fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010759rm -f core conftest.err conftest.$ac_objext \
10760 conftest$ac_exeext conftest.$ac_ext
10761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10762$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010763if test $have_getaddrinfo = yes
10764then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10766$as_echo_n "checking getaddrinfo bug... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010767 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010768 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010770 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010771 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010772else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010774/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010775
10776#include <sys/types.h>
10777#include <netdb.h>
10778#include <string.h>
10779#include <sys/socket.h>
10780#include <netinet/in.h>
10781
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010782int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010783{
10784 int passive, gaierr, inet4 = 0, inet6 = 0;
10785 struct addrinfo hints, *ai, *aitop;
10786 char straddr[INET6_ADDRSTRLEN], strport[16];
10787
10788 for (passive = 0; passive <= 1; passive++) {
10789 memset(&hints, 0, sizeof(hints));
10790 hints.ai_family = AF_UNSPEC;
10791 hints.ai_flags = passive ? AI_PASSIVE : 0;
10792 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010793 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010794 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10795 (void)gai_strerror(gaierr);
10796 goto bad;
10797 }
10798 for (ai = aitop; ai; ai = ai->ai_next) {
10799 if (ai->ai_addr == NULL ||
10800 ai->ai_addrlen == 0 ||
10801 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10802 straddr, sizeof(straddr), strport, sizeof(strport),
10803 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10804 goto bad;
10805 }
10806 switch (ai->ai_family) {
10807 case AF_INET:
10808 if (strcmp(strport, "54321") != 0) {
10809 goto bad;
10810 }
10811 if (passive) {
10812 if (strcmp(straddr, "0.0.0.0") != 0) {
10813 goto bad;
10814 }
10815 } else {
10816 if (strcmp(straddr, "127.0.0.1") != 0) {
10817 goto bad;
10818 }
10819 }
10820 inet4++;
10821 break;
10822 case AF_INET6:
10823 if (strcmp(strport, "54321") != 0) {
10824 goto bad;
10825 }
10826 if (passive) {
10827 if (strcmp(straddr, "::") != 0) {
10828 goto bad;
10829 }
10830 } else {
10831 if (strcmp(straddr, "::1") != 0) {
10832 goto bad;
10833 }
10834 }
10835 inet6++;
10836 break;
10837 case AF_UNSPEC:
10838 goto bad;
10839 break;
10840 default:
10841 /* another family support? */
10842 break;
10843 }
10844 }
10845 }
10846
10847 if (!(inet4 == 0 || inet4 == 2))
10848 goto bad;
10849 if (!(inet6 == 0 || inet6 == 2))
10850 goto bad;
10851
10852 if (aitop)
10853 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010854 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010855
10856 bad:
10857 if (aitop)
10858 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010859 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010860}
10861
Martin v. Löwis11437992002-04-12 09:54:03 +000010862_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010863if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010864 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010865else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010866 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010867fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10869 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010871
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010872fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010873
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010875
Benjamin Peterson75fed812010-11-01 01:47:19 +000010876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10877$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10878
Mark Dickinson0ef0b912009-12-31 21:11:48 +000010879if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010880then
10881 if test $ipv6 = yes
10882 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010883 echo 'Fatal: You must get working getaddrinfo() function.'
10884 echo ' or you can specify "--disable-ipv6"'.
10885 exit 1
10886 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010887else
Martin v. Löwis11437992002-04-12 09:54:03 +000010888
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010889$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010890
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010891fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000010892
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010893for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010894do :
10895 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Charles-François Natali97781b02011-07-22 23:43:42 +020010896if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010897 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010898#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010899_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010900
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010901fi
10902done
10903
Michael W. Hudson54241132001-12-07 15:38:26 +000010904
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010905# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10907$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 +020010908if test "${ac_cv_header_time+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010909 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010910else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010912/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010913#include <sys/types.h>
10914#include <sys/time.h>
10915#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010916
Martin v. Löwis11437992002-04-12 09:54:03 +000010917int
10918main ()
10919{
10920if ((struct tm *) 0)
10921return 0;
10922 ;
10923 return 0;
10924}
10925_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010926if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010927 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010928else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010929 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010932fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10934$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010935if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010936
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010937$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010938
10939fi
10940
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10942$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 +020010943if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010944 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010945else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010947/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010948#include <sys/types.h>
10949#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010950
Martin v. Löwis11437992002-04-12 09:54:03 +000010951int
10952main ()
10953{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010954struct tm tm;
10955 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010956 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010957 ;
10958 return 0;
10959}
10960_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010961if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010962 ac_cv_struct_tm=time.h
10963else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010964 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010967fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10969$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010970if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010971
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010972$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010973
10974fi
10975
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010976ac_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 +000010977#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010978
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010979"
Charles-François Natali97781b02011-07-22 23:43:42 +020010980if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010981
10982cat >>confdefs.h <<_ACEOF
10983#define HAVE_STRUCT_TM_TM_ZONE 1
10984_ACEOF
10985
10986
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010987fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010988
Martin v. Löwis11437992002-04-12 09:54:03 +000010989if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10990
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010991$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010992
10993else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010994 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10995"
Charles-François Natali97781b02011-07-22 23:43:42 +020010996if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010997 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000010998else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010999 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011000fi
11001
Martin v. Löwiseba40652007-08-30 20:10:57 +000011002cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011003#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011004_ACEOF
11005
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11007$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011008if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011009 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011012/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011013#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011014#if !HAVE_DECL_TZNAME
11015extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011017
Martin v. Löwis11437992002-04-12 09:54:03 +000011018int
11019main ()
11020{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011021return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011022 ;
11023 return 0;
11024}
11025_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011026if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011027 ac_cv_var_tzname=yes
11028else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011029 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011031rm -f core conftest.err conftest.$ac_objext \
11032 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011033fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11035$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011036 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011037
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011038$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011039
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011040 fi
11041fi
11042
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011043ac_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 +020011044if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011045
11046cat >>confdefs.h <<_ACEOF
11047#define HAVE_STRUCT_STAT_ST_RDEV 1
11048_ACEOF
11049
11050
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011051fi
11052
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011053ac_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 +020011054if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011055
Martin v. Löwis11437992002-04-12 09:54:03 +000011056cat >>confdefs.h <<_ACEOF
11057#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11058_ACEOF
11059
11060
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011061fi
11062
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011063ac_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 +020011064if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011065
11066cat >>confdefs.h <<_ACEOF
11067#define HAVE_STRUCT_STAT_ST_FLAGS 1
11068_ACEOF
11069
11070
11071fi
11072
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011073ac_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 +020011074if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011075
11076cat >>confdefs.h <<_ACEOF
11077#define HAVE_STRUCT_STAT_ST_GEN 1
11078_ACEOF
11079
11080
11081fi
11082
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011083ac_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 +020011084if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011085
11086cat >>confdefs.h <<_ACEOF
11087#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11088_ACEOF
11089
11090
11091fi
11092
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011093ac_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 +020011094if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011095
Martin v. Löwis11437992002-04-12 09:54:03 +000011096cat >>confdefs.h <<_ACEOF
11097#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11098_ACEOF
11099
11100
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011101$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011102
11103else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011104 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011105 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011106 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11107 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011108esac
11109
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011110fi
11111
Michael W. Hudson54241132001-12-07 15:38:26 +000011112
Martin v. Löwis11437992002-04-12 09:54:03 +000011113
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11115$as_echo_n "checking for time.h that defines altzone... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011116if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011117 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011118else
Matthias Klosec511b472010-05-08 11:01:39 +000011119
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011121/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011122#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011123int
11124main ()
11125{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011126return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 ;
11128 return 0;
11129}
11130_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011131if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011132 ac_cv_header_time_altzone=yes
11133else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011134 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011137
Martin v. Löwiseba40652007-08-30 20:10:57 +000011138fi
11139
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11141$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011142if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011143
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011144$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011145
11146fi
11147
Guido van Rossumda88dad1995-01-26 00:46:29 +000011148was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11150$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011152/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011153
11154#include <sys/types.h>
11155#include <sys/select.h>
11156#include <sys/time.h>
11157
Martin v. Löwis11437992002-04-12 09:54:03 +000011158int
11159main ()
11160{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011161;
Martin v. Löwis11437992002-04-12 09:54:03 +000011162 ;
11163 return 0;
11164}
11165_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011166if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011167
11168
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011169$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011170
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011171 was_it_defined=yes
11172
Martin v. Löwiseba40652007-08-30 20:10:57 +000011173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11176$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011177
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11179$as_echo_n "checking for addrinfo... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011180if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011181 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011182else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011184/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011185#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011186int
11187main ()
11188{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011189struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011190 ;
11191 return 0;
11192}
11193_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011194if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011195 ac_cv_struct_addrinfo=yes
11196else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011197 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11200fi
11201
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11203$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011204if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011205
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011206$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011207
11208fi
11209
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11211$as_echo_n "checking for sockaddr_storage... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011212if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011213 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011214else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011216/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011217
11218# include <sys/types.h>
11219# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011220int
11221main ()
11222{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011223struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011224 ;
11225 return 0;
11226}
11227_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011228if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011229 ac_cv_struct_sockaddr_storage=yes
11230else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011231 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11234fi
11235
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11237$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011238if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011239
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011240$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011241
11242fi
11243
Guido van Rossum627b2d71993-12-24 10:39:16 +000011244# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011245
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11247$as_echo_n "checking whether char is unsigned... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011248if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011249 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011250else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011252/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011253$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011254int
11255main ()
11256{
11257static int test_array [1 - 2 * !(((char) -1) < 0)];
11258test_array [0] = 0
11259
11260 ;
11261 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011262}
Martin v. Löwis11437992002-04-12 09:54:03 +000011263_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011264if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011265 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011266else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011267 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011270fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11272$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011273if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011274 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011275
11276fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011277
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11279$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011280if test "${ac_cv_c_const+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011281 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011282else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011284/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011285
Martin v. Löwis11437992002-04-12 09:54:03 +000011286int
11287main ()
11288{
11289/* FIXME: Include the comments suggested by Paul. */
11290#ifndef __cplusplus
11291 /* Ultrix mips cc rejects this. */
11292 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000011293 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011294 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011295 char const *const *pcpcc;
11296 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011297 /* NEC SVR4.0.2 mips cc rejects this. */
11298 struct point {int x, y;};
11299 static struct point const zero = {0,0};
11300 /* AIX XL C 1.02.0.0 rejects this.
11301 It does not let you subtract one const X* pointer from another in
11302 an arm of an if-expression whose if-part is not a constant
11303 expression */
11304 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011305 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011306 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011307 ++pcpcc;
11308 ppc = (char**) pcpcc;
11309 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011310 { /* SCO 3.2v4 cc rejects this. */
11311 char *t;
11312 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011313
Martin v. Löwis11437992002-04-12 09:54:03 +000011314 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011315 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011316 }
11317 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11318 int x[] = {25, 17};
11319 const int *foo = &x[0];
11320 ++foo;
11321 }
11322 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11323 typedef const int *iptr;
11324 iptr p = 0;
11325 ++p;
11326 }
11327 { /* AIX XL C 1.02.0.0 rejects this saying
11328 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11329 struct s { int j; const int *ap[3]; };
11330 struct s *b; b->j = 5;
11331 }
11332 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11333 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011334 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011336 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011337#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011338
Martin v. Löwis11437992002-04-12 09:54:03 +000011339 ;
11340 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011341}
Martin v. Löwis11437992002-04-12 09:54:03 +000011342_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011343if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011344 ac_cv_c_const=yes
11345else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011346 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011349fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11351$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011352if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011353
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011354$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011355
11356fi
11357
Michael W. Hudson54241132001-12-07 15:38:26 +000011358
Guido van Rossumda88dad1995-01-26 00:46:29 +000011359works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11361$as_echo_n "checking for working volatile... " >&6; }
11362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011363/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011364
Martin v. Löwis11437992002-04-12 09:54:03 +000011365int
11366main ()
11367{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011368volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011369 ;
11370 return 0;
11371}
11372_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011373if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011374 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011375else
Skip Montanaro6dead952003-09-25 14:50:04 +000011376
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011377$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011378
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011379
Guido van Rossum627b2d71993-12-24 10:39:16 +000011380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11383$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011384
Guido van Rossumda88dad1995-01-26 00:46:29 +000011385works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11387$as_echo_n "checking for working signed char... " >&6; }
11388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011389/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011390
Martin v. Löwis11437992002-04-12 09:54:03 +000011391int
11392main ()
11393{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011394signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011395 ;
11396 return 0;
11397}
11398_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011399if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011400 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011401else
Skip Montanaro6dead952003-09-25 14:50:04 +000011402
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011403$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011404
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011405
Guido van Rossum7f43da71994-08-01 12:15:30 +000011406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11409$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011410
Guido van Rossumda88dad1995-01-26 00:46:29 +000011411have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11413$as_echo_n "checking for prototypes... " >&6; }
11414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011415/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011416int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011417int
11418main ()
11419{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011420return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011421 ;
11422 return 0;
11423}
11424_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011425if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011426
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011427$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011428
Matthias Klosec511b472010-05-08 11:01:39 +000011429 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11433$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011434
Guido van Rossumda88dad1995-01-26 00:46:29 +000011435works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11437$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011439/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011440
11441#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011442int foo(int x, ...) {
11443 va_list va;
11444 va_start(va, x);
11445 va_arg(va, int);
11446 va_arg(va, char *);
11447 va_arg(va, double);
11448 return 0;
11449}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011450
Martin v. Löwis11437992002-04-12 09:54:03 +000011451int
11452main ()
11453{
Guido van Rossum90eea071996-08-30 20:58:57 +000011454return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 ;
11456 return 0;
11457}
11458_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011459if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011460
11461
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011462$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011463
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011464 works=yes
11465
Guido van Rossum627b2d71993-12-24 10:39:16 +000011466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11469$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011470
Martin v. Löwisd6320502004-08-12 13:45:08 +000011471# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11473$as_echo_n "checking for socketpair... " >&6; }
11474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011475/* end confdefs.h. */
11476
11477#include <sys/types.h>
11478#include <sys/socket.h>
11479
11480int
11481main ()
11482{
11483void *x=socketpair
11484 ;
11485 return 0;
11486}
11487_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011488if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011489
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011490$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011491
Matthias Klosec511b472010-05-08 11:01:39 +000011492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011493$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011494else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11496$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011497
11498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011500
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011501# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11503$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011505/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011506#include <sys/types.h>
11507#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011508int
11509main ()
11510{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011511struct sockaddr x;
11512x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011513 ;
11514 return 0;
11515}
11516_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011517if ac_fn_c_try_compile "$LINENO"; then :
11518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11519$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011520
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011521$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011522
11523else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11525$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011526
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011529
Guido van Rossumda88dad1995-01-26 00:46:29 +000011530va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11532$as_echo_n "checking whether va_list is an array... " >&6; }
11533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011534/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011535
11536#ifdef HAVE_STDARG_PROTOTYPES
11537#include <stdarg.h>
11538#else
11539#include <varargs.h>
11540#endif
11541
Martin v. Löwis11437992002-04-12 09:54:03 +000011542int
11543main ()
11544{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011545va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011546 ;
11547 return 0;
11548}
11549_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011550if ac_fn_c_try_compile "$LINENO"; then :
11551
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011552else
Skip Montanaro6dead952003-09-25 14:50:04 +000011553
Martin v. Löwis11437992002-04-12 09:54:03 +000011554
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011555$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011556
Guido van Rossumda88dad1995-01-26 00:46:29 +000011557 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011558
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11562$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011563
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011564# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011565
11566
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011567ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Charles-François Natali97781b02011-07-22 23:43:42 +020011568if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011569
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011570 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011571
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11573$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011574 OLD_CFLAGS=$CFLAGS
11575 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011577/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011578
11579# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011580
Martin v. Löwis11437992002-04-12 09:54:03 +000011581int
11582main ()
11583{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011584
11585 char *name;
11586 struct hostent *he, *res;
11587 char buffer[2048];
11588 int buflen = 2048;
11589 int h_errnop;
11590
11591 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011592
11593 ;
11594 return 0;
11595}
11596_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011597if ac_fn_c_try_compile "$LINENO"; 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
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011600
Martin v. Löwis11437992002-04-12 09:54:03 +000011601
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011602$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011603
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11605$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011606
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011607else
Skip Montanaro6dead952003-09-25 14:50:04 +000011608
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11610$as_echo "no" >&6; }
11611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11612$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011614/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011615
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011616# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011617
Martin v. Löwis11437992002-04-12 09:54:03 +000011618int
11619main ()
11620{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011621
11622 char *name;
11623 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011624 char buffer[2048];
11625 int buflen = 2048;
11626 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011627
Matthias Klosec511b472010-05-08 11:01:39 +000011628 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011629
11630 ;
11631 return 0;
11632}
11633_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011634if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011635
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011636 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011637
Martin v. Löwis11437992002-04-12 09:54:03 +000011638
Matthias Klosec511b472010-05-08 11:01:39 +000011639$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011640
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11642$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011643
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011644else
Skip Montanaro6dead952003-09-25 14:50:04 +000011645
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11647$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11649$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11651/* end confdefs.h. */
11652
11653# include <netdb.h>
11654
11655int
11656main ()
11657{
11658
11659 char *name;
11660 struct hostent *he;
11661 struct hostent_data data;
11662
11663 (void) gethostbyname_r(name, he, &data);
11664
11665 ;
11666 return 0;
11667}
11668_ACEOF
11669if ac_fn_c_try_compile "$LINENO"; then :
11670
11671 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11672
11673
11674$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11675
11676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11677$as_echo "yes" >&6; }
11678
11679else
11680
11681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11682$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011683
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011686
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011689
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011692 CFLAGS=$OLD_CFLAGS
11693
11694else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011695
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011696 for ac_func in gethostbyname
11697do :
11698 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Charles-François Natali97781b02011-07-22 23:43:42 +020011699if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011700 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011701#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011702_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011703
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011704fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011705done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011706
Michael W. Hudson54241132001-12-07 15:38:26 +000011707
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011708fi
11709
Michael W. Hudson54241132001-12-07 15:38:26 +000011710
11711
11712
11713
11714
11715
Guido van Rossum627b2d71993-12-24 10:39:16 +000011716# checks for system services
11717# (none yet)
11718
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011719# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011720ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Charles-François Natali97781b02011-07-22 23:43:42 +020011721if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011722
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011723else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11725$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011726if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011727 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011728else
Martin v. Löwis11437992002-04-12 09:54:03 +000011729 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011730LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011733
Martin v. Löwiseba40652007-08-30 20:10:57 +000011734/* Override any GCC internal prototype to avoid an error.
11735 Use char because int might match the return type of a GCC
11736 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011737#ifdef __cplusplus
11738extern "C"
11739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011740char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011741int
11742main ()
11743{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011744return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011745 ;
11746 return 0;
11747}
11748_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011749if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011750 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011752 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011753fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011754rm -f core conftest.err conftest.$ac_objext \
11755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011756LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011757fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11759$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011760if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011761 cat >>confdefs.h <<_ACEOF
11762#define HAVE_LIBIEEE 1
11763_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011764
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011765 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011766
Guido van Rossum627b2d71993-12-24 10:39:16 +000011767fi
11768
Michael W. Hudson54241132001-12-07 15:38:26 +000011769
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011770fi
11771
Michael W. Hudson54241132001-12-07 15:38:26 +000011772
Guido van Rossum7f253911997-05-09 02:42:48 +000011773# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11775$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011776
Martin v. Löwiseba40652007-08-30 20:10:57 +000011777# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011778if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011779 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011780if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011781then
11782
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011783$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011784
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11786$as_echo "yes" >&6; }
11787else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11788$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011789fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011790else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11792$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011793fi
11794
Guido van Rossum7f253911997-05-09 02:42:48 +000011795
Guido van Rossum7f43da71994-08-01 12:15:30 +000011796# check for --with-libm=...
11797
Guido van Rossum563e7081996-09-10 18:20:48 +000011798case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011799Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011800BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011801*) LIBM=-lm
11802esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11804$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011805
Martin v. Löwiseba40652007-08-30 20:10:57 +000011806# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011807if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011808 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011809if test "$withval" = no
11810then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11812$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011813elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011814then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11816$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011817else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011818fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11821$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011822fi
11823
Guido van Rossum7f43da71994-08-01 12:15:30 +000011824
11825# check for --with-libc=...
11826
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11828$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011829
Martin v. Löwiseba40652007-08-30 20:10:57 +000011830# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011831if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011832 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011833if test "$withval" = no
11834then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11836$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011837elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011838then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11840$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011841else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011842fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011843else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11845$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011846fi
11847
Guido van Rossum7f43da71994-08-01 12:15:30 +000011848
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011849# **************************************************
11850# * Check for various properties of floating point *
11851# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000011852
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11854$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011855if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011856 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011857else
11858
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011859if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011860 ac_cv_little_endian_double=no
11861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011863/* end confdefs.h. */
11864
11865#include <string.h>
11866int main() {
11867 double x = 9006104071832581.0;
11868 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11869 return 0;
11870 else
11871 return 1;
11872}
11873
11874_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011875if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011876 ac_cv_little_endian_double=yes
11877else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011878 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011879fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11881 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011882fi
11883
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011884fi
11885
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11887$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011888if test "$ac_cv_little_endian_double" = yes
11889then
11890
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011891$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011892
11893fi
11894
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11896$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011897if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011898 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011899else
11900
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011901if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011902 ac_cv_big_endian_double=no
11903else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011905/* end confdefs.h. */
11906
11907#include <string.h>
11908int main() {
11909 double x = 9006104071832581.0;
11910 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11911 return 0;
11912 else
11913 return 1;
11914}
11915
11916_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011917if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011918 ac_cv_big_endian_double=yes
11919else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011920 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011921fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11923 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011924fi
11925
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011926fi
11927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11929$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011930if test "$ac_cv_big_endian_double" = yes
11931then
11932
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011933$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011934
11935fi
11936
11937# Some ARM platforms use a mixed-endian representation for doubles.
11938# While Python doesn't currently have full support for these platforms
11939# (see e.g., issue 1762561), we can at least make sure that float <-> string
11940# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11942$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011943if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011944 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011945else
11946
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011947if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011948 ac_cv_mixed_endian_double=no
11949else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011951/* end confdefs.h. */
11952
11953#include <string.h>
11954int main() {
11955 double x = 9006104071832581.0;
11956 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11957 return 0;
11958 else
11959 return 1;
11960}
11961
11962_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011963if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011964 ac_cv_mixed_endian_double=yes
11965else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011966 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011967fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011968rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11969 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011970fi
11971
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011972fi
11973
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11975$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011976if test "$ac_cv_mixed_endian_double" = yes
11977then
11978
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011979$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011980
11981fi
11982
11983# The short float repr introduced in Python 3.1 requires the
11984# correctly-rounded string <-> double conversion functions from
11985# Python/dtoa.c, which in turn require that the FPU uses 53-bit
11986# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000011987# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011988# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000011989
11990# This inline assembler syntax may also work for suncc and icc,
11991# so we try it on all platforms.
11992
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11994$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011996/* end confdefs.h. */
11997
11998int
11999main ()
12000{
12001
Mark Dickinsona548dee2009-11-15 13:12:43 +000012002 unsigned short cw;
12003 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12004 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012005
12006 ;
12007 return 0;
12008}
12009_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012010if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012011 have_gcc_asm_for_x87=yes
12012else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012013 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012014fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12017$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012018if test "$have_gcc_asm_for_x87" = yes
12019then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012020
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012021$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012022
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012023fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012024
Mark Dickinson04b27232009-01-04 12:29:36 +000012025# Detect whether system arithmetic is subject to x87-style double
12026# rounding issues. The result of this test has little meaning on non
12027# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12028# mode is round-to-nearest and double rounding issues are present, and
12029# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12031$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012032# $BASECFLAGS may affect the result
12033ac_save_cc="$CC"
12034CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012035if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012036 ac_cv_x87_double_rounding=no
12037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012039/* end confdefs.h. */
12040
12041#include <stdlib.h>
12042#include <math.h>
12043int main() {
12044 volatile double x, y, z;
12045 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12046 x = 0.99999999999999989; /* 1-2**-53 */
12047 y = 1./x;
12048 if (y != 1.)
12049 exit(0);
12050 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12051 x = 1e16;
12052 y = 2.99999;
12053 z = x + y;
12054 if (z != 1e16+4.)
12055 exit(0);
12056 /* both tests show evidence of double rounding */
12057 exit(1);
12058}
12059
12060_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012061if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012062 ac_cv_x87_double_rounding=no
12063else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012064 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012065fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012066rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12067 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012068fi
12069
Mark Dickinson99abd142009-10-24 13:44:16 +000012070CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12072$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012073if test "$ac_cv_x87_double_rounding" = yes
12074then
12075
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012076$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012077
12078fi
12079
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012080# ************************************
12081# * Check for mathematical functions *
12082# ************************************
12083
12084LIBS_SAVE=$LIBS
12085LIBS="$LIBS $LIBM"
12086
Mark Dickinson265d7382008-04-21 22:32:24 +000012087# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12088# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12090$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012091if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012092 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012093else
12094
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012095if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012096 ac_cv_tanh_preserves_zero_sign=no
12097else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012099/* end confdefs.h. */
12100
12101#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012102#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012103int main() {
12104 /* return 0 if either negative zeros don't exist
12105 on this platform or if negative zeros exist
12106 and tanh(-0.) == -0. */
12107 if (atan2(0., -1.) == atan2(-0., -1.) ||
12108 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12109 else exit(1);
12110}
12111
12112_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012113if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012114 ac_cv_tanh_preserves_zero_sign=yes
12115else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012116 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012117fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12119 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012120fi
12121
Mark Dickinson265d7382008-04-21 22:32:24 +000012122fi
12123
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12125$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012126if test "$ac_cv_tanh_preserves_zero_sign" = yes
12127then
12128
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012129$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012130
12131fi
12132
Mark Dickinson65898e02009-09-05 10:27:00 +000012133for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012134do :
12135 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12136ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012137if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012138 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012139#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012140_ACEOF
12141
12142fi
12143done
12144
Mark Dickinson65898e02009-09-05 10:27:00 +000012145for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012146do :
12147 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12148ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012149if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012150 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012151#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012152_ACEOF
12153
12154fi
12155done
12156
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012157ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12158"
Charles-François Natali97781b02011-07-22 23:43:42 +020012159if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012160 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012161else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012162 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012163fi
12164
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012165cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012166#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012167_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012168ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12169"
Charles-François Natali97781b02011-07-22 23:43:42 +020012170if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012171 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012172else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012173 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012174fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012175
12176cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012177#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012178_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012179ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12180"
Charles-François Natali97781b02011-07-22 23:43:42 +020012181if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012182 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012183else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012184 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012185fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012186
12187cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012188#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012189_ACEOF
12190
12191
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012192LIBS=$LIBS_SAVE
12193
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012194# For multiprocessing module, check that sem_open
12195# actually works. For FreeBSD versions <= 7.2,
12196# the kernel module that provides POSIX semaphores
12197# isn't loaded by default, so an attempt to call
12198# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12200$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012201if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012202 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012203else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012204 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012205 ac_cv_posix_semaphores_enabled=yes
12206else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012208/* end confdefs.h. */
12209
12210#include <unistd.h>
12211#include <fcntl.h>
12212#include <stdio.h>
12213#include <semaphore.h>
12214#include <sys/stat.h>
12215
12216int main(void) {
12217 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12218 if (a == SEM_FAILED) {
12219 perror("sem_open");
12220 return 1;
12221 }
12222 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012223 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012224 return 0;
12225}
12226
12227_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012228if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012229 ac_cv_posix_semaphores_enabled=yes
12230else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012231 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012232fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12234 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012235fi
12236
12237
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012238fi
12239
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12241$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012242if test $ac_cv_posix_semaphores_enabled = no
12243then
12244
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012245$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012246
12247fi
12248
12249# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12251$as_echo_n "checking for broken sem_getvalue... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012252if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012253 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012254else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012255 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012256 ac_cv_broken_sem_getvalue=yes
12257else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012259/* end confdefs.h. */
12260
12261#include <unistd.h>
12262#include <fcntl.h>
12263#include <stdio.h>
12264#include <semaphore.h>
12265#include <sys/stat.h>
12266
12267int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012268 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012269 int count;
12270 int res;
12271 if(a==SEM_FAILED){
12272 perror("sem_open");
12273 return 1;
12274
12275 }
12276 res = sem_getvalue(a, &count);
12277 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012278 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012279 return res==-1 ? 1 : 0;
12280}
12281
12282_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012283if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012284 ac_cv_broken_sem_getvalue=no
12285else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012286 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012287fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12289 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012290fi
12291
12292
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012293fi
12294
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12296$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012297if test $ac_cv_broken_sem_getvalue = yes
12298then
12299
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012300$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012301
12302fi
12303
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012304# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12306$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012307# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012308if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012309 enableval=$enable_big_digits; case $enable_big_digits in
12310yes)
12311 enable_big_digits=30 ;;
12312no)
12313 enable_big_digits=15 ;;
1231415|30)
12315 ;;
12316*)
Charles-François Natali97781b02011-07-22 23:43:42 +020012317 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 +000012318esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12320$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012321
12322cat >>confdefs.h <<_ACEOF
12323#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12324_ACEOF
12325
12326
12327else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12329$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012330fi
12331
12332
Guido van Rossumef2255b2000-03-10 22:30:29 +000012333# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012334ac_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 +020012335if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012336
12337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012338$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012339
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012340 wchar_h="yes"
12341
Guido van Rossumef2255b2000-03-10 22:30:29 +000012342else
Martin v. Löwis11437992002-04-12 09:54:03 +000012343 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012344
12345fi
12346
Michael W. Hudson54241132001-12-07 15:38:26 +000012347
Martin v. Löwis11437992002-04-12 09:54:03 +000012348
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012349# determine wchar_t size
12350if test "$wchar_h" = yes
12351then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012352 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012353# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12354# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12355# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12357$as_echo_n "checking size of wchar_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012358if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012359 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012360else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012361 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12362"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012363
Martin v. Löwis11437992002-04-12 09:54:03 +000012364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012365 if test "$ac_cv_type_wchar_t" = yes; then
12366 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12367$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012368as_fn_error 77 "cannot compute sizeof (wchar_t)
Charles-François Natali97781b02011-07-22 23:43:42 +020012369See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012370 else
12371 ac_cv_sizeof_wchar_t=0
12372 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012373fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012374
Martin v. Löwis11437992002-04-12 09:54:03 +000012375fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12377$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012378
12379
12380
Martin v. Löwis11437992002-04-12 09:54:03 +000012381cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012382#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012383_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012384
Michael W. Hudson54241132001-12-07 15:38:26 +000012385
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012386fi
12387
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12389$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012390have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012392/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012393
12394#include <tcl.h>
12395#if TCL_UTF_MAX != 6
12396# error "NOT UCS4_TCL"
12397#endif
12398int
12399main ()
12400{
12401
12402 ;
12403 return 0;
12404}
12405_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012406if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012407
12408
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012409$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012410
12411 have_ucs4_tcl=yes
12412
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12416$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012417
Skip Montanaro6dead952003-09-25 14:50:04 +000012418# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012419if test "$wchar_h" = yes
12420then
12421 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12423$as_echo_n "checking whether wchar_t is signed... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012424 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012425 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012426else
12427
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012428 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012429 ac_cv_wchar_t_signed=yes
12430else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012432/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012433
12434 #include <wchar.h>
12435 int main()
12436 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012437 /* Success: exit code 0 */
12438 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012439 }
12440
12441_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012442if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012443 ac_cv_wchar_t_signed=yes
12444else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012445 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012446fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12448 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012449fi
12450
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012451fi
12452
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12454$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012455fi
12456
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12458$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012459# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012460if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012461 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012462else
12463 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012464fi
12465
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012466
12467if test $enable_unicode = yes
12468then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012469 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012470 case "$have_ucs4_tcl" in
12471 yes) enable_unicode="ucs4"
12472 ;;
12473 *) enable_unicode="ucs2"
12474 ;;
12475 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012476fi
12477
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012478
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012479case "$enable_unicode" in
12480ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012481 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012482
12483 ;;
12484ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012485 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012486
12487 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +020012488*) 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 +000012489esac
12490
Michael W. Hudson54241132001-12-07 15:38:26 +000012491
Martin v. Löwis11437992002-04-12 09:54:03 +000012492
12493
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012494if test "$enable_unicode" = "no"
12495then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012496 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12498$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012499else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012500 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012501
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012502$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012503
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012504
12505 # wchar_t is only usable if it maps to an unsigned type
12506 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012507 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012508 then
12509 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012510
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012511$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012512
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012513 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012514
12515 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12516 then
12517 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012518 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012519
12520 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12521 then
12522 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012523 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012524
12525 else
12526 PY_UNICODE_TYPE="no type found"
12527 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12529$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012530fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012531
12532# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12534$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012535if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012536 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012537else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012538 ac_cv_c_bigendian=unknown
12539 # See if we're dealing with a universal compiler.
12540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12541/* end confdefs.h. */
12542#ifndef __APPLE_CC__
12543 not a universal capable compiler
12544 #endif
12545 typedef int dummy;
12546
Skip Montanaro6dead952003-09-25 14:50:04 +000012547_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012548if ac_fn_c_try_compile "$LINENO"; then :
12549
12550 # Check for potential -arch flags. It is not universal unless
12551 # there are at least two -arch flags with different values.
12552 ac_arch=
12553 ac_prev=
12554 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12555 if test -n "$ac_prev"; then
12556 case $ac_word in
12557 i?86 | x86_64 | ppc | ppc64)
12558 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12559 ac_arch=$ac_word
12560 else
12561 ac_cv_c_bigendian=universal
12562 break
12563 fi
12564 ;;
12565 esac
12566 ac_prev=
12567 elif test "x$ac_word" = "x-arch"; then
12568 ac_prev=arch
12569 fi
12570 done
12571fi
12572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12573 if test $ac_cv_c_bigendian = unknown; then
12574 # See if sys/param.h defines the BYTE_ORDER macro.
12575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012576/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012577#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012578 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012579
Martin v. Löwis11437992002-04-12 09:54:03 +000012580int
12581main ()
12582{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012583#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12584 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12585 && LITTLE_ENDIAN)
12586 bogus endian macros
12587 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012588
12589 ;
12590 return 0;
12591}
12592_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012593if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012594 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012596/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012597#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012598 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012599
Martin v. Löwis11437992002-04-12 09:54:03 +000012600int
12601main ()
12602{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012603#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012604 not big endian
12605 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012606
12607 ;
12608 return 0;
12609}
12610_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012611if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012612 ac_cv_c_bigendian=yes
12613else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012614 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012617fi
12618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12619 fi
12620 if test $ac_cv_c_bigendian = unknown; then
12621 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012623/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012624#include <limits.h>
12625
Martin v. Löwis11437992002-04-12 09:54:03 +000012626int
12627main ()
12628{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012629#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12630 bogus endian macros
12631 #endif
12632
Martin v. Löwis11437992002-04-12 09:54:03 +000012633 ;
12634 return 0;
12635}
12636_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012637if ac_fn_c_try_compile "$LINENO"; then :
12638 # It does; now see whether it defined to _BIG_ENDIAN or not.
12639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12640/* end confdefs.h. */
12641#include <limits.h>
12642
12643int
12644main ()
12645{
12646#ifndef _BIG_ENDIAN
12647 not big endian
12648 #endif
12649
12650 ;
12651 return 0;
12652}
12653_ACEOF
12654if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012655 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012656else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012657 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012658fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12660fi
12661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12662 fi
12663 if test $ac_cv_c_bigendian = unknown; then
12664 # Compile a test program.
12665 if test "$cross_compiling" = yes; then :
12666 # Try to guess by grepping values from an object file.
12667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12668/* end confdefs.h. */
12669short int ascii_mm[] =
12670 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12671 short int ascii_ii[] =
12672 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12673 int use_ascii (int i) {
12674 return ascii_mm[i] + ascii_ii[i];
12675 }
12676 short int ebcdic_ii[] =
12677 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12678 short int ebcdic_mm[] =
12679 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12680 int use_ebcdic (int i) {
12681 return ebcdic_mm[i] + ebcdic_ii[i];
12682 }
12683 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012684
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012685int
12686main ()
12687{
12688return use_ascii (foo) == use_ebcdic (foo);
12689 ;
12690 return 0;
12691}
12692_ACEOF
12693if ac_fn_c_try_compile "$LINENO"; then :
12694 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12695 ac_cv_c_bigendian=yes
12696 fi
12697 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12698 if test "$ac_cv_c_bigendian" = unknown; then
12699 ac_cv_c_bigendian=no
12700 else
12701 # finding both strings is unlikely to happen, but who knows?
12702 ac_cv_c_bigendian=unknown
12703 fi
12704 fi
12705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012707else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012709/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012710$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012711int
12712main ()
12713{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012714
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012715 /* Are we little or big endian? From Harbison&Steele. */
12716 union
12717 {
12718 long int l;
12719 char c[sizeof (long int)];
12720 } u;
12721 u.l = 1;
12722 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012723
12724 ;
12725 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012726}
Martin v. Löwis11437992002-04-12 09:54:03 +000012727_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012728if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012729 ac_cv_c_bigendian=no
12730else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012731 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012732fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012736
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012737 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012738fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12740$as_echo "$ac_cv_c_bigendian" >&6; }
12741 case $ac_cv_c_bigendian in #(
12742 yes)
12743 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12744;; #(
12745 no)
12746 ;; #(
12747 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012748
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012749$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012750
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012751 ;; #(
12752 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012753 as_fn_error $? "unknown endianness
Charles-François Natali97781b02011-07-22 23:43:42 +020012754 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012755 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012756
Michael W. Hudson54241132001-12-07 15:38:26 +000012757
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012758# Check whether right shifting a negative integer extends the sign bit
12759# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12761$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012762if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012763 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012764else
Martin v. Löwis11437992002-04-12 09:54:03 +000012765
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012766if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012767 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012768else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012770/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012771
12772int main()
12773{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012774 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012775}
12776
Martin v. Löwis11437992002-04-12 09:54:03 +000012777_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012778if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012779 ac_cv_rshift_extends_sign=yes
12780else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012781 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12784 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012785fi
12786
Martin v. Löwiseba40652007-08-30 20:10:57 +000012787fi
12788
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12790$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012791if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012792then
Martin v. Löwis11437992002-04-12 09:54:03 +000012793
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012794$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012795
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012796fi
12797
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012798# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12800$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012801if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012802 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012803else
Martin v. Löwis11437992002-04-12 09:54:03 +000012804
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012806/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012807#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012808int
12809main ()
12810{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012811
12812 FILE *f = fopen("/dev/null", "r");
12813 flockfile(f);
12814 getc_unlocked(f);
12815 funlockfile(f);
12816
Martin v. Löwis11437992002-04-12 09:54:03 +000012817 ;
12818 return 0;
12819}
12820_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012821if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012822 ac_cv_have_getc_unlocked=yes
12823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012824 ac_cv_have_getc_unlocked=no
12825fi
12826rm -f core conftest.err conftest.$ac_objext \
12827 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012828fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12831$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012832if test "$ac_cv_have_getc_unlocked" = yes
12833then
Martin v. Löwis11437992002-04-12 09:54:03 +000012834
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012835$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012836
12837fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012838
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012839# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012840# save the value of LIBS so we don't actually link Python with readline
12841LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012842
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012843# On some systems we need to link readline to a termcap compatible
12844# library. NOTE: Keep the precedence of listed libraries synchronised
12845# with setup.py.
12846py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12848$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012849for py_libtermcap in "" ncursesw ncurses curses termcap; do
12850 if test -z "$py_libtermcap"; then
12851 READLINE_LIBS="-lreadline"
12852 else
12853 READLINE_LIBS="-lreadline -l$py_libtermcap"
12854 fi
12855 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012857/* end confdefs.h. */
12858
Martin v. Löwiseba40652007-08-30 20:10:57 +000012859/* Override any GCC internal prototype to avoid an error.
12860 Use char because int might match the return type of a GCC
12861 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012862#ifdef __cplusplus
12863extern "C"
12864#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012865char readline ();
12866int
12867main ()
12868{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012869return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012870 ;
12871 return 0;
12872}
12873_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012874if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012875 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012876fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012877rm -f core conftest.err conftest.$ac_objext \
12878 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012879 if test $py_cv_lib_readline = yes; then
12880 break
12881 fi
12882done
12883# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12884#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000012885if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12887$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012888else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12890$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012891
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012892$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012893
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012894fi
12895
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012896# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12898$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012899if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012900 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012901else
12902 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012903LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012905/* end confdefs.h. */
12906
Martin v. Löwiseba40652007-08-30 20:10:57 +000012907/* Override any GCC internal prototype to avoid an error.
12908 Use char because int might match the return type of a GCC
12909 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012910#ifdef __cplusplus
12911extern "C"
12912#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012913char rl_callback_handler_install ();
12914int
12915main ()
12916{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012917return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012918 ;
12919 return 0;
12920}
12921_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012922if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012923 ac_cv_lib_readline_rl_callback_handler_install=yes
12924else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012925 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012926fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012927rm -f core conftest.err conftest.$ac_objext \
12928 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012929LIBS=$ac_check_lib_save_LIBS
12930fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12932$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012933if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012934
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012935$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012936
12937fi
12938
12939
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012940# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012942/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012943#include <readline/readline.h>
12944_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012945if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012946 have_readline=yes
12947else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012948 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000012949
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012950fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012951rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012952if test $have_readline = yes
12953then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012955/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012956#include <readline/readline.h>
12957
12958_ACEOF
12959if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012960 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012961
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012962$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012963
12964fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012965rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012966
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012968/* end confdefs.h. */
12969#include <readline/readline.h>
12970
12971_ACEOF
12972if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012973 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012975$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012976
12977fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012978rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012979
12980fi
12981
Martin v. Löwis0daad592001-09-30 21:09:59 +000012982# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12984$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012985if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012986 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012987else
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012989LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012991/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012992
Martin v. Löwiseba40652007-08-30 20:10:57 +000012993/* Override any GCC internal prototype to avoid an error.
12994 Use char because int might match the return type of a GCC
12995 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012996#ifdef __cplusplus
12997extern "C"
12998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012999char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013000int
13001main ()
13002{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013003return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013004 ;
13005 return 0;
13006}
13007_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013008if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013011 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013012fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013013rm -f core conftest.err conftest.$ac_objext \
13014 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013015LIBS=$ac_check_lib_save_LIBS
13016fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13018$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013019if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013020
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013021$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013022
Martin v. Löwis0daad592001-09-30 21:09:59 +000013023fi
13024
Michael W. Hudson54241132001-12-07 15:38:26 +000013025
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013026# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13028$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013029if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013030 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013031else
13032 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013033LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013035/* end confdefs.h. */
13036
13037/* Override any GCC internal prototype to avoid an error.
13038 Use char because int might match the return type of a GCC
13039 builtin and then its argument prototype would still apply. */
13040#ifdef __cplusplus
13041extern "C"
13042#endif
13043char rl_completion_display_matches_hook ();
13044int
13045main ()
13046{
13047return rl_completion_display_matches_hook ();
13048 ;
13049 return 0;
13050}
13051_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013052if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013053 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13054else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013055 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013056fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013057rm -f core conftest.err conftest.$ac_objext \
13058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013059LIBS=$ac_check_lib_save_LIBS
13060fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13062$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013063if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013064
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013065$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013066
13067fi
13068
13069
Martin v. Löwis0daad592001-09-30 21:09:59 +000013070# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13072$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013073if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013074 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013075else
Martin v. Löwis11437992002-04-12 09:54:03 +000013076 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013077LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013080
Martin v. Löwiseba40652007-08-30 20:10:57 +000013081/* Override any GCC internal prototype to avoid an error.
13082 Use char because int might match the return type of a GCC
13083 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013084#ifdef __cplusplus
13085extern "C"
13086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013087char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013088int
13089main ()
13090{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013091return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013092 ;
13093 return 0;
13094}
13095_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013096if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013097 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013099 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013100fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013101rm -f core conftest.err conftest.$ac_objext \
13102 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013103LIBS=$ac_check_lib_save_LIBS
13104fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13106$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013107if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013108
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013109$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013110
Guido van Rossum353ae582001-07-10 16:45:32 +000013111fi
13112
Jack Jansendd19cf82001-12-06 22:36:17 +000013113
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013114# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013116/* end confdefs.h. */
13117#include <readline/readline.h>
13118_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013119if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013120 have_readline=yes
13121else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013122 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013123
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013124fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013125rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013126if test $have_readline = yes
13127then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013129/* end confdefs.h. */
13130#include <readline/readline.h>
13131
13132_ACEOF
13133if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013134 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013135
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013136$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013137
13138fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013139rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013140
13141fi
13142
Martin v. Löwis82bca632006-02-10 20:49:30 +000013143# End of readline checks: restore LIBS
13144LIBS=$LIBS_no_readline
13145
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13147$as_echo_n "checking for broken nice()... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013148if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013149 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013150else
Martin v. Löwis11437992002-04-12 09:54:03 +000013151
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013152if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013153 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013154else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013156/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013157
13158int main()
13159{
13160 int val1 = nice(1);
13161 if (val1 != -1 && val1 == nice(2))
13162 exit(0);
13163 exit(1);
13164}
13165
Martin v. Löwis11437992002-04-12 09:54:03 +000013166_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013167if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013168 ac_cv_broken_nice=yes
13169else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013170 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013171fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13173 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013174fi
13175
Martin v. Löwiseba40652007-08-30 20:10:57 +000013176fi
13177
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13179$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013180if test "$ac_cv_broken_nice" = yes
13181then
Martin v. Löwis11437992002-04-12 09:54:03 +000013182
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013183$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013184
13185fi
13186
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13188$as_echo_n "checking for broken poll()... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013189if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013190 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013191else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013192 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013193 ac_cv_broken_poll=no
13194else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013196/* end confdefs.h. */
13197
13198#include <poll.h>
13199
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013200int main()
13201{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013202 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013203 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013204
13205 close (42);
13206
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013207 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013208 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013209 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013210 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013211 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013212 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013213 return 1;
13214}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013215
13216_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013217if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013218 ac_cv_broken_poll=yes
13219else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013220 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013221fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13223 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013225
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013226fi
13227
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13229$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013230if test "$ac_cv_broken_poll" = yes
13231then
13232
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013233$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013234
13235fi
13236
Brett Cannon43802422005-02-10 20:48:03 +000013237# 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 +000013238# (which is not required by ISO C or UNIX spec) and/or if we support
13239# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013240ac_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 +000013241#include <$ac_cv_struct_tm>
13242
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013243"
Charles-François Natali97781b02011-07-22 23:43:42 +020013244if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013245
13246cat >>confdefs.h <<_ACEOF
13247#define HAVE_STRUCT_TM_TM_ZONE 1
13248_ACEOF
13249
13250
13251fi
13252
13253if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13254
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013255$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013256
13257else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013258 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13259"
Charles-François Natali97781b02011-07-22 23:43:42 +020013260if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013261 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013262else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013263 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013264fi
13265
Martin v. Löwiseba40652007-08-30 20:10:57 +000013266cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013267#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013268_ACEOF
13269
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13271$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013272if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013273 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013274else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013276/* end confdefs.h. */
13277#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013278#if !HAVE_DECL_TZNAME
13279extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013280#endif
13281
13282int
13283main ()
13284{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013285return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013286 ;
13287 return 0;
13288}
13289_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013290if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013291 ac_cv_var_tzname=yes
13292else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013293 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013294fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013295rm -f core conftest.err conftest.$ac_objext \
13296 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013297fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13299$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013300 if test $ac_cv_var_tzname = yes; then
13301
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013302$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013303
13304 fi
13305fi
13306
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013307
Martin v. Löwis1d459062005-03-14 21:23:33 +000013308# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13310$as_echo_n "checking for working tzset()... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013311if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013312 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013313else
13314
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013315if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013316 ac_cv_working_tzset=no
13317else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013319/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013320
13321#include <stdlib.h>
13322#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013323#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013324
13325#if HAVE_TZNAME
13326extern char *tzname[];
13327#endif
13328
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013329int main()
13330{
Brett Cannon18367812003-09-19 00:59:16 +000013331 /* Note that we need to ensure that not only does tzset(3)
13332 do 'something' with localtime, but it works as documented
13333 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013334 This includes making sure that tzname is set properly if
13335 tm->tm_zone does not exist since it is the alternative way
13336 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013337
13338 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013339 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013340 */
13341
Martin v. Löwis1d459062005-03-14 21:23:33 +000013342 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013343 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13344
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013345 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013346 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013347 if (localtime(&groundhogday)->tm_hour != 0)
13348 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013349#if HAVE_TZNAME
13350 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13351 if (strcmp(tzname[0], "UTC") ||
13352 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13353 exit(1);
13354#endif
Brett Cannon18367812003-09-19 00:59:16 +000013355
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013356 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013357 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013358 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013359 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013360#if HAVE_TZNAME
13361 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13362 exit(1);
13363#endif
Brett Cannon18367812003-09-19 00:59:16 +000013364
13365 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13366 tzset();
13367 if (localtime(&groundhogday)->tm_hour != 11)
13368 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013369#if HAVE_TZNAME
13370 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13371 exit(1);
13372#endif
13373
13374#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013375 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13376 exit(1);
13377 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13378 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013379#endif
Brett Cannon18367812003-09-19 00:59:16 +000013380
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013381 exit(0);
13382}
13383
13384_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013385if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013386 ac_cv_working_tzset=yes
13387else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013388 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013389fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13391 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013392fi
13393
Martin v. Löwiseba40652007-08-30 20:10:57 +000013394fi
13395
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13397$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013398if test "$ac_cv_working_tzset" = yes
13399then
13400
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013401$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013402
13403fi
13404
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013405# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13407$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013408if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013409 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013410else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013412/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013413#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013414int
13415main ()
13416{
13417
13418struct stat st;
13419st.st_mtim.tv_nsec = 1;
13420
13421 ;
13422 return 0;
13423}
13424_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013425if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013426 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013427else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013428 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13431fi
13432
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13434$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013435if test "$ac_cv_stat_tv_nsec" = yes
13436then
13437
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013438$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013439
13440fi
13441
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013442# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13444$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013445if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013446 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013447else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013449/* end confdefs.h. */
13450#include <sys/stat.h>
13451int
13452main ()
13453{
13454
13455struct stat st;
13456st.st_mtimespec.tv_nsec = 1;
13457
13458 ;
13459 return 0;
13460}
13461_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013462if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013463 ac_cv_stat_tv_nsec2=yes
13464else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013465 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13468fi
13469
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13471$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013472if test "$ac_cv_stat_tv_nsec2" = yes
13473then
13474
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013475$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013476
13477fi
13478
Jack Jansen666b1e72001-10-31 12:11:48 +000013479# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13481$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013482if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013483 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013484else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013486/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013487#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013488int
13489main ()
13490{
Jack Jansen666b1e72001-10-31 12:11:48 +000013491
13492 int rtn;
13493 rtn = mvwdelch(0,0,0);
13494
Martin v. Löwis11437992002-04-12 09:54:03 +000013495 ;
13496 return 0;
13497}
13498_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013499if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013500 ac_cv_mvwdelch_is_expression=yes
13501else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013502 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13505fi
13506
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13508$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013509
13510if test "$ac_cv_mvwdelch_is_expression" = yes
13511then
Martin v. Löwis11437992002-04-12 09:54:03 +000013512
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013513$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013514
13515fi
13516
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13518$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013519if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013520 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013521else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013523/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013524#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013525int
13526main ()
13527{
Jack Jansen666b1e72001-10-31 12:11:48 +000013528
13529 WINDOW *w;
13530 w->_flags = 0;
13531
Martin v. Löwis11437992002-04-12 09:54:03 +000013532 ;
13533 return 0;
13534}
13535_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013536if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013537 ac_cv_window_has_flags=yes
13538else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013539 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13542fi
13543
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13545$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013546
Jack Jansen666b1e72001-10-31 12:11:48 +000013547
13548if test "$ac_cv_window_has_flags" = yes
13549then
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013551$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013552
13553fi
13554
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13556$as_echo_n "checking for is_term_resized... " >&6; }
13557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013558/* end confdefs.h. */
13559#include <curses.h>
13560int
13561main ()
13562{
13563void *x=is_term_resized
13564 ;
13565 return 0;
13566}
13567_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013568if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013569
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013570$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013571
Matthias Klosec511b472010-05-08 11:01:39 +000013572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013573$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013574else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13576$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013577
13578fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13580
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13582$as_echo_n "checking for resize_term... " >&6; }
13583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013584/* end confdefs.h. */
13585#include <curses.h>
13586int
13587main ()
13588{
13589void *x=resize_term
13590 ;
13591 return 0;
13592}
13593_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013594if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013595
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013596$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013597
Matthias Klosec511b472010-05-08 11:01:39 +000013598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013599$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013600else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13602$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013603
13604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13606
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13608$as_echo_n "checking for resizeterm... " >&6; }
13609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013610/* end confdefs.h. */
13611#include <curses.h>
13612int
13613main ()
13614{
13615void *x=resizeterm
13616 ;
13617 return 0;
13618}
13619_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013620if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013621
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013622$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013623
Matthias Klosec511b472010-05-08 11:01:39 +000013624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013625$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013626else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13628$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013629
13630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13632
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13634$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013635
13636if test -r /dev/ptmx
13637then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13639$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013640
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013641$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013642
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013643else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13645$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013646fi
13647
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13649$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013650
13651if test -r /dev/ptc
13652then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13654$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013655
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013656$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013657
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013658else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13660$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013661fi
13662
Mark Dickinson82864d12009-11-15 16:18:58 +000013663if test "$have_long_long" = yes
13664then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13666$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013667 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013668 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013669else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013670 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013671 ac_cv_have_long_long_format=no
13672else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013674/* end confdefs.h. */
13675
13676 #include <stdio.h>
13677 #include <stddef.h>
13678 #include <string.h>
13679
13680 #ifdef HAVE_SYS_TYPES_H
13681 #include <sys/types.h>
13682 #endif
13683
13684 int main()
13685 {
13686 char buffer[256];
13687
13688 if (sprintf(buffer, "%lld", (long long)123) < 0)
13689 return 1;
13690 if (strcmp(buffer, "123"))
13691 return 1;
13692
13693 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13694 return 1;
13695 if (strcmp(buffer, "-123"))
13696 return 1;
13697
13698 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13699 return 1;
13700 if (strcmp(buffer, "123"))
13701 return 1;
13702
13703 return 0;
13704 }
13705
13706_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013707if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013708 ac_cv_have_long_long_format=yes
13709else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013710 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013711fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13713 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013714fi
13715
13716
Mark Dickinson82864d12009-11-15 16:18:58 +000013717fi
13718
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13720$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013721fi
13722
Mark Dickinson5ce84742009-12-31 20:48:04 +000013723if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013724then
13725
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013726$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013727
13728fi
13729
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013730if test $ac_sys_system = Darwin
13731then
13732 LIBS="$LIBS -framework CoreFoundation"
13733fi
13734
Mark Dickinson82864d12009-11-15 16:18:58 +000013735
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13737$as_echo_n "checking for %zd printf() format support... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013738if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013739 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013740else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013741 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013742 ac_cv_have_size_t_format="cross -- assuming yes"
13743
Brett Cannon09d12362006-05-11 05:11:33 +000013744else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013746/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013747
Brett Cannon09d12362006-05-11 05:11:33 +000013748#include <stdio.h>
13749#include <stddef.h>
13750#include <string.h>
13751
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013752#ifdef HAVE_SYS_TYPES_H
13753#include <sys/types.h>
13754#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013755
13756#ifdef HAVE_SSIZE_T
13757typedef ssize_t Py_ssize_t;
13758#elif SIZEOF_VOID_P == SIZEOF_LONG
13759typedef long Py_ssize_t;
13760#else
13761typedef int Py_ssize_t;
13762#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013763
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013764int main()
13765{
13766 char buffer[256];
13767
Brett Cannon09d12362006-05-11 05:11:33 +000013768 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13769 return 1;
13770
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013771 if (strcmp(buffer, "123"))
13772 return 1;
13773
13774 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13775 return 1;
13776
13777 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013778 return 1;
13779
13780 return 0;
13781}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013782
Brett Cannon09d12362006-05-11 05:11:33 +000013783_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013784if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013785 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013786else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013787 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013788fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13790 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013791fi
13792
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013793fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13795$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013796if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013797
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013798$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013799
13800fi
13801
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013802ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013803#ifdef HAVE_SYS_TYPES_H
13804#include <sys/types.h>
13805#endif
13806#ifdef HAVE_SYS_SOCKET_H
13807#include <sys/socket.h>
13808#endif
13809
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013810"
Charles-François Natali97781b02011-07-22 23:43:42 +020013811if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013812
Martin v. Löwis11437992002-04-12 09:54:03 +000013813else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013814
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013815$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013816
13817fi
13818
Michael W. Hudson54241132001-12-07 15:38:26 +000013819
Benjamin Peterson7497e912010-10-16 00:53:39 +000013820case $ac_sys_system in
13821AIX*)
13822
13823$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13824 ;;
13825esac
13826
13827
Michael W. Hudson54241132001-12-07 15:38:26 +000013828
13829
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013830for h in `(cd $srcdir;echo Python/thread_*.h)`
13831do
13832 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13833done
13834
Michael W. Hudson54241132001-12-07 15:38:26 +000013835
Neal Norwitzd24499d2005-12-18 21:36:39 +000013836SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13838$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013839for dir in $SRCDIRS; do
13840 if test ! -d $dir; then
13841 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013842 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013843done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13845$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013846
Guido van Rossum627b2d71993-12-24 10:39:16 +000013847# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000013848ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013849
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000013850ac_config_files="$ac_config_files Modules/ld_so_aix"
13851
Martin v. Löwis11437992002-04-12 09:54:03 +000013852cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013853# This file is a shell script that caches the results of configure
13854# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013855# scripts and configure runs, see configure's option --config-cache.
13856# It is not useful on other systems. If it contains results you don't
13857# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013858#
Martin v. Löwis11437992002-04-12 09:54:03 +000013859# config.status only pays attention to the cache file if you give it
13860# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013861#
Skip Montanaro6dead952003-09-25 14:50:04 +000013862# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013863# loading this file, other *unset* `ac_cv_foo' will be assigned the
13864# following values.
13865
13866_ACEOF
13867
Guido van Rossumf78abae1997-01-21 22:02:36 +000013868# The following way of writing the cache mishandles newlines in values,
13869# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013870# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013871# Ultrix sh set writes to stderr and can't be redirected directly,
13872# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013873(
13874 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13875 eval ac_val=\$$ac_var
13876 case $ac_val in #(
13877 *${as_nl}*)
13878 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013879 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13880$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013881 esac
13882 case $ac_var in #(
13883 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013884 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13885 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013886 esac ;;
13887 esac
13888 done
13889
Martin v. Löwis11437992002-04-12 09:54:03 +000013890 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000013891 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13892 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013893 # `set' does not quote correctly, so add quotes: double-quote
13894 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013895 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013896 "s/'/'\\\\''/g;
13897 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013898 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013899 *)
13900 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013901 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013902 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013903 esac |
13904 sort
13905) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013906 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000013907 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000013909 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13911 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000013912 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13913 :end' >>confcache
13914if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13915 if test -w "$cache_file"; then
Charles-François Natali97781b02011-07-22 23:43:42 +020013916 test "x$cache_file" != "x/dev/null" &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013917 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13918$as_echo "$as_me: updating cache $cache_file" >&6;}
Charles-François Natali97781b02011-07-22 23:43:42 +020013919 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013920 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013921 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13922$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013923 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013924fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013925rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013926
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013927test "x$prefix" = xNONE && prefix=$ac_default_prefix
13928# Let make expand exec_prefix.
13929test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013930
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013931DEFS=-DHAVE_CONFIG_H
13932
Skip Montanaro6dead952003-09-25 14:50:04 +000013933ac_libobjs=
13934ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013935U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013936for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13937 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013938 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013939 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000013940 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13941 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013942 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13943 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013944done
13945LIBOBJS=$ac_libobjs
13946
13947LTLIBOBJS=$ac_ltlibobjs
13948
13949
Martin v. Löwis11437992002-04-12 09:54:03 +000013950
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013951
Charles-François Natali97781b02011-07-22 23:43:42 +020013952: ${CONFIG_STATUS=./config.status}
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013953ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013954ac_clean_files_save=$ac_clean_files
13955ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013956{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13957$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13958as_write_fail=0
13959cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013960#! $SHELL
13961# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013962# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013963# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013964# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013965
Martin v. Löwis11437992002-04-12 09:54:03 +000013966debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013967ac_cs_recheck=false
13968ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013970SHELL=\${CONFIG_SHELL-$SHELL}
13971export SHELL
13972_ASEOF
13973cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13974## -------------------- ##
13975## M4sh Initialization. ##
13976## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013977
Martin v. Löwiseba40652007-08-30 20:10:57 +000013978# Be more Bourne compatible
13979DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013980if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013981 emulate sh
13982 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013983 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013984 # is contrary to our usage. Disable this feature.
13985 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013986 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000013987else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013988 case `(set -o) 2>/dev/null` in #(
13989 *posix*) :
13990 set -o posix ;; #(
13991 *) :
13992 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013993esac
Martin v. Löwis11437992002-04-12 09:54:03 +000013994fi
Michael W. Hudson54241132001-12-07 15:38:26 +000013995
Skip Montanaro6dead952003-09-25 14:50:04 +000013996
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013997as_nl='
13998'
13999export as_nl
14000# Printing a long string crashes Solaris 7 /usr/bin/printf.
14001as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14002as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14003as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14004# Prefer a ksh shell builtin over an external printf program on Solaris,
14005# but without wasting forks for bash or zsh.
14006if test -z "$BASH_VERSION$ZSH_VERSION" \
14007 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14008 as_echo='print -r --'
14009 as_echo_n='print -rn --'
14010elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14011 as_echo='printf %s\n'
14012 as_echo_n='printf %s'
14013else
14014 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14015 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14016 as_echo_n='/usr/ucb/echo -n'
14017 else
14018 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14019 as_echo_n_body='eval
14020 arg=$1;
14021 case $arg in #(
14022 *"$as_nl"*)
14023 expr "X$arg" : "X\\(.*\\)$as_nl";
14024 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14025 esac;
14026 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14027 '
14028 export as_echo_n_body
14029 as_echo_n='sh -c $as_echo_n_body as_echo'
14030 fi
14031 export as_echo_body
14032 as_echo='sh -c $as_echo_body as_echo'
14033fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014034
14035# The user is always right.
14036if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014037 PATH_SEPARATOR=:
14038 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14039 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14040 PATH_SEPARATOR=';'
14041 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014043
Martin v. Löwiseba40652007-08-30 20:10:57 +000014044
14045# IFS
14046# We need space, tab and new line, in precisely that order. Quoting is
14047# there to prevent editors from complaining about space-tab.
14048# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14049# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014050IFS=" "" $as_nl"
14051
14052# Find who we are. Look in the path if we contain no directory separator.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014053case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014054 *[\\/]* ) as_myself=$0 ;;
14055 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014056for as_dir in $PATH
14057do
14058 IFS=$as_save_IFS
14059 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014060 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14061 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014062IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014063
Martin v. Löwiseba40652007-08-30 20:10:57 +000014064 ;;
14065esac
14066# We did not find ourselves, most probably we were run as `sh COMMAND'
14067# in which case we are not to be found in the path.
14068if test "x$as_myself" = x; then
14069 as_myself=$0
14070fi
14071if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014072 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14073 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014074fi
14075
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014076# Unset variables that we do not need and which cause bugs (e.g. in
14077# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14078# suppresses any "Segmentation fault" message there. '((' could
14079# trigger a bug in pdksh 5.2.14.
14080for as_var in BASH_ENV ENV MAIL MAILPATH
14081do eval test x\${$as_var+set} = xset \
14082 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014083done
14084PS1='$ '
14085PS2='> '
14086PS4='+ '
14087
14088# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014089LC_ALL=C
14090export LC_ALL
14091LANGUAGE=C
14092export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014093
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014094# CDPATH.
14095(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14096
14097
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014098# as_fn_error STATUS ERROR [LINENO LOG_FD]
14099# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014100# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14101# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014102# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014103as_fn_error ()
14104{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014105 as_status=$1; test $as_status -eq 0 && as_status=1
14106 if test "$4"; then
14107 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14108 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014109 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014110 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014111 as_fn_exit $as_status
14112} # as_fn_error
14113
14114
14115# as_fn_set_status STATUS
14116# -----------------------
14117# Set $? to STATUS, without forking.
14118as_fn_set_status ()
14119{
14120 return $1
14121} # as_fn_set_status
14122
14123# as_fn_exit STATUS
14124# -----------------
14125# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14126as_fn_exit ()
14127{
14128 set +e
14129 as_fn_set_status $1
14130 exit $1
14131} # as_fn_exit
14132
14133# as_fn_unset VAR
14134# ---------------
14135# Portably unset VAR.
14136as_fn_unset ()
14137{
14138 { eval $1=; unset $1;}
14139}
14140as_unset=as_fn_unset
14141# as_fn_append VAR VALUE
14142# ----------------------
14143# Append the text in VALUE to the end of the definition contained in VAR. Take
14144# advantage of any shell optimizations that allow amortized linear growth over
14145# repeated appends, instead of the typical quadratic growth present in naive
14146# implementations.
14147if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14148 eval 'as_fn_append ()
14149 {
14150 eval $1+=\$2
14151 }'
14152else
14153 as_fn_append ()
14154 {
14155 eval $1=\$$1\$2
14156 }
14157fi # as_fn_append
14158
14159# as_fn_arith ARG...
14160# ------------------
14161# Perform arithmetic evaluation on the ARGs, and store the result in the
14162# global $as_val. Take advantage of shells that can avoid forks. The arguments
14163# must be portable across $(()) and expr.
14164if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14165 eval 'as_fn_arith ()
14166 {
14167 as_val=$(( $* ))
14168 }'
14169else
14170 as_fn_arith ()
14171 {
14172 as_val=`expr "$@" || test $? -eq 1`
14173 }
14174fi # as_fn_arith
14175
14176
Martin v. Löwiseba40652007-08-30 20:10:57 +000014177if expr a : '\(a\)' >/dev/null 2>&1 &&
14178 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14179 as_expr=expr
14180else
14181 as_expr=false
14182fi
14183
14184if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14185 as_basename=basename
14186else
14187 as_basename=false
14188fi
14189
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014190if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14191 as_dirname=dirname
14192else
14193 as_dirname=false
14194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014195
Martin v. Löwiseba40652007-08-30 20:10:57 +000014196as_me=`$as_basename -- "$0" ||
14197$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14198 X"$0" : 'X\(//\)$' \| \
14199 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014200$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014201 sed '/^.*\/\([^/][^/]*\)\/*$/{
14202 s//\1/
14203 q
14204 }
14205 /^X\/\(\/\/\)$/{
14206 s//\1/
14207 q
14208 }
14209 /^X\/\(\/\).*/{
14210 s//\1/
14211 q
14212 }
14213 s/.*/./; q'`
14214
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014215# Avoid depending upon Character Ranges.
14216as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14217as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14218as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14219as_cr_digits='0123456789'
14220as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014221
14222ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014223case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014224-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014225 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014226 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014227 xy) ECHO_C='\c';;
14228 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14229 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014230 esac;;
14231*)
14232 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014233esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014234
Martin v. Löwis11437992002-04-12 09:54:03 +000014235rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014236if test -d conf$$.dir; then
14237 rm -f conf$$.dir/conf$$.file
14238else
14239 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014240 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014241fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014242if (echo >conf$$.file) 2>/dev/null; then
14243 if ln -s conf$$.file conf$$ 2>/dev/null; then
14244 as_ln_s='ln -s'
14245 # ... but there are two gotchas:
14246 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14247 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14248 # In both cases, we have to default to `cp -p'.
14249 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14250 as_ln_s='cp -p'
14251 elif ln conf$$.file conf$$ 2>/dev/null; then
14252 as_ln_s=ln
14253 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014254 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014255 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014256else
14257 as_ln_s='cp -p'
14258fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014259rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14260rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014261
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014262
14263# as_fn_mkdir_p
14264# -------------
14265# Create "$as_dir" as a directory, including parents if necessary.
14266as_fn_mkdir_p ()
14267{
14268
14269 case $as_dir in #(
14270 -*) as_dir=./$as_dir;;
14271 esac
14272 test -d "$as_dir" || eval $as_mkdir_p || {
14273 as_dirs=
14274 while :; do
14275 case $as_dir in #(
14276 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14277 *) as_qdir=$as_dir;;
14278 esac
14279 as_dirs="'$as_qdir' $as_dirs"
14280 as_dir=`$as_dirname -- "$as_dir" ||
14281$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14282 X"$as_dir" : 'X\(//\)[^/]' \| \
14283 X"$as_dir" : 'X\(//\)$' \| \
14284 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14285$as_echo X"$as_dir" |
14286 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14287 s//\1/
14288 q
14289 }
14290 /^X\(\/\/\)[^/].*/{
14291 s//\1/
14292 q
14293 }
14294 /^X\(\/\/\)$/{
14295 s//\1/
14296 q
14297 }
14298 /^X\(\/\).*/{
14299 s//\1/
14300 q
14301 }
14302 s/.*/./; q'`
14303 test -d "$as_dir" && break
14304 done
14305 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014306 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014307
14308
14309} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014310if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014311 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014312else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014313 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014314 as_mkdir_p=false
14315fi
14316
Martin v. Löwiseba40652007-08-30 20:10:57 +000014317if test -x / >/dev/null 2>&1; then
14318 as_test_x='test -x'
14319else
14320 if ls -dL / >/dev/null 2>&1; then
14321 as_ls_L_option=L
14322 else
14323 as_ls_L_option=
14324 fi
14325 as_test_x='
14326 eval sh -c '\''
14327 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014328 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000014329 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014330 case $1 in #(
14331 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014332 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014333 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014334 ???[sx]*):;;*)false;;esac;fi
14335 '\'' sh
14336 '
14337fi
14338as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014339
14340# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014341as_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 +000014342
14343# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014344as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014345
14346
Martin v. Löwis11437992002-04-12 09:54:03 +000014347exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014348## ----------------------------------- ##
14349## Main body of $CONFIG_STATUS script. ##
14350## ----------------------------------- ##
14351_ASEOF
14352test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014353
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014354cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14355# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014356# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014357# values after options handling.
14358ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014359This file was extended by python $as_me 2.7, which was
Charles-François Natali97781b02011-07-22 23:43:42 +020014360generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014361
14362 CONFIG_FILES = $CONFIG_FILES
14363 CONFIG_HEADERS = $CONFIG_HEADERS
14364 CONFIG_LINKS = $CONFIG_LINKS
14365 CONFIG_COMMANDS = $CONFIG_COMMANDS
14366 $ $0 $@
14367
Martin v. Löwiseba40652007-08-30 20:10:57 +000014368on `(hostname || uname -n) 2>/dev/null | sed 1q`
14369"
14370
Martin v. Löwis11437992002-04-12 09:54:03 +000014371_ACEOF
14372
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014373case $ac_config_files in *"
14374"*) set x $ac_config_files; shift; ac_config_files=$*;;
14375esac
14376
14377case $ac_config_headers in *"
14378"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14379esac
14380
14381
14382cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014383# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014384config_files="$ac_config_files"
14385config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014386
Martin v. Löwiseba40652007-08-30 20:10:57 +000014387_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014388
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014390ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014391\`$as_me' instantiates files and other configuration actions
14392from templates according to the current configuration. Unless the files
14393and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014394
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014395Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014396
14397 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014398 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014399 --config print configuration, then exit
14400 -q, --quiet, --silent
14401 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 -d, --debug don't remove temporary files
14403 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014404 --file=FILE[:TEMPLATE]
14405 instantiate the configuration file FILE
14406 --header=FILE[:TEMPLATE]
14407 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014408
14409Configuration files:
14410$config_files
14411
14412Configuration headers:
14413$config_headers
14414
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014415Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014416
Martin v. Löwiseba40652007-08-30 20:10:57 +000014417_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014418cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14419ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014420ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014421python config.status 2.7
Charles-François Natali97781b02011-07-22 23:43:42 +020014422configured by $0, generated by GNU Autoconf 2.67,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014423 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014424
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014425Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014426This config.status script is free software; the Free Software Foundation
14427gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014428
14429ac_pwd='$ac_pwd'
14430srcdir='$srcdir'
14431INSTALL='$INSTALL'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014432test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014433_ACEOF
14434
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014435cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14436# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014437ac_need_defaults=:
14438while test $# != 0
14439do
14440 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014441 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014442 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14443 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014444 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014445 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014446 --*=)
14447 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14448 ac_optarg=
14449 ac_shift=:
14450 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014451 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014452 ac_option=$1
14453 ac_optarg=$2
14454 ac_shift=shift
14455 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014456 esac
14457
Skip Montanaro6dead952003-09-25 14:50:04 +000014458 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014459 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014460 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14461 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014462 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014463 $as_echo "$ac_cs_version"; exit ;;
14464 --config | --confi | --conf | --con | --co | --c )
14465 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014466 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014467 debug=: ;;
14468 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014469 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014470 case $ac_optarg in
14471 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014472 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014473 esac
14474 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014475 ac_need_defaults=false;;
14476 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014477 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014478 case $ac_optarg in
14479 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14480 esac
14481 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014483 --he | --h)
14484 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014485 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014486Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014487 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014488 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014489 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14490 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14491 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014492
14493 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014494 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014495Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014496
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014497 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014498 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014499
14500 esac
14501 shift
14502done
14503
Skip Montanaro6dead952003-09-25 14:50:04 +000014504ac_configure_extra_args=
14505
14506if $ac_cs_silent; then
14507 exec 6>/dev/null
14508 ac_configure_extra_args="$ac_configure_extra_args --silent"
14509fi
14510
14511_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014512cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014513if \$ac_cs_recheck; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014514 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14515 shift
14516 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14517 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014518 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014519 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014520fi
14521
Martin v. Löwis11437992002-04-12 09:54:03 +000014522_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014523cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014524exec 5>>config.log
14525{
14526 echo
14527 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14528## Running $as_me. ##
14529_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014530 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014531} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014532
Martin v. Löwiseba40652007-08-30 20:10:57 +000014533_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014534cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014535_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014536
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014537cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014538
14539# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014540for ac_config_target in $ac_config_targets
14541do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014542 case $ac_config_target in
14543 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14544 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14545 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14546 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014547 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14548 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014549 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14550 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014551 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014552 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014553
Charles-François Natali97781b02011-07-22 23:43:42 +020014554 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 esac
14556done
14557
Martin v. Löwiseba40652007-08-30 20:10:57 +000014558
Martin v. Löwis11437992002-04-12 09:54:03 +000014559# If the user did not use the arguments to specify the items to instantiate,
14560# then the envvar interface is used. Set only those that are not.
14561# We use the long form for the default assignment because of an extremely
14562# bizarre bug on SunOS 4.1.3.
14563if $ac_need_defaults; then
14564 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14565 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14566fi
14567
Skip Montanaro6dead952003-09-25 14:50:04 +000014568# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014569# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014570# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014571# Hook for its removal unless debugging.
14572# Note that there is a small window in which the directory will not be cleaned:
14573# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014574$debug ||
14575{
Charles-François Natali97781b02011-07-22 23:43:42 +020014576 tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000014577 trap 'exit_status=$?
Charles-François Natali97781b02011-07-22 23:43:42 +020014578 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000014579' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014580 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014581}
Martin v. Löwis11437992002-04-12 09:54:03 +000014582# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014583
Martin v. Löwis11437992002-04-12 09:54:03 +000014584{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014585 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Charles-François Natali97781b02011-07-22 23:43:42 +020014586 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014587} ||
14588{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014589 tmp=./conf$$-$RANDOM
14590 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014591} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014592
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014593# Set up the scripts for CONFIG_FILES section.
14594# No need to generate them if there are no CONFIG_FILES.
14595# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014596if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014597
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014598
14599ac_cr=`echo X | tr X '\015'`
14600# On cygwin, bash can eat \r inside `` if the user requested igncr.
14601# But we know of no other shell where ac_cr would be empty at this
14602# point, so we can use a bashism as a fallback.
14603if test "x$ac_cr" = x; then
14604 eval ac_cr=\$\'\\r\'
14605fi
14606ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14607if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014608 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014609else
14610 ac_cs_awk_cr=$ac_cr
14611fi
14612
Charles-François Natali97781b02011-07-22 23:43:42 +020014613echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014614_ACEOF
14615
Martin v. Löwiseba40652007-08-30 20:10:57 +000014616
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014617{
14618 echo "cat >conf$$subs.awk <<_ACEOF" &&
14619 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14620 echo "_ACEOF"
14621} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014622 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14623ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014624ac_delim='%!_!# '
14625for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014626 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014627 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014628
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014629 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14630 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014631 break
14632 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014633 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014634 else
14635 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014636 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014637done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014638rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014639
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014640cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Charles-François Natali97781b02011-07-22 23:43:42 +020014641cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014642_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014643sed -n '
14644h
14645s/^/S["/; s/!.*/"]=/
14646p
14647g
14648s/^[^!]*!//
14649:repl
14650t repl
14651s/'"$ac_delim"'$//
14652t delim
14653:nl
14654h
14655s/\(.\{148\}\)..*/\1/
14656t more1
14657s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14658p
14659n
14660b repl
14661:more1
14662s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14663p
14664g
14665s/.\{148\}//
14666t nl
14667:delim
14668h
14669s/\(.\{148\}\)..*/\1/
14670t more2
14671s/["\\]/\\&/g; s/^/"/; s/$/"/
14672p
14673b
14674:more2
14675s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14676p
14677g
14678s/.\{148\}//
14679t delim
14680' <conf$$subs.awk | sed '
14681/^[^""]/{
14682 N
14683 s/\n//
14684}
14685' >>$CONFIG_STATUS || ac_write_fail=1
14686rm -f conf$$subs.awk
14687cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14688_ACAWK
Charles-François Natali97781b02011-07-22 23:43:42 +020014689cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014690 for (key in S) S_is_set[key] = 1
14691 FS = ""
14692
14693}
14694{
14695 line = $ 0
14696 nfields = split(line, field, "@")
14697 substed = 0
14698 len = length(field[1])
14699 for (i = 2; i < nfields; i++) {
14700 key = field[i]
14701 keylen = length(key)
14702 if (S_is_set[key]) {
14703 value = S[key]
14704 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14705 len += length(value) + length(field[++i])
14706 substed = 1
14707 } else
14708 len += 1 + keylen
14709 }
14710
14711 print line
14712}
14713
14714_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014715_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014716cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14717if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14718 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14719else
14720 cat
Charles-François Natali97781b02011-07-22 23:43:42 +020014721fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014722 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014723_ACEOF
14724
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014725# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14726# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000014727# trailing colons and then remove the whole line if VPATH becomes empty
14728# (actually we leave an empty line to preserve line numbers).
14729if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014730 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14731h
14732s///
14733s/^/:/
14734s/[ ]*$/:/
14735s/:\$(srcdir):/:/g
14736s/:\${srcdir}:/:/g
14737s/:@srcdir@:/:/g
14738s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014739s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014740x
14741s/\(=[ ]*\).*/\1/
14742G
14743s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014744s/^[^=]*=[ ]*$//
14745}'
14746fi
14747
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014748cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014749fi # test -n "$CONFIG_FILES"
14750
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014751# Set up the scripts for CONFIG_HEADERS section.
14752# No need to generate them if there are no CONFIG_HEADERS.
14753# This happens for instance with `./config.status Makefile'.
14754if test -n "$CONFIG_HEADERS"; then
Charles-François Natali97781b02011-07-22 23:43:42 +020014755cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014756BEGIN {
14757_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014758
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014759# Transform confdefs.h into an awk script `defines.awk', embedded as
14760# here-document in config.status, that substitutes the proper values into
14761# config.h.in to produce config.h.
14762
14763# Create a delimiter string that does not exist in confdefs.h, to ease
14764# handling of long lines.
14765ac_delim='%!_!# '
14766for ac_last_try in false false :; do
Charles-François Natali97781b02011-07-22 23:43:42 +020014767 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14768 if test -z "$ac_t"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014769 break
14770 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014771 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014772 else
14773 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14774 fi
14775done
14776
14777# For the awk script, D is an array of macro values keyed by name,
14778# likewise P contains macro parameters if any. Preserve backslash
14779# newline sequences.
14780
14781ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14782sed -n '
14783s/.\{148\}/&'"$ac_delim"'/g
14784t rset
14785:rset
14786s/^[ ]*#[ ]*define[ ][ ]*/ /
14787t def
14788d
14789:def
14790s/\\$//
14791t bsnl
14792s/["\\]/\\&/g
14793s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14794D["\1"]=" \3"/p
14795s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14796d
14797:bsnl
14798s/["\\]/\\&/g
14799s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14800D["\1"]=" \3\\\\\\n"\\/p
14801t cont
14802s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14803t cont
14804d
14805:cont
14806n
14807s/.\{148\}/&'"$ac_delim"'/g
14808t clear
14809:clear
14810s/\\$//
14811t bsnlc
14812s/["\\]/\\&/g; s/^/"/; s/$/"/p
14813d
14814:bsnlc
14815s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14816b cont
14817' <confdefs.h | sed '
14818s/'"$ac_delim"'/"\\\
14819"/g' >>$CONFIG_STATUS || ac_write_fail=1
14820
14821cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14822 for (key in D) D_is_set[key] = 1
14823 FS = ""
14824}
14825/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14826 line = \$ 0
14827 split(line, arg, " ")
14828 if (arg[1] == "#") {
14829 defundef = arg[2]
14830 mac1 = arg[3]
14831 } else {
14832 defundef = substr(arg[1], 2)
14833 mac1 = arg[2]
14834 }
14835 split(mac1, mac2, "(") #)
14836 macro = mac2[1]
14837 prefix = substr(line, 1, index(line, defundef) - 1)
14838 if (D_is_set[macro]) {
14839 # Preserve the white space surrounding the "#".
14840 print prefix "define", macro P[macro] D[macro]
14841 next
14842 } else {
14843 # Replace #undef with comments. This is necessary, for example,
14844 # in the case of _POSIX_SOURCE, which is predefined and required
14845 # on some systems where configure will not decide to define it.
14846 if (defundef == "undef") {
14847 print "/*", prefix defundef, macro, "*/"
14848 next
14849 }
14850 }
14851}
14852{ print }
14853_ACAWK
14854_ACEOF
14855cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014856 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014857fi # test -n "$CONFIG_HEADERS"
14858
14859
14860eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14861shift
14862for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000014863do
14864 case $ac_tag in
14865 :[FHLC]) ac_mode=$ac_tag; continue;;
14866 esac
14867 case $ac_mode$ac_tag in
14868 :[FHL]*:*);;
Charles-François Natali97781b02011-07-22 23:43:42 +020014869 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014870 :[FH]-) ac_tag=-:-;;
14871 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14872 esac
14873 ac_save_IFS=$IFS
14874 IFS=:
14875 set x $ac_tag
14876 IFS=$ac_save_IFS
14877 shift
14878 ac_file=$1
14879 shift
14880
14881 case $ac_mode in
14882 :L) ac_source=$1;;
14883 :[FH])
14884 ac_file_inputs=
14885 for ac_f
14886 do
14887 case $ac_f in
Charles-François Natali97781b02011-07-22 23:43:42 +020014888 -) ac_f="$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014889 *) # Look for the file first in the build tree, then in the source tree
14890 # (if the path is not absolute). The absolute path cannot be DOS-style,
14891 # because $ac_f cannot contain `:'.
14892 test -f "$ac_f" ||
14893 case $ac_f in
14894 [\\/$]*) false;;
14895 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14896 esac ||
Charles-François Natali97781b02011-07-22 23:43:42 +020014897 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014898 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014899 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14900 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014901 done
14902
14903 # Let's still pretend it is `configure' which instantiates (i.e., don't
14904 # use $as_me), people would be surprised to read:
14905 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014906 configure_input='Generated from '`
14907 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14908 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014909 if test x"$ac_file" != x-; then
14910 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014911 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14912$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014913 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014914 # Neutralize special characters interpreted by sed in replacement strings.
14915 case $configure_input in #(
14916 *\&* | *\|* | *\\* )
14917 ac_sed_conf_input=`$as_echo "$configure_input" |
14918 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14919 *) ac_sed_conf_input=$configure_input;;
14920 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014921
14922 case $ac_tag in
Charles-François Natali97781b02011-07-22 23:43:42 +020014923 *:-:* | *:-) cat >"$tmp/stdin" \
14924 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014925 esac
14926 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014927 esac
14928
Martin v. Löwiseba40652007-08-30 20:10:57 +000014929 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014930$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014931 X"$ac_file" : 'X\(//\)[^/]' \| \
14932 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000014933 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014934$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014935 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14936 s//\1/
14937 q
14938 }
14939 /^X\(\/\/\)[^/].*/{
14940 s//\1/
14941 q
14942 }
14943 /^X\(\/\/\)$/{
14944 s//\1/
14945 q
14946 }
14947 /^X\(\/\).*/{
14948 s//\1/
14949 q
14950 }
14951 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014952 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014953 ac_builddir=.
14954
Martin v. Löwiseba40652007-08-30 20:10:57 +000014955case "$ac_dir" in
14956.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14957*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014958 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014959 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014960 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014961 case $ac_top_builddir_sub in
14962 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14963 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14964 esac ;;
14965esac
14966ac_abs_top_builddir=$ac_pwd
14967ac_abs_builddir=$ac_pwd$ac_dir_suffix
14968# for backward compatibility:
14969ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014970
14971case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014972 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014973 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014974 ac_top_srcdir=$ac_top_builddir_sub
14975 ac_abs_top_srcdir=$ac_pwd ;;
14976 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014977 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014978 ac_top_srcdir=$srcdir
14979 ac_abs_top_srcdir=$srcdir ;;
14980 *) # Relative name.
14981 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14982 ac_top_srcdir=$ac_top_build_prefix$srcdir
14983 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014984esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014985ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014986
Martin v. Löwis11437992002-04-12 09:54:03 +000014987
Martin v. Löwiseba40652007-08-30 20:10:57 +000014988 case $ac_mode in
14989 :F)
14990 #
14991 # CONFIG_FILE
14992 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014993
14994 case $INSTALL in
14995 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014996 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014997 esac
Brett Cannon19fab762007-06-02 03:02:29 +000014998_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014999
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015000cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015001# If the template does not know about datarootdir, expand it.
15002# FIXME: This hack should be removed a few years after 2.60.
15003ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015004ac_sed_dataroot='
15005/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015006 p
15007 q
15008}
15009/@datadir@/p
15010/@docdir@/p
15011/@infodir@/p
15012/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015013/@mandir@/p'
15014case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015015*datarootdir*) ac_datarootdir_seen=yes;;
15016*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015017 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15018$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015019_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015020cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015021 ac_datarootdir_hack='
15022 s&@datadir@&$datadir&g
15023 s&@docdir@&$docdir&g
15024 s&@infodir@&$infodir&g
15025 s&@localedir@&$localedir&g
15026 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015027 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015028esac
15029_ACEOF
15030
15031# Neutralize VPATH when `$srcdir' = `.'.
15032# Shell code in configure.ac might set extrasub.
15033# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015034cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15035ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015036$extrasub
15037_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015038cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015039:t
15040/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015041s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015042s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015043s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015044s&@srcdir@&$ac_srcdir&;t t
15045s&@abs_srcdir@&$ac_abs_srcdir&;t t
15046s&@top_srcdir@&$ac_top_srcdir&;t t
15047s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15048s&@builddir@&$ac_builddir&;t t
15049s&@abs_builddir@&$ac_abs_builddir&;t t
15050s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15051s&@INSTALL@&$ac_INSTALL&;t t
15052$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015053"
Charles-François Natali97781b02011-07-22 23:43:42 +020015054eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15055 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015056
Martin v. Löwiseba40652007-08-30 20:10:57 +000015057test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Charles-François Natali97781b02011-07-22 23:43:42 +020015058 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15059 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015060 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015061which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015062$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015063which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015064
Charles-François Natali97781b02011-07-22 23:43:42 +020015065 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015066 case $ac_file in
Charles-François Natali97781b02011-07-22 23:43:42 +020015067 -) cat "$tmp/out" && rm -f "$tmp/out";;
15068 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015069 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015070 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015071 ;;
15072 :H)
15073 #
15074 # CONFIG_HEADER
15075 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015076 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015077 {
15078 $as_echo "/* $configure_input */" \
Charles-François Natali97781b02011-07-22 23:43:42 +020015079 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15080 } >"$tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015081 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Charles-François Natali97781b02011-07-22 23:43:42 +020015082 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015083 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15084$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015085 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015086 rm -f "$ac_file"
Charles-François Natali97781b02011-07-22 23:43:42 +020015087 mv "$tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015088 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015089 fi
15090 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015091 $as_echo "/* $configure_input */" \
Charles-François Natali97781b02011-07-22 23:43:42 +020015092 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015093 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015094 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015095 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015096
Martin v. Löwiseba40652007-08-30 20:10:57 +000015097
15098 esac
15099
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015100
15101 case $ac_file$ac_mode in
15102 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15103
15104 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015105done # for ac_tag
15106
Guido van Rossum627b2d71993-12-24 10:39:16 +000015107
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015108as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015109_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015110ac_clean_files=$ac_clean_files_save
15111
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015112test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015113 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015114
Martin v. Löwis11437992002-04-12 09:54:03 +000015115
15116# configure is writing to config.log, and then calls config.status.
15117# config.status does its own redirection, appending to config.log.
15118# Unfortunately, on DOS this fails, as config.log is still kept open
15119# by configure, so config.status won't be able to write to it; its
15120# output is simply discarded. So we exec the FD to /dev/null,
15121# effectively closing config.log, so it can be properly (re)opened and
15122# appended to by config.status. When coming back to configure, we
15123# need to make the FD available again.
15124if test "$no_create" != yes; then
15125 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015126 ac_config_status_args=
15127 test "$silent" = yes &&
15128 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015130 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 exec 5>>config.log
15132 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15133 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015134 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015135fi
15136if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15137 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15138$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015139fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015140
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015141
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015142echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015143if test ! -f Modules/Setup
15144then
15145 cp $srcdir/Modules/Setup.dist Modules/Setup
15146fi
15147
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015148echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015149if test ! -f Modules/Setup.local
15150then
15151 echo "# Edit this file for local setup changes" >Modules/Setup.local
15152fi
15153
15154echo "creating Makefile"
15155$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15156 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015157 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015158
15159case $ac_sys_system in
15160BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015161 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015162
15163 Support for BeOS is deprecated as of Python 2.6.
15164 See PEP 11 for the gory details.
15165 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015166$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015167
15168 Support for BeOS is deprecated as of Python 2.6.
15169 See PEP 11 for the gory details.
15170 " >&2;}
15171 ;;
15172*) ;;
15173esac
15174
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015175mv config.c Modules