blob: 99a7c718bafebdffc9619797ec08f6f295ae32ea [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
5414 case $ac_cv_prog_cc_g in
5415 yes)
5416 if test "$Py_DEBUG" = 'true' ; then
5417 # Optimization messes up debuggers, so turn it off for
5418 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005419 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005420 else
5421 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5422 fi
5423 ;;
5424 *)
5425 OPT="-O3 -Wall $STRICT_PROTO"
5426 ;;
5427 esac
5428 case $ac_sys_system in
5429 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5430 ;;
5431 esac
5432 ;;
5433
5434 *)
5435 OPT="-O"
5436 ;;
5437 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005438fi
5439
5440
5441
5442# The -arch flags for universal builds on OSX
5443UNIVERSAL_ARCH_FLAGS=
5444
5445
5446# tweak BASECFLAGS based on compiler and platform
5447case $GCC in
5448yes)
5449 # Python violates C99 rules, by casting between incompatible
5450 # pointer types. GCC may generate bad code as a result of that,
5451 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5453$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005454 ac_save_cc="$CC"
5455 CC="$CC -fno-strict-aliasing"
Charles-François Natali97781b02011-07-22 23:43:42 +02005456 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005457 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005458else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005460/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005461
5462int
5463main ()
5464{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005465
Gregory P. Smith373469a2009-11-01 21:03:38 +00005466 ;
5467 return 0;
5468}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005469_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005470if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005471 ac_cv_no_strict_aliasing_ok=yes
5472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005473 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005474fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005476fi
5477
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005478 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5480$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005481 if test $ac_cv_no_strict_aliasing_ok = yes
5482 then
5483 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5484 fi
5485
5486 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5487 # support. Without this, treatment of subnormals doesn't follow
5488 # the standard.
5489 case $ac_sys_machine in
5490 alpha*)
5491 BASECFLAGS="$BASECFLAGS -mieee"
5492 ;;
5493 esac
5494
5495 case $ac_sys_system in
5496 SCO_SV*)
5497 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5498 ;;
5499 # is there any other compiler on Darwin besides gcc?
5500 Darwin*)
5501 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5502 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005503 if test "${CC}" = gcc
5504 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5506$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005507 case "${UNIVERSALSDK}" in
5508 */MacOSX10.4u.sdk)
5509 # Build using 10.4 SDK, force usage of gcc when the
5510 # compiler is gcc, otherwise the user will get very
5511 # confusing error messages when building on OSX 10.6
5512 CC=gcc-4.0
5513 CPP=cpp-4.0
5514 ;;
5515 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5517$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005518 fi
5519
5520 # Calculate the right deployment target for this build.
5521 #
5522 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5523 if test ${cur_target} '>' 10.2; then
5524 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00005525 if test ${enable_universalsdk}; then
5526 if test "${UNIVERSAL_ARCHS}" = "all"; then
5527 # Ensure that the default platform for a
5528 # 4-way universal build is OSX 10.5,
5529 # that's the first OS release where
5530 # 4-way builds make sense.
5531 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00005532
5533 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5534 cur_target='10.5'
5535
5536 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5537 cur_target='10.5'
5538
5539 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5540 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00005541 fi
5542 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00005543 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00005544 # On Intel macs default to a deployment
5545 # target of 10.4, that's the first OSX
5546 # release with Intel support.
5547 cur_target="10.4"
5548 fi
5549 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005550 fi
5551 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5552
5553 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5554 # environment with a value that is the same as what we'll use
5555 # in the Makefile to ensure that we'll get the same compiler
5556 # environment during configure and build time.
5557 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5558 export MACOSX_DEPLOYMENT_TARGET
5559 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5560
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005561 if test "${enable_universalsdk}"; then
5562 UNIVERSAL_ARCH_FLAGS=""
5563 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5564 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5565 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00005566 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005567
5568 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5569 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5570 LIPO_32BIT_FLAGS=""
5571 ARCH_RUN_32BIT="true"
5572
5573 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5574 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5575 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005576 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005577
5578 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5579 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5580 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005581 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005582
5583 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5584 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5585 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00005586 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005587
5588 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005589 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 +00005590
5591 fi
5592
5593
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00005594 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5595 if test "${UNIVERSALSDK}" != "/"
5596 then
5597 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5598 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5599 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005600 fi
5601
5602 fi
5603
5604
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005605 ;;
5606 OSF*)
5607 BASECFLAGS="$BASECFLAGS -mieee"
5608 ;;
5609 esac
5610 ;;
5611
5612*)
5613 case $ac_sys_system in
5614 OpenUNIX*|UnixWare*)
5615 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5616 ;;
5617 OSF*)
5618 BASECFLAGS="$BASECFLAGS -ieee -std"
5619 ;;
5620 SCO_SV*)
5621 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5622 ;;
5623 esac
5624 ;;
5625esac
5626
5627if test "$Py_DEBUG" = 'true'; then
5628 :
5629else
5630 OPT="-DNDEBUG $OPT"
5631fi
5632
5633if test "$ac_arch_flags"
5634then
5635 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5636fi
5637
5638# disable check for icc since it seems to pass, but generates a warning
5639if test "$CC" = icc
5640then
5641 ac_cv_opt_olimit_ok=no
5642fi
5643
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5645$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005646if test "${ac_cv_opt_olimit_ok+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005647 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005648else
5649 ac_save_cc="$CC"
5650CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005652/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005653
5654int
5655main ()
5656{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005657
Gregory P. Smith373469a2009-11-01 21:03:38 +00005658 ;
5659 return 0;
5660}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005661_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005662if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005663 ac_cv_opt_olimit_ok=yes
5664else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005665 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005666
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005667fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005669CC="$ac_save_cc"
5670fi
5671
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5673$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005674if test $ac_cv_opt_olimit_ok = yes; then
5675 case $ac_sys_system in
5676 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5677 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5678 # environment?
5679 Darwin*)
5680 ;;
5681 *)
5682 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5683 ;;
5684 esac
5685else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5687$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005688 if test "${ac_cv_olimit_ok+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005689 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005690else
5691 ac_save_cc="$CC"
5692 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005694/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005695
5696int
5697main ()
5698{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005699
Gregory P. Smith373469a2009-11-01 21:03:38 +00005700 ;
5701 return 0;
5702}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005703_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005704if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005705 ac_cv_olimit_ok=yes
5706else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005707 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005708
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005709fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005711 CC="$ac_save_cc"
5712fi
5713
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5715$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005716 if test $ac_cv_olimit_ok = yes; then
5717 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5718 fi
5719fi
5720
5721# Check whether GCC supports PyArg_ParseTuple format
5722if test "$GCC" = "yes"
5723then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5725$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005726 save_CFLAGS=$CFLAGS
5727 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005729/* end confdefs.h. */
5730
5731 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005732int
5733main ()
5734{
5735
5736 ;
5737 return 0;
5738}
Matthias Klosec511b472010-05-08 11:01:39 +00005739
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005740_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005741if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005742
Matthias Klosec511b472010-05-08 11:01:39 +00005743
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005744$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005745
Matthias Klosec511b472010-05-08 11:01:39 +00005746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005747$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00005748
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005749else
Matthias Klosec511b472010-05-08 11:01:39 +00005750
5751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005752$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005753
5754fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5756 CFLAGS=$save_CFLAGS
5757fi
5758
5759# On some compilers, pthreads are available without further options
5760# (e.g. MacOS X). On some of these systems, the compiler will not
5761# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5762# So we have to see first whether pthreads are available without
5763# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5765$as_echo_n "checking whether pthreads are available without options... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005766if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005767 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005768else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005769 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005770 ac_cv_pthread_is_default=no
5771else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005773/* end confdefs.h. */
5774
5775#include <pthread.h>
5776
5777void* routine(void* p){return NULL;}
5778
5779int main(){
5780 pthread_t p;
5781 if(pthread_create(&p,NULL,routine,NULL)!=0)
5782 return 1;
5783 (void)pthread_detach(p);
5784 return 0;
5785}
5786
5787_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005788if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005789
5790 ac_cv_pthread_is_default=yes
5791 ac_cv_kthread=no
5792 ac_cv_pthread=no
5793
5794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005795 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005796fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5798 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005799fi
5800
5801
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005802fi
5803
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5805$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005806
5807
5808if test $ac_cv_pthread_is_default = yes
5809then
5810 ac_cv_kpthread=no
5811else
5812# -Kpthread, if available, provides the right #defines
5813# and linker options to make pthread_create available
5814# Some compilers won't report that they do not support -Kpthread,
5815# so we need to run a program to see whether it really made the
5816# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5818$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005819if test "${ac_cv_kpthread+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005820 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005821else
5822 ac_save_cc="$CC"
5823CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005824if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005825 ac_cv_kpthread=no
5826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005828/* end confdefs.h. */
5829
5830#include <pthread.h>
5831
5832void* routine(void* p){return NULL;}
5833
5834int main(){
5835 pthread_t p;
5836 if(pthread_create(&p,NULL,routine,NULL)!=0)
5837 return 1;
5838 (void)pthread_detach(p);
5839 return 0;
5840}
5841
5842_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005843if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005844 ac_cv_kpthread=yes
5845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005846 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005847fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5849 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005850fi
5851
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005852CC="$ac_save_cc"
5853fi
5854
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5856$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005857fi
5858
5859if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5860then
5861# -Kthread, if available, provides the right #defines
5862# and linker options to make pthread_create available
5863# Some compilers won't report that they do not support -Kthread,
5864# so we need to run a program to see whether it really made the
5865# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5867$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005868if test "${ac_cv_kthread+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005869 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005870else
5871 ac_save_cc="$CC"
5872CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005873if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005874 ac_cv_kthread=no
5875else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005877/* end confdefs.h. */
5878
5879#include <pthread.h>
5880
5881void* routine(void* p){return NULL;}
5882
5883int main(){
5884 pthread_t p;
5885 if(pthread_create(&p,NULL,routine,NULL)!=0)
5886 return 1;
5887 (void)pthread_detach(p);
5888 return 0;
5889}
5890
5891_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005892if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005893 ac_cv_kthread=yes
5894else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005895 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005896fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5898 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005899fi
5900
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005901CC="$ac_save_cc"
5902fi
5903
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5905$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005906fi
5907
5908if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5909then
5910# -pthread, if available, provides the right #defines
5911# and linker options to make pthread_create available
5912# Some compilers won't report that they do not support -pthread,
5913# so we need to run a program to see whether it really made the
5914# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5916$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005917if test "${ac_cv_thread+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005918 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005919else
5920 ac_save_cc="$CC"
5921CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005922if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005923 ac_cv_pthread=no
5924else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005926/* end confdefs.h. */
5927
5928#include <pthread.h>
5929
5930void* routine(void* p){return NULL;}
5931
5932int main(){
5933 pthread_t p;
5934 if(pthread_create(&p,NULL,routine,NULL)!=0)
5935 return 1;
5936 (void)pthread_detach(p);
5937 return 0;
5938}
5939
5940_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005941if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005942 ac_cv_pthread=yes
5943else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005944 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005945fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5947 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005948fi
5949
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005950CC="$ac_save_cc"
5951fi
5952
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5954$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005955fi
5956
5957# If we have set a CC compiler flag for thread support then
5958# check if it works for CXX, too.
5959ac_cv_cxx_thread=no
5960if test ! -z "$CXX"
5961then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5963$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005964ac_save_cxx="$CXX"
5965
5966if test "$ac_cv_kpthread" = "yes"
5967then
5968 CXX="$CXX -Kpthread"
5969 ac_cv_cxx_thread=yes
5970elif test "$ac_cv_kthread" = "yes"
5971then
5972 CXX="$CXX -Kthread"
5973 ac_cv_cxx_thread=yes
5974elif test "$ac_cv_pthread" = "yes"
5975then
5976 CXX="$CXX -pthread"
5977 ac_cv_cxx_thread=yes
5978fi
5979
5980if test $ac_cv_cxx_thread = yes
5981then
5982 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5983 $CXX -c conftest.$ac_ext 2>&5
5984 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5985 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5986 then
5987 ac_cv_cxx_thread=yes
5988 else
5989 ac_cv_cxx_thread=no
5990 fi
5991 rm -fr conftest*
5992fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5994$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005995fi
5996CXX="$ac_save_cxx"
5997
5998
5999# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6001$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006002if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006003 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006004else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006006/* end confdefs.h. */
6007#include <stdlib.h>
6008#include <stdarg.h>
6009#include <string.h>
6010#include <float.h>
6011
6012int
6013main ()
6014{
6015
6016 ;
6017 return 0;
6018}
6019_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006020if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006021 ac_cv_header_stdc=yes
6022else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006023 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006024fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6026
6027if test $ac_cv_header_stdc = yes; then
6028 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006030/* end confdefs.h. */
6031#include <string.h>
6032
6033_ACEOF
6034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006035 $EGREP "memchr" >/dev/null 2>&1; then :
6036
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006037else
6038 ac_cv_header_stdc=no
6039fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006040rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006041
6042fi
6043
6044if test $ac_cv_header_stdc = yes; then
6045 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006047/* end confdefs.h. */
6048#include <stdlib.h>
6049
6050_ACEOF
6051if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006052 $EGREP "free" >/dev/null 2>&1; then :
6053
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006054else
6055 ac_cv_header_stdc=no
6056fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006057rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006058
6059fi
6060
6061if test $ac_cv_header_stdc = yes; then
6062 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006063 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006064 :
6065else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006067/* end confdefs.h. */
6068#include <ctype.h>
6069#include <stdlib.h>
6070#if ((' ' & 0x0FF) == 0x020)
6071# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6072# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6073#else
6074# define ISLOWER(c) \
6075 (('a' <= (c) && (c) <= 'i') \
6076 || ('j' <= (c) && (c) <= 'r') \
6077 || ('s' <= (c) && (c) <= 'z'))
6078# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6079#endif
6080
6081#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6082int
6083main ()
6084{
6085 int i;
6086 for (i = 0; i < 256; i++)
6087 if (XOR (islower (i), ISLOWER (i))
6088 || toupper (i) != TOUPPER (i))
6089 return 2;
6090 return 0;
6091}
6092_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006093if ac_fn_c_try_run "$LINENO"; then :
6094
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006095else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006096 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006097fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6099 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006100fi
6101
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006102fi
6103fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6105$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006106if test $ac_cv_header_stdc = yes; then
6107
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006108$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006109
6110fi
6111
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006112for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6113fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006114ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006115shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006116unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006117sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6118sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006119sys/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 +00006120sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006121sys/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 +00006122sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006123bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006124do :
6125 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6126ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006127if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006128 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006129#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006130_ACEOF
6131
6132fi
6133
Guido van Rossum627b2d71993-12-24 10:39:16 +00006134done
6135
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006136ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006137for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006138 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6140$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006141if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006142 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006143else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006145/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006146#include <sys/types.h>
6147#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006148
Martin v. Löwis11437992002-04-12 09:54:03 +00006149int
6150main ()
6151{
6152if ((DIR *) 0)
6153return 0;
6154 ;
6155 return 0;
6156}
6157_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006158if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006159 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006160else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006161 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006164fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006165eval ac_res=\$$as_ac_Header
6166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6167$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006168if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006169 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006170#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006171_ACEOF
6172
6173ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006175
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006176done
6177# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6178if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6180$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006181if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006182 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006183else
Martin v. Löwis11437992002-04-12 09:54:03 +00006184 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006187
Martin v. Löwiseba40652007-08-30 20:10:57 +00006188/* Override any GCC internal prototype to avoid an error.
6189 Use char because int might match the return type of a GCC
6190 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006191#ifdef __cplusplus
6192extern "C"
6193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006194char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006195int
6196main ()
6197{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006198return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006199 ;
6200 return 0;
6201}
6202_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006203for ac_lib in '' dir; do
6204 if test -z "$ac_lib"; then
6205 ac_res="none required"
6206 else
6207 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006208 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006209 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006210 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006211 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006212fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006213rm -f core conftest.err conftest.$ac_objext \
6214 conftest$ac_exeext
Charles-François Natali97781b02011-07-22 23:43:42 +02006215 if test "${ac_cv_search_opendir+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006216 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006218done
Charles-François Natali97781b02011-07-22 23:43:42 +02006219if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006220
Martin v. Löwiseba40652007-08-30 20:10:57 +00006221else
6222 ac_cv_search_opendir=no
6223fi
6224rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006225LIBS=$ac_func_search_save_LIBS
6226fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6228$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006229ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006230if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006231 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006232
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006233fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006234
Michael W. Hudson54241132001-12-07 15:38:26 +00006235else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6237$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006238if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006239 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006240else
6241 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006243/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006244
Martin v. Löwiseba40652007-08-30 20:10:57 +00006245/* Override any GCC internal prototype to avoid an error.
6246 Use char because int might match the return type of a GCC
6247 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006248#ifdef __cplusplus
6249extern "C"
6250#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006251char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006252int
6253main ()
6254{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006255return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006256 ;
6257 return 0;
6258}
6259_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006260for ac_lib in '' x; do
6261 if test -z "$ac_lib"; then
6262 ac_res="none required"
6263 else
6264 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006265 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006266 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006267 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006268 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006269fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006270rm -f core conftest.err conftest.$ac_objext \
6271 conftest$ac_exeext
Charles-François Natali97781b02011-07-22 23:43:42 +02006272 if test "${ac_cv_search_opendir+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006273 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006275done
Charles-François Natali97781b02011-07-22 23:43:42 +02006276if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006277
Martin v. Löwiseba40652007-08-30 20:10:57 +00006278else
6279 ac_cv_search_opendir=no
6280fi
6281rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006282LIBS=$ac_func_search_save_LIBS
6283fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6285$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006286ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006287if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006288 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006289
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006290fi
6291
6292fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006293
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6295$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006296if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006297 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006298else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006300/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006302int
6303main ()
6304{
6305return makedev(0, 0);
6306 ;
6307 return 0;
6308}
6309_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006310if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006311 ac_cv_header_sys_types_h_makedev=yes
6312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006313 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006314fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006315rm -f core conftest.err conftest.$ac_objext \
6316 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006317
6318fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6320$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006321
6322if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006323ac_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 +02006324if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006325
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006326$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006327
6328fi
6329
6330
6331
6332 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006333 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 +02006334if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006335
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006336$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006337
6338fi
6339
6340
6341 fi
6342fi
6343
Michael W. Hudson54241132001-12-07 15:38:26 +00006344
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006345# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006346for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006347do :
6348 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006349#ifdef HAVE_CURSES_H
6350#include <curses.h>
6351#endif
6352
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006353"
Charles-François Natali97781b02011-07-22 23:43:42 +02006354if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006355 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006356#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006357_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006358
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006359fi
6360
6361done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006362
6363
Martin v. Löwis11017b12006-01-14 18:12:57 +00006364# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006365for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006366do :
6367 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 +00006368#ifdef HAVE_ASM_TYPES_H
6369#include <asm/types.h>
6370#endif
6371#ifdef HAVE_SYS_SOCKET_H
6372#include <sys/socket.h>
6373#endif
6374
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006375"
Charles-François Natali97781b02011-07-22 23:43:42 +02006376if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006377 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006378#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006379_ACEOF
6380
6381fi
6382
6383done
6384
6385
Guido van Rossum627b2d71993-12-24 10:39:16 +00006386# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006387was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6389$as_echo_n "checking for clock_t in time.h... " >&6; }
6390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006391/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006392#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006393
6394_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006395if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006396 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006397 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006398else
Martin v. Löwis11437992002-04-12 09:54:03 +00006399
6400
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006401$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006402
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006403
Guido van Rossum627b2d71993-12-24 10:39:16 +00006404fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006405rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006406
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6408$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006409
Neal Norwitz11690112002-07-30 01:08:28 +00006410# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6412$as_echo_n "checking for makedev... " >&6; }
6413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006414/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006415
6416#if defined(MAJOR_IN_MKDEV)
6417#include <sys/mkdev.h>
6418#elif defined(MAJOR_IN_SYSMACROS)
6419#include <sys/sysmacros.h>
6420#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006421#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006422#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006423int
6424main ()
6425{
6426 makedev(0, 0)
6427 ;
6428 return 0;
6429}
6430_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006431if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006432 ac_cv_has_makedev=yes
6433else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006434 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006435fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006436rm -f core conftest.err conftest.$ac_objext \
6437 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006438if test "$ac_cv_has_makedev" = "no"; then
6439 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006441/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006442
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006443#define _OSF_SOURCE 1
6444#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006445
Neal Norwitz11690112002-07-30 01:08:28 +00006446int
6447main ()
6448{
6449 makedev(0, 0)
6450 ;
6451 return 0;
6452}
6453_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006454if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006455 ac_cv_has_makedev=yes
6456else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006457 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006458fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006459rm -f core conftest.err conftest.$ac_objext \
6460 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006461 if test "$ac_cv_has_makedev" = "yes"; then
6462
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006463$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006464
6465 fi
6466fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6468$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006469if test "$ac_cv_has_makedev" = "yes"; then
6470
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006471$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006472
6473fi
6474
Martin v. Löwis399a6892002-10-04 10:22:02 +00006475# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6476# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6477# defined, but the compiler does not support pragma redefine_extname,
6478# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6479# structures (such as rlimit64) without declaring them. As a
6480# work-around, disable LFS on such configurations
6481
6482use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6484$as_echo_n "checking Solaris LFS bug... " >&6; }
6485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006486/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006487
6488#define _LARGEFILE_SOURCE 1
6489#define _FILE_OFFSET_BITS 64
6490#include <sys/resource.h>
6491
Martin v. Löwis399a6892002-10-04 10:22:02 +00006492int
6493main ()
6494{
6495struct rlimit foo;
6496 ;
6497 return 0;
6498}
6499_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006500if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006501 sol_lfs_bug=no
6502else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006503 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6507$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006508if test "$sol_lfs_bug" = "yes"; then
6509 use_lfs=no
6510fi
6511
6512if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006513# Two defines needed to enable largefile support on various platforms
6514# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00006515case $ac_sys_system/$ac_sys_release in
6516AIX*)
6517
6518$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6519
6520 ;;
6521esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006522
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006523$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006524
6525
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006526$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006527
Martin v. Löwis399a6892002-10-04 10:22:02 +00006528fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006529
Guido van Rossum84e7b241996-08-19 21:59:00 +00006530# Add some code to confdefs.h so that the test for off_t works on SCO
6531cat >> confdefs.h <<\EOF
6532#if defined(SCO_DS)
6533#undef _OFF_T
6534#endif
6535EOF
6536
Guido van Rossumef2255b2000-03-10 22:30:29 +00006537# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006538ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006539if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006540
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006541else
Martin v. Löwis11437992002-04-12 09:54:03 +00006542
6543cat >>confdefs.h <<_ACEOF
6544#define mode_t int
6545_ACEOF
6546
6547fi
6548
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006549ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006550if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006551
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006552else
Martin v. Löwis11437992002-04-12 09:54:03 +00006553
6554cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006555#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006556_ACEOF
6557
6558fi
6559
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006560ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006561if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006562
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006563else
Martin v. Löwis11437992002-04-12 09:54:03 +00006564
6565cat >>confdefs.h <<_ACEOF
6566#define pid_t int
6567_ACEOF
6568
6569fi
6570
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006571
Martin v. Löwis11437992002-04-12 09:54:03 +00006572cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00006573#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006574_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006575
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006576ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006577if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006578
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006579else
Martin v. Löwis11437992002-04-12 09:54:03 +00006580
6581cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006582#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006583_ACEOF
6584
6585fi
6586
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6588$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006589if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006590 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006591else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006593/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006594#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006595
6596_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006597if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006598 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006599 ac_cv_type_uid_t=yes
6600else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006601 ac_cv_type_uid_t=no
6602fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006603rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006604
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006605fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6607$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006608if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006609
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006610$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006611
6612
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006613$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006614
6615fi
6616
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006617ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6618case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006619 no|yes) ;; #(
6620 *)
6621
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006622$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006623
6624
6625cat >>confdefs.h <<_ACEOF
6626#define uint32_t $ac_cv_c_uint32_t
6627_ACEOF
6628;;
6629 esac
6630
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006631ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6632case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006633 no|yes) ;; #(
6634 *)
6635
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006636$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006637
6638
6639cat >>confdefs.h <<_ACEOF
6640#define uint64_t $ac_cv_c_uint64_t
6641_ACEOF
6642;;
6643 esac
6644
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006645ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6646case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006647 no|yes) ;; #(
6648 *)
6649
6650cat >>confdefs.h <<_ACEOF
6651#define int32_t $ac_cv_c_int32_t
6652_ACEOF
6653;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006654esac
6655
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006656ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6657case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006658 no|yes) ;; #(
6659 *)
6660
6661cat >>confdefs.h <<_ACEOF
6662#define int64_t $ac_cv_c_int64_t
6663_ACEOF
6664;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006665esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006666
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006667ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006668if test "x$ac_cv_type_ssize_t" = x""yes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006669
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006670$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006671
6672fi
6673
Jack Jansendd19cf82001-12-06 22:36:17 +00006674
Michael W. Hudson54241132001-12-07 15:38:26 +00006675# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006676# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006677# The cast to long int works around a bug in the HP C Compiler
6678# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6679# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6680# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6682$as_echo_n "checking size of int... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006683if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006684 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006685else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006686 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 +00006687
Martin v. Löwis11437992002-04-12 09:54:03 +00006688else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006689 if test "$ac_cv_type_int" = yes; then
6690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006692as_fn_error 77 "cannot compute sizeof (int)
Charles-François Natali97781b02011-07-22 23:43:42 +02006693See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006694 else
6695 ac_cv_sizeof_int=0
6696 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006697fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006698
Martin v. Löwis11437992002-04-12 09:54:03 +00006699fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6701$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006702
6703
6704
Martin v. Löwis11437992002-04-12 09:54:03 +00006705cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006706#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006707_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006708
6709
Martin v. Löwiseba40652007-08-30 20:10:57 +00006710# The cast to long int works around a bug in the HP C Compiler
6711# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6712# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6713# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6715$as_echo_n "checking size of long... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006716if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006717 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006718else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006719 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 +00006720
Martin v. Löwis11437992002-04-12 09:54:03 +00006721else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006722 if test "$ac_cv_type_long" = yes; then
6723 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6724$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006725as_fn_error 77 "cannot compute sizeof (long)
Charles-François Natali97781b02011-07-22 23:43:42 +02006726See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006727 else
6728 ac_cv_sizeof_long=0
6729 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006730fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006731
Martin v. Löwis11437992002-04-12 09:54:03 +00006732fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6734$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006735
6736
6737
Martin v. Löwis11437992002-04-12 09:54:03 +00006738cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006739#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006740_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006741
6742
Martin v. Löwiseba40652007-08-30 20:10:57 +00006743# The cast to long int works around a bug in the HP C Compiler
6744# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6745# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6746# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6748$as_echo_n "checking size of void *... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006749if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006750 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006752 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 +00006753
Martin v. Löwis11437992002-04-12 09:54:03 +00006754else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006755 if test "$ac_cv_type_void_p" = yes; then
6756 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6757$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006758as_fn_error 77 "cannot compute sizeof (void *)
Charles-François Natali97781b02011-07-22 23:43:42 +02006759See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006760 else
6761 ac_cv_sizeof_void_p=0
6762 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006763fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006764
Martin v. Löwis11437992002-04-12 09:54:03 +00006765fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6767$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006768
6769
6770
Martin v. Löwis11437992002-04-12 09:54:03 +00006771cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006772#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006773_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006774
6775
Martin v. Löwiseba40652007-08-30 20:10:57 +00006776# The cast to long int works around a bug in the HP C Compiler
6777# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6778# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6779# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6781$as_echo_n "checking size of short... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006782if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006783 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006784else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006785 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 +00006786
Martin v. Löwis11437992002-04-12 09:54:03 +00006787else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006788 if test "$ac_cv_type_short" = yes; then
6789 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6790$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006791as_fn_error 77 "cannot compute sizeof (short)
Charles-François Natali97781b02011-07-22 23:43:42 +02006792See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006793 else
6794 ac_cv_sizeof_short=0
6795 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006796fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006797
Martin v. Löwis11437992002-04-12 09:54:03 +00006798fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6800$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006801
6802
6803
Martin v. Löwis11437992002-04-12 09:54:03 +00006804cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006805#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006806_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006807
6808
Martin v. Löwiseba40652007-08-30 20:10:57 +00006809# The cast to long int works around a bug in the HP C Compiler
6810# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6811# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6812# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6814$as_echo_n "checking size of float... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006815if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006816 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006817else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006818 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 +00006819
Martin v. Löwis11437992002-04-12 09:54:03 +00006820else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006821 if test "$ac_cv_type_float" = yes; then
6822 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6823$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006824as_fn_error 77 "cannot compute sizeof (float)
Charles-François Natali97781b02011-07-22 23:43:42 +02006825See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006826 else
6827 ac_cv_sizeof_float=0
6828 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006829fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006830
Martin v. Löwis11437992002-04-12 09:54:03 +00006831fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6833$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006834
6835
6836
Martin v. Löwis11437992002-04-12 09:54:03 +00006837cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006838#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006839_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006840
6841
Martin v. Löwiseba40652007-08-30 20:10:57 +00006842# The cast to long int works around a bug in the HP C Compiler
6843# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6844# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6845# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6847$as_echo_n "checking size of double... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006848if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006849 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006850else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006851 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 +00006852
Martin v. Löwis11437992002-04-12 09:54:03 +00006853else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006854 if test "$ac_cv_type_double" = yes; then
6855 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6856$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006857as_fn_error 77 "cannot compute sizeof (double)
Charles-François Natali97781b02011-07-22 23:43:42 +02006858See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006859 else
6860 ac_cv_sizeof_double=0
6861 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006862fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006863
Martin v. Löwis11437992002-04-12 09:54:03 +00006864fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6866$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006867
6868
6869
Martin v. Löwis11437992002-04-12 09:54:03 +00006870cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006871#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006872_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006873
6874
Martin v. Löwiseba40652007-08-30 20:10:57 +00006875# The cast to long int works around a bug in the HP C Compiler
6876# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6877# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6878# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6880$as_echo_n "checking size of fpos_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006881if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006882 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006883else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006884 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 +00006885
Martin v. Löwis11437992002-04-12 09:54:03 +00006886else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006887 if test "$ac_cv_type_fpos_t" = yes; then
6888 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006890as_fn_error 77 "cannot compute sizeof (fpos_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02006891See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006892 else
6893 ac_cv_sizeof_fpos_t=0
6894 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006895fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006896
Martin v. Löwis11437992002-04-12 09:54:03 +00006897fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6899$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006900
6901
6902
Martin v. Löwis11437992002-04-12 09:54:03 +00006903cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006904#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006905_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006906
Michael W. Hudson54241132001-12-07 15:38:26 +00006907
Martin v. Löwiseba40652007-08-30 20:10:57 +00006908# The cast to long int works around a bug in the HP C Compiler
6909# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6910# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6911# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6913$as_echo_n "checking size of size_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006914if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006915 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006916else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006917 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 +00006918
Martin v. Löwis18e16552006-02-15 17:27:45 +00006919else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006920 if test "$ac_cv_type_size_t" = yes; then
6921 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006923as_fn_error 77 "cannot compute sizeof (size_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02006924See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006925 else
6926 ac_cv_sizeof_size_t=0
6927 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006928fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006929
Martin v. Löwis18e16552006-02-15 17:27:45 +00006930fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6932$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006933
6934
6935
Martin v. Löwis18e16552006-02-15 17:27:45 +00006936cat >>confdefs.h <<_ACEOF
6937#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6938_ACEOF
6939
6940
Christian Heimes951cc0f2008-01-31 23:08:23 +00006941# The cast to long int works around a bug in the HP C Compiler
6942# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6943# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6944# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6946$as_echo_n "checking size of pid_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006947if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006948 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00006949else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006950 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 +00006951
Christian Heimes951cc0f2008-01-31 23:08:23 +00006952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006953 if test "$ac_cv_type_pid_t" = yes; then
6954 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6955$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006956as_fn_error 77 "cannot compute sizeof (pid_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02006957See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006958 else
6959 ac_cv_sizeof_pid_t=0
6960 fi
6961fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006962
Christian Heimes951cc0f2008-01-31 23:08:23 +00006963fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6965$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006966
6967
6968
6969cat >>confdefs.h <<_ACEOF
6970#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6971_ACEOF
6972
6973
Michael W. Hudson54241132001-12-07 15:38:26 +00006974
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6976$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006977have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006979/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006980
Martin v. Löwis11437992002-04-12 09:54:03 +00006981int
6982main ()
6983{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006984long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006985 ;
6986 return 0;
6987}
6988_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006989if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006990
6991
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006992$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006993
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006994 have_long_long=yes
6995
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6999$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007000if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007001# The cast to long int works around a bug in the HP C Compiler
7002# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7003# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7004# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7006$as_echo_n "checking size of long long... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007007if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007008 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007009else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007010 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 +00007011
Martin v. Löwis11437992002-04-12 09:54:03 +00007012else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007013 if test "$ac_cv_type_long_long" = yes; then
7014 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7015$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007016as_fn_error 77 "cannot compute sizeof (long long)
Charles-François Natali97781b02011-07-22 23:43:42 +02007017See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007018 else
7019 ac_cv_sizeof_long_long=0
7020 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007021fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007022
Martin v. Löwis11437992002-04-12 09:54:03 +00007023fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7025$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007026
7027
7028
Martin v. Löwis11437992002-04-12 09:54:03 +00007029cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007030#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007031_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007032
Michael W. Hudson54241132001-12-07 15:38:26 +00007033
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007034fi
7035
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7037$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007038have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007040/* end confdefs.h. */
7041
7042int
7043main ()
7044{
Matthias Klosec511b472010-05-08 11:01:39 +00007045long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007046 ;
7047 return 0;
7048}
7049_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007050if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007051
7052
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007053$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007054
7055 have_long_double=yes
7056
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007057fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7060$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007061if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007062# The cast to long int works around a bug in the HP C Compiler
7063# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7064# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7065# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7067$as_echo_n "checking size of long double... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007068if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007069 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007070else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007071 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 +00007072
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007073else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007074 if test "$ac_cv_type_long_double" = yes; then
7075 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007077as_fn_error 77 "cannot compute sizeof (long double)
Charles-François Natali97781b02011-07-22 23:43:42 +02007078See \`config.log' for more details" "$LINENO" 5 ; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007079 else
7080 ac_cv_sizeof_long_double=0
7081 fi
7082fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007083
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007084fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7086$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007087
7088
7089
7090cat >>confdefs.h <<_ACEOF
7091#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7092_ACEOF
7093
7094
7095fi
7096
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7098$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007099have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007101/* end confdefs.h. */
7102
7103int
7104main ()
7105{
7106_Bool x; x = (_Bool)0;
7107 ;
7108 return 0;
7109}
7110_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007111if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007112
7113
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007114$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007115
7116 have_c99_bool=yes
7117
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7121$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007122if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007123# The cast to long int works around a bug in the HP C Compiler
7124# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7125# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7126# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7128$as_echo_n "checking size of _Bool... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007129if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007130 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007131else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007132 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 +00007133
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007135 if test "$ac_cv_type__Bool" = yes; then
7136 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007138as_fn_error 77 "cannot compute sizeof (_Bool)
Charles-François Natali97781b02011-07-22 23:43:42 +02007139See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007140 else
7141 ac_cv_sizeof__Bool=0
7142 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007143fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007144
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007145fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7147$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007148
7149
7150
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007151cat >>confdefs.h <<_ACEOF
7152#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7153_ACEOF
7154
7155
7156fi
7157
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007158ac_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 +00007159 #include <stdint.h>
7160 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007161 #ifdef HAVE_INTTYPES_H
7162 #include <inttypes.h>
7163 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007164"
Charles-François Natali97781b02011-07-22 23:43:42 +02007165if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007166
7167cat >>confdefs.h <<_ACEOF
7168#define HAVE_UINTPTR_T 1
7169_ACEOF
7170
Martin v. Löwiseba40652007-08-30 20:10:57 +00007171# The cast to long int works around a bug in the HP C Compiler
7172# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7173# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7174# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7176$as_echo_n "checking size of uintptr_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007177if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007178 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007179else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007180 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 +00007181
Martin v. Löwis11437992002-04-12 09:54:03 +00007182else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007183 if test "$ac_cv_type_uintptr_t" = yes; then
7184 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007186as_fn_error 77 "cannot compute sizeof (uintptr_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007187See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007188 else
7189 ac_cv_sizeof_uintptr_t=0
7190 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007191fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007192
Martin v. Löwis11437992002-04-12 09:54:03 +00007193fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7195$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007196
7197
7198
Martin v. Löwis11437992002-04-12 09:54:03 +00007199cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007200#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007201_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007202
Michael W. Hudson54241132001-12-07 15:38:26 +00007203
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007204fi
7205
Martin v. Löwisebe26702006-10-02 14:55:51 +00007206
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007207# The cast to long int works around a bug in the HP C Compiler
7208# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7209# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7210# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7212$as_echo_n "checking size of off_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007213if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007214 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007215else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007216 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007217#ifdef HAVE_SYS_TYPES_H
7218#include <sys/types.h>
7219#endif
7220
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007221"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007222
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007223else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007224 if test "$ac_cv_type_off_t" = yes; then
7225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7226$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007227as_fn_error 77 "cannot compute sizeof (off_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007228See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007229 else
7230 ac_cv_sizeof_off_t=0
7231 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007232fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007233
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007234fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7236$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007237
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007238
7239
Martin v. Löwis11437992002-04-12 09:54:03 +00007240cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007241#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007242_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007243
Michael W. Hudson54241132001-12-07 15:38:26 +00007244
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007245
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7247$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007248if test "$have_long_long" = yes
7249then
7250if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007251 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007252
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007253$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007254
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7256$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007257else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7259$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007260fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007261else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7263$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007264fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007265
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007266# The cast to long int works around a bug in the HP C Compiler
7267# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7268# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7269# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7271$as_echo_n "checking size of time_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007272if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007273 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007274else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007275 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007276#ifdef HAVE_SYS_TYPES_H
7277#include <sys/types.h>
7278#endif
7279#ifdef HAVE_TIME_H
7280#include <time.h>
7281#endif
7282
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007283"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007284
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007285else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007286 if test "$ac_cv_type_time_t" = yes; then
7287 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7288$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007289as_fn_error 77 "cannot compute sizeof (time_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007290See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007291 else
7292 ac_cv_sizeof_time_t=0
7293 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007294fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007295
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007296fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7298$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007299
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007300
7301
Martin v. Löwis11437992002-04-12 09:54:03 +00007302cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007303#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007304_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007305
Michael W. Hudson54241132001-12-07 15:38:26 +00007306
7307
Trent Mick635f6fb2000-08-23 21:33:05 +00007308# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007309ac_save_cc="$CC"
7310if test "$ac_cv_kpthread" = "yes"
7311then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007312elif test "$ac_cv_kthread" = "yes"
7313then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007314elif test "$ac_cv_pthread" = "yes"
7315then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007316fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7318$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007319have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007321/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007322
7323 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007324int
7325main ()
7326{
Guido van Rossum12580492000-09-24 16:47:19 +00007327pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007328 ;
7329 return 0;
7330}
Matthias Klosec511b472010-05-08 11:01:39 +00007331
Martin v. Löwis11437992002-04-12 09:54:03 +00007332_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007333if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007334 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7338$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007339if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007340 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007341# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7342# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7343# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7345$as_echo_n "checking size of pthread_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007346if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007347 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007348else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007349 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007350#ifdef HAVE_PTHREAD_H
7351#include <pthread.h>
7352#endif
7353
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007354"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007355
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007356else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007357 if test "$ac_cv_type_pthread_t" = yes; then
7358 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7359$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007360as_fn_error 77 "cannot compute sizeof (pthread_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007361See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007362 else
7363 ac_cv_sizeof_pthread_t=0
7364 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007365fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007366
Trent Mick635f6fb2000-08-23 21:33:05 +00007367fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7369$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007370
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007371
7372
Martin v. Löwis11437992002-04-12 09:54:03 +00007373cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007374#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007375_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007376
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007377
Trent Mick635f6fb2000-08-23 21:33:05 +00007378fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007379CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007380
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7382$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007383# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007384if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007385 enableval=$enable_toolbox_glue;
7386fi
Jack Jansene578a632001-08-15 01:27:14 +00007387
7388
7389if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007390then
Jack Jansene578a632001-08-15 01:27:14 +00007391 case $ac_sys_system/$ac_sys_release in
7392 Darwin/*)
7393 enable_toolbox_glue="yes";;
7394 *)
7395 enable_toolbox_glue="no";;
7396 esac
7397fi
7398case "$enable_toolbox_glue" in
7399yes)
Jack Jansene578a632001-08-15 01:27:14 +00007400 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007401 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007402
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007403$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007404
7405 ;;
7406*)
Jack Jansene578a632001-08-15 01:27:14 +00007407 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007408 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007409 ;;
7410esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7412$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007413
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007414
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007415
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007416case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007417 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007418 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7419 ;;
7420 Darwin/*)
7421 OTHER_LIBTOOL_OPT=""
7422 ;;
7423esac
7424
7425
Ronald Oussoren25967582009-09-06 10:00:26 +00007426ARCH_RUN_32BIT=""
7427
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007428case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007429 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007430 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7431 if test "${enable_universalsdk}"; then
7432 :
7433 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007434 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007435 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007436 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007437 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007438 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007439 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007440 if test ${gcc_version} '<' 4.0
7441 then
7442 LIBTOOL_CRUFT="-lcc_dynamic"
7443 else
7444 LIBTOOL_CRUFT=""
7445 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007446 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00007447 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00007448else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007450/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00007451
Ronald Oussoren25967582009-09-06 10:00:26 +00007452 #include <unistd.h>
7453 int main(int argc, char*argv[])
7454 {
7455 if (sizeof(long) == 4) {
7456 return 0;
7457 } else {
7458 return 1;
7459 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00007460 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00007461
Ronald Oussoren25967582009-09-06 10:00:26 +00007462_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007463if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00007464 ac_osx_32bit=yes
7465else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007466 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00007467fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007468rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7469 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007470fi
7471
7472
Ronald Oussoren25967582009-09-06 10:00:26 +00007473 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007474 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007475 i386)
7476 MACOSX_DEFAULT_ARCH="i386"
7477 ;;
7478 ppc)
7479 MACOSX_DEFAULT_ARCH="ppc"
7480 ;;
7481 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007482 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007483 ;;
7484 esac
7485 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007486 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007487 i386)
7488 MACOSX_DEFAULT_ARCH="x86_64"
7489 ;;
7490 ppc)
7491 MACOSX_DEFAULT_ARCH="ppc64"
7492 ;;
7493 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007494 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007495 ;;
7496 esac
7497
7498 #ARCH_RUN_32BIT="true"
7499 fi
7500
7501 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007502 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007503 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007504esac
7505
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7507$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007508if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007509then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007510 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007511 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007512 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007513
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007514$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007515
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7517$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00007518 if test $enable_shared = "yes"
7519 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007520 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 +00007521 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007522else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7524$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007525fi
7526
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7528$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007529case $ac_sys_system/$ac_sys_release in
7530 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007532$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007533
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7535$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007536 ;;
7537 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7539$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007540 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007541esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007542
Guido van Rossum0a516c91994-09-12 10:58:40 +00007543# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007544
Michael W. Hudson54241132001-12-07 15:38:26 +00007545
7546
7547
7548
Ronald Oussoren75912852010-04-08 08:13:31 +00007549
Guido van Rossum0a516c91994-09-12 10:58:40 +00007550# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007551# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7553$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007554if test -z "$SO"
7555then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007556 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00007557 hp*|HP*)
7558 case `uname -m` in
7559 ia64) SO=.so;;
7560 *) SO=.sl;;
7561 esac
7562 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007563 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007564 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007565 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007566else
7567 # this might also be a termcap variable, see #610332
7568 echo
7569 echo '====================================================================='
7570 echo '+ +'
7571 echo '+ WARNING: You have set SO in your environment. +'
7572 echo '+ Do you really mean to change the extension for shared libraries? +'
7573 echo '+ Continuing in 10 seconds to let you to ponder. +'
7574 echo '+ +'
7575 echo '====================================================================='
7576 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007577fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7579$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00007580
Ronald Oussoren79f90492009-01-02 10:44:46 +00007581
Neal Norwitz58e28882006-05-19 07:00:58 +00007582cat >>confdefs.h <<_ACEOF
7583#define SHLIB_EXT "$SO"
7584_ACEOF
7585
Guido van Rossum0a516c91994-09-12 10:58:40 +00007586# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007587# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007588# (Shared libraries in this instance are shared modules to be loaded into
7589# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7591$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007592if test -z "$LDSHARED"
7593then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007594 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007595 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007596 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007597 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007598 ;;
7599 BeOS*)
7600 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00007601 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007602 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007603 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007604 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007605 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007606 if test "$GCC" = "yes" ; then
7607 LDSHARED='$(CC) -shared'
7608 LDCXXSHARED='$(CXX) -shared'
7609 else
7610 LDSHARED='$(CC) -G'
7611 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00007612 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00007613 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007614 if test "$GCC" = "yes" ; then
7615 LDSHARED='$(CC) -shared'
7616 LDCXXSHARED='$(CXX) -shared'
7617 else
7618 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00007619 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007620 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007621 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007622 LDSHARED='$(CC) -bundle'
7623 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007624 if test "$enable_framework" ; then
7625 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007626 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7627 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007628 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007629 else
7630 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007631 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00007632 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007633 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007634 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007635 LDSHARED='$(CC) -bundle'
7636 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007637 if test "$enable_framework" ; then
7638 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007639 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7640 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007641 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007642 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007643 # No framework, use the Python app as bundle-loader
7644 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007645 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007646 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007647 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007648 Darwin/*)
7649 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7650 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00007651
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007652 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007653 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00007654 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007655 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007656 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00007657 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7658 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007659 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007660 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007661 LDSHARED='$(CC) -bundle'
7662 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007663 if test "$enable_framework" ; then
7664 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007665 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7666 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007667 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007668 else
7669 # No framework, use the Python app as bundle-loader
7670 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7671 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007672 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007673 fi
7674 fi
7675 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007676 Linux*|GNU*|QNX*)
7677 LDSHARED='$(CC) -shared'
7678 LDCXXSHARED='$(CXX) -shared';;
7679 BSD/OS*/4*)
7680 LDSHARED="gcc -shared"
7681 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007682 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007683 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007684 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007685 LDSHARED='$(CC) -shared'
7686 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007687 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007688 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007689 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007690 OpenBSD*)
7691 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7692 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007693 LDSHARED='$(CC) -shared $(CCSHARED)'
7694 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007695 else
7696 case `uname -r` in
7697 [01].* | 2.[0-7] | 2.[0-7].*)
7698 LDSHARED="ld -Bshareable ${LDFLAGS}"
7699 ;;
7700 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007701 LDSHARED='$(CC) -shared $(CCSHARED)'
7702 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007703 ;;
7704 esac
7705 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007706 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00007707 LDSHARED='$(CC) -shared'
7708 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007709 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007710 if test "$GCC" = "yes" ; then
7711 LDSHARED='$(CC) -shared'
7712 LDCXXSHARED='$(CXX) -shared'
7713 else
7714 LDSHARED='$(CC) -G'
7715 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007716 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007717 SCO_SV*)
7718 LDSHARED='$(CC) -Wl,-G,-Bexport'
7719 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7720 CYGWIN*)
7721 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7722 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7723 atheos*)
7724 LDSHARED="gcc -shared"
7725 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007726 *) LDSHARED="ld";;
7727 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007728fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7730$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00007731LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007732BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007733# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007734# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7736$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007737if test -z "$CCSHARED"
7738then
Guido van Rossum07397971997-04-29 21:49:50 +00007739 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007740 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00007741 then CCSHARED="-fPIC";
7742 elif test `uname -p` = sparc;
7743 then CCSHARED="-xcode=pic32";
7744 else CCSHARED="-Kpic";
7745 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007746 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007747 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007748 else CCSHARED="+z";
7749 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007750 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007751 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007752 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007753 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007754 if test "$GCC" = "yes"
7755 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007756 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007757 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007758 SCO_SV*)
7759 if test "$GCC" = "yes"
7760 then CCSHARED="-fPIC"
7761 else CCSHARED="-Kpic -belf"
7762 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007763 IRIX*/6*) case $CC in
7764 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007765 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007766 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007767 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007768 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007769fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7771$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007772# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007773# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7775$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007776if test -z "$LINKFORSHARED"
7777then
Guido van Rossum07397971997-04-29 21:49:50 +00007778 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007779 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007780 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007781 LINKFORSHARED="-Wl,-E -Wl,+s";;
7782# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007783 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007784 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007785 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007786 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007787 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7788 # which is
Jack Jansene578a632001-08-15 01:27:14 +00007789 # not used by the core itself but which needs to be in the core so
7790 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00007791 # -prebind is no longer used, because it actually seems to give a
7792 # slowdown in stead of a speedup, maybe due to the large number of
7793 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007794
7795 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00007796 if test "$enable_framework"
7797 then
Jack Jansenda49e192005-01-07 13:08:22 +00007798 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007799 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007800 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007801 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007802 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007803 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007804 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007805 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7806 then
7807 LINKFORSHARED="-Wl,--export-dynamic"
7808 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007809 SunOS/5*) case $CC in
7810 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007811 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007812 then
7813 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007814 fi;;
7815 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007816 CYGWIN*)
7817 if test $enable_shared = "no"
7818 then
7819 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7820 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007821 QNX*)
7822 # -Wl,-E causes the symbols to be added to the dynamic
7823 # symbol table so that they can be found when a module
7824 # is loaded. -N 2048K causes the stack size to be set
7825 # to 2048 kilobytes so that the stack doesn't overflow
7826 # when running test_compile.py.
7827 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007828 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007829fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7831$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007832
Michael W. Hudson54241132001-12-07 15:38:26 +00007833
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007834
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7836$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007837if test ! "$LIBRARY" = "$LDLIBRARY"
7838then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007839 case $ac_sys_system in
7840 CYGWIN*)
7841 # Cygwin needs CCSHARED when building extension DLLs
7842 # but not when building the interpreter DLL.
7843 CFLAGSFORSHARED='';;
7844 *)
7845 CFLAGSFORSHARED='$(CCSHARED)'
7846 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007847fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7849$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007850
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007851# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7852# library (with --enable-shared).
7853# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007854# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7855# if it is not required, since it creates a dependency of the shared library
7856# to LIBS. This, in turn, means that applications linking the shared libpython
7857# don't need to link LIBS explicitly. The default should be only changed
7858# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007859
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7861$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007862case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007863 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007864 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007865esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7867$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007868
7869
Guido van Rossum627b2d71993-12-24 10:39:16 +00007870# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7872$as_echo_n "checking for dlopen in -ldl... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007873if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007874 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007875else
Martin v. Löwis11437992002-04-12 09:54:03 +00007876 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007877LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007880
Martin v. Löwiseba40652007-08-30 20:10:57 +00007881/* Override any GCC internal prototype to avoid an error.
7882 Use char because int might match the return type of a GCC
7883 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007884#ifdef __cplusplus
7885extern "C"
7886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007887char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007888int
7889main ()
7890{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007891return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007892 ;
7893 return 0;
7894}
7895_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007896if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007897 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007898else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007899 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007900fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007901rm -f core conftest.err conftest.$ac_objext \
7902 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007903LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007904fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7906$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007907if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007908 cat >>confdefs.h <<_ACEOF
7909#define HAVE_LIBDL 1
7910_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007911
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007912 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007913
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007914fi
7915 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7917$as_echo_n "checking for shl_load in -ldld... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007918if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007919 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007920else
Martin v. Löwis11437992002-04-12 09:54:03 +00007921 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007922LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007925
Martin v. Löwiseba40652007-08-30 20:10:57 +00007926/* Override any GCC internal prototype to avoid an error.
7927 Use char because int might match the return type of a GCC
7928 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007929#ifdef __cplusplus
7930extern "C"
7931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007932char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007933int
7934main ()
7935{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007936return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007937 ;
7938 return 0;
7939}
7940_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007941if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007942 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007943else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007944 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007945fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007946rm -f core conftest.err conftest.$ac_objext \
7947 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007948LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007949fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7951$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007952if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007953 cat >>confdefs.h <<_ACEOF
7954#define HAVE_LIBDLD 1
7955_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007956
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007957 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007958
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007959fi
7960 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007961
Ronald Oussoren79f90492009-01-02 10:44:46 +00007962# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007963if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7965$as_echo_n "checking for library containing sem_init... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007966if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007967 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007968else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007969 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007972
Martin v. Löwiseba40652007-08-30 20:10:57 +00007973/* Override any GCC internal prototype to avoid an error.
7974 Use char because int might match the return type of a GCC
7975 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007976#ifdef __cplusplus
7977extern "C"
7978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007979char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007980int
7981main ()
7982{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007983return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007984 ;
7985 return 0;
7986}
7987_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007988for ac_lib in '' pthread rt posix4; do
7989 if test -z "$ac_lib"; then
7990 ac_res="none required"
7991 else
7992 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007993 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007994 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007995 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007996 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007997fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007998rm -f core conftest.err conftest.$ac_objext \
7999 conftest$ac_exeext
Charles-François Natali97781b02011-07-22 23:43:42 +02008000 if test "${ac_cv_search_sem_init+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008001 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008003done
Charles-François Natali97781b02011-07-22 23:43:42 +02008004if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008005
Martin v. Löwiseba40652007-08-30 20:10:57 +00008006else
8007 ac_cv_search_sem_init=no
8008fi
8009rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008010LIBS=$ac_func_search_save_LIBS
8011fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8013$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008014ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008015if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008016 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008017
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008018fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008019 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008020 # posix4 on Solaris 2.6
8021 # pthread (first!) on Linux
8022fi
8023
Martin v. Löwis19d17342003-06-14 21:03:05 +00008024# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8026$as_echo_n "checking for textdomain in -lintl... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008027if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008028 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008029else
8030 ac_check_lib_save_LIBS=$LIBS
8031LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008033/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008034
Martin v. Löwiseba40652007-08-30 20:10:57 +00008035/* Override any GCC internal prototype to avoid an error.
8036 Use char because int might match the return type of a GCC
8037 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008038#ifdef __cplusplus
8039extern "C"
8040#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008041char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008042int
8043main ()
8044{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008045return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008046 ;
8047 return 0;
8048}
8049_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008050if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008051 ac_cv_lib_intl_textdomain=yes
8052else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008053 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008054fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008055rm -f core conftest.err conftest.$ac_objext \
8056 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008057LIBS=$ac_check_lib_save_LIBS
8058fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8060$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008061if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008062
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008063$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008064
8065fi
8066
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008067
8068# checks for system dependent C++ extensions support
8069case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008070 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8071$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008073/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008074
Georg Brandl94800df2011-02-25 11:09:02 +00008075 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008076int
8077main ()
8078{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008079loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008080 ;
8081 return 0;
8082}
Matthias Klosec511b472010-05-08 11:01:39 +00008083
Martin v. Löwis11437992002-04-12 09:54:03 +00008084_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008085if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008086
Matthias Klosec511b472010-05-08 11:01:39 +00008087
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008088$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008089
Matthias Klosec511b472010-05-08 11:01:39 +00008090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008091$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008092
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008093else
Matthias Klosec511b472010-05-08 11:01:39 +00008094
8095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008096$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008097
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008098fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008099rm -f core conftest.err conftest.$ac_objext \
8100 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008101 *) ;;
8102esac
8103
Guido van Rossum70c7f481998-03-26 18:44:10 +00008104# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008105# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8107$as_echo_n "checking for t_open in -lnsl... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008108if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008109 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008110else
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008112LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008115
Martin v. Löwiseba40652007-08-30 20:10:57 +00008116/* Override any GCC internal prototype to avoid an error.
8117 Use char because int might match the return type of a GCC
8118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008119#ifdef __cplusplus
8120extern "C"
8121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008122char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008123int
8124main ()
8125{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008126return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008127 ;
8128 return 0;
8129}
8130_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008131if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008132 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008133else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008134 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008135fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008136rm -f core conftest.err conftest.$ac_objext \
8137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008138LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008139fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8141$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008142if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008143 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008144fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008145 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8147$as_echo_n "checking for socket in -lsocket... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008148if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008149 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008150else
Martin v. Löwis11437992002-04-12 09:54:03 +00008151 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008152LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008155
Martin v. Löwiseba40652007-08-30 20:10:57 +00008156/* Override any GCC internal prototype to avoid an error.
8157 Use char because int might match the return type of a GCC
8158 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008159#ifdef __cplusplus
8160extern "C"
8161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008162char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008163int
8164main ()
8165{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008166return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008167 ;
8168 return 0;
8169}
8170_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008171if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008172 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008173else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008174 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008175fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008176rm -f core conftest.err conftest.$ac_objext \
8177 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008178LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008179fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8181$as_echo "$ac_cv_lib_socket_socket" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008182if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008183 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008184fi
8185 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008186
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008187case "$ac_sys_system" in
8188BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8190$as_echo_n "checking for socket in -lnet... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008191if test "${ac_cv_lib_net_socket+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008192 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008193else
Martin v. Löwis11437992002-04-12 09:54:03 +00008194 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008195LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008198
Martin v. Löwiseba40652007-08-30 20:10:57 +00008199/* Override any GCC internal prototype to avoid an error.
8200 Use char because int might match the return type of a GCC
8201 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008202#ifdef __cplusplus
8203extern "C"
8204#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008205char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008206int
8207main ()
8208{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008209return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008210 ;
8211 return 0;
8212}
8213_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008214if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008215 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008216else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008217 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008218fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008219rm -f core conftest.err conftest.$ac_objext \
8220 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008221LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008222fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8224$as_echo "$ac_cv_lib_net_socket" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008225if test "x$ac_cv_lib_net_socket" = x""yes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008226 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008227fi
8228 # BeOS
8229;;
8230esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008231
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8233$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008234
Martin v. Löwiseba40652007-08-30 20:10:57 +00008235# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008236if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008237 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8239$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008240LIBS="$withval $LIBS"
8241
8242else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8244$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008245fi
8246
Guido van Rossum7f43da71994-08-01 12:15:30 +00008247
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008248if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008249 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8250set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8252$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008253if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008254 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008255else
8256 case $PKG_CONFIG in
8257 [\\/]* | ?:[\\/]*)
8258 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8259 ;;
8260 *)
8261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8262for as_dir in $PATH
8263do
8264 IFS=$as_save_IFS
8265 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008266 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008267 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8268 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008269 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008270 break 2
8271 fi
8272done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008273 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008274IFS=$as_save_IFS
8275
8276 ;;
8277esac
8278fi
8279PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8280if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8282$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008283else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8285$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008286fi
8287
8288
8289fi
8290if test -z "$ac_cv_path_PKG_CONFIG"; then
8291 ac_pt_PKG_CONFIG=$PKG_CONFIG
8292 # Extract the first word of "pkg-config", so it can be a program name with args.
8293set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8295$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008296if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008297 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008298else
8299 case $ac_pt_PKG_CONFIG in
8300 [\\/]* | ?:[\\/]*)
8301 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8302 ;;
8303 *)
8304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8305for as_dir in $PATH
8306do
8307 IFS=$as_save_IFS
8308 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008309 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008310 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8311 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008312 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008313 break 2
8314 fi
8315done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008316 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008317IFS=$as_save_IFS
8318
8319 ;;
8320esac
8321fi
8322ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8323if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8325$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008326else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8328$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008329fi
8330
8331 if test "x$ac_pt_PKG_CONFIG" = x; then
8332 PKG_CONFIG=""
8333 else
8334 case $cross_compiling:$ac_tool_warned in
8335yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008336{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8337$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008338ac_tool_warned=yes ;;
8339esac
8340 PKG_CONFIG=$ac_pt_PKG_CONFIG
8341 fi
8342else
8343 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8344fi
8345
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008346
8347# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8349$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008350
8351# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008352if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008353 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008354else
8355 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008356fi
8357
8358
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8360$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008361
8362# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8364$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008365
8366# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008367if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008368 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008369else
8370 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008371fi
8372
8373
8374if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008375 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8376else
8377 LIBFFI_INCLUDEDIR=""
8378fi
8379
8380
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8382$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008383
Benjamin Peterson867475c2009-04-29 20:36:25 +00008384# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8386$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008387
8388# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008389if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008390 withval=$with_dbmliborder;
8391if test x$with_dbmliborder = xyes
8392then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008393as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008394else
8395 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8396 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8397 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008398 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008399 fi
8400 done
8401fi
8402fi
8403
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8405$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008406
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008407# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008408
8409
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8411$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008412
Martin v. Löwiseba40652007-08-30 20:10:57 +00008413# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008414if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008415 withval=$with_signal_module;
8416fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008417
8418
8419if test -z "$with_signal_module"
8420then with_signal_module="yes"
8421fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8423$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008424
8425if test "${with_signal_module}" = "yes"; then
8426 USE_SIGNAL_MODULE=""
8427 SIGNAL_OBJS=""
8428else
8429 USE_SIGNAL_MODULE="#"
8430 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8431fi
8432
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008433# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008434
Barry Warsawc0d24d82000-06-29 16:12:00 +00008435USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008436
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8438$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008439
Guido van Rossumec2f0731997-01-22 20:54:01 +00008440
Martin v. Löwiseba40652007-08-30 20:10:57 +00008441# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008442if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008443 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8445$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008446LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008447if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008448 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008449fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008450else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8452$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008453fi
8454
Martin v. Löwis11437992002-04-12 09:54:03 +00008455
8456# Templates for things AC_DEFINEd more than once.
8457# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008458
8459
Martin v. Löwis11437992002-04-12 09:54:03 +00008460
8461
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8463$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008464
Martin v. Löwiseba40652007-08-30 20:10:57 +00008465# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008466if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008467 withval=$with_threads;
8468fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008469
8470
Barry Warsawc0d24d82000-06-29 16:12:00 +00008471# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008472
Martin v. Löwiseba40652007-08-30 20:10:57 +00008473# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008474if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008475 withval=$with_thread; with_threads=$with_thread
8476fi
8477
Barry Warsawc0d24d82000-06-29 16:12:00 +00008478
8479if test -z "$with_threads"
8480then with_threads="yes"
8481fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8483$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00008484
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008485
Barry Warsawc0d24d82000-06-29 16:12:00 +00008486if test "$with_threads" = "no"
8487then
8488 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008489elif test "$ac_cv_pthread_is_default" = yes
8490then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008491 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008492
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008493 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008494 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008495
8496 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008497 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008498elif test "$ac_cv_kpthread" = "yes"
8499then
8500 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008501 if test "$ac_cv_cxx_thread" = "yes"; then
8502 CXX="$CXX -Kpthread"
8503 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008504 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008505
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008506 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008507 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008508elif test "$ac_cv_kthread" = "yes"
8509then
8510 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008511 if test "$ac_cv_cxx_thread" = "yes"; then
8512 CXX="$CXX -Kthread"
8513 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008514 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008515
8516 posix_threads=yes
8517 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008518elif test "$ac_cv_pthread" = "yes"
8519then
8520 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008521 if test "$ac_cv_cxx_thread" = "yes"; then
8522 CXX="$CXX -pthread"
8523 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008524 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008525
8526 posix_threads=yes
8527 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008528else
8529 if test ! -z "$with_threads" -a -d "$with_threads"
8530 then LDFLAGS="$LDFLAGS -L$with_threads"
8531 fi
8532 if test ! -z "$withval" -a -d "$withval"
8533 then LDFLAGS="$LDFLAGS -L$withval"
8534 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008535
8536 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008537 # define _POSIX_THREADS in unistd.h. Some apparently don't
8538 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8540$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008542/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008543
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008544#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008545#ifdef _POSIX_THREADS
8546yes
8547#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008548
8549_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008550if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008551 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008552 unistd_defines_pthreads=yes
8553else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008554 unistd_defines_pthreads=no
8555fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00008556rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008557
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8559$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008560
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008561 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008562
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008563 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 +02008564if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008565 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008566
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008567 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008568
Martin v. Löwis11437992002-04-12 09:54:03 +00008569
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008570$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008571
8572 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008573 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008574else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008575
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008576 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 +02008577if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008578 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008579
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008580 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008581
Martin v. Löwis11437992002-04-12 09:54:03 +00008582
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008583$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008584
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008585 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008586else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008587
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8589$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008590
Martin v. Löwiseba40652007-08-30 20:10:57 +00008591# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008592if test "${with_pth+set}" = set; then :
8593 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8594$as_echo "$withval" >&6; }
8595 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008596
8597
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008598$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008599
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008600 LIBS="-lpth $LIBS"
8601 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008602else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8604$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008605
8606 # Just looking for pthread_create in libpthread is not enough:
8607 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8608 # So we really have to include pthread.h, and then link.
8609 _libs=$LIBS
8610 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8612$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008614/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008615#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008616
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008617void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008618int
8619main ()
8620{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008621
8622pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 ;
8624 return 0;
8625}
8626_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008627if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008628
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8630$as_echo "yes" >&6; }
8631 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008632
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008633 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008634 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008635else
Martin v. Löwis11437992002-04-12 09:54:03 +00008636
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008637 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008638 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Charles-François Natali97781b02011-07-22 23:43:42 +02008639if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008640 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008641
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008642 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008643 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008644else
Guido van Rossumad678af1998-10-02 14:42:15 +00008645
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008646 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 +02008647if test "x$ac_cv_header_atheos_threads_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008648 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008649
8650
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008651$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008652
8653 THREADOBJ="Python/thread.o"
8654else
8655
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008656 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 +02008657if test "x$ac_cv_header_kernel_OS_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008658 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008659
8660
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008661$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008662
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008663 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008664else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008665
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8667$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008668if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008669 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008670else
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008672LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008675
Martin v. Löwiseba40652007-08-30 20:10:57 +00008676/* Override any GCC internal prototype to avoid an error.
8677 Use char because int might match the return type of a GCC
8678 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008679#ifdef __cplusplus
8680extern "C"
8681#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008682char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008683int
8684main ()
8685{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008686return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008687 ;
8688 return 0;
8689}
8690_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008691if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008692 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008694 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008695fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008696rm -f core conftest.err conftest.$ac_objext \
8697 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008698LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008699fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8701$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008702if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008703 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008704
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008705 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008706 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008707 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008708else
Greg Steinadf63d62000-07-05 10:38:09 +00008709
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8711$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008712if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008713 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008714else
Martin v. Löwis11437992002-04-12 09:54:03 +00008715 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008716LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008719
Martin v. Löwiseba40652007-08-30 20:10:57 +00008720/* Override any GCC internal prototype to avoid an error.
8721 Use char because int might match the return type of a GCC
8722 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008723#ifdef __cplusplus
8724extern "C"
8725#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008726char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008727int
8728main ()
8729{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008730return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008731 ;
8732 return 0;
8733}
8734_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008735if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008736 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008737else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008738 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008739fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008740rm -f core conftest.err conftest.$ac_objext \
8741 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008742LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008743fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8745$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008746if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008747 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008748
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008749 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008750 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008751 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008752else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008753
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8755$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008756if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008757 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008758else
Martin v. Löwis11437992002-04-12 09:54:03 +00008759 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008760LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008763
Martin v. Löwiseba40652007-08-30 20:10:57 +00008764/* Override any GCC internal prototype to avoid an error.
8765 Use char because int might match the return type of a GCC
8766 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008767#ifdef __cplusplus
8768extern "C"
8769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008770char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008771int
8772main ()
8773{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008774return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008775 ;
8776 return 0;
8777}
8778_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008779if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008780 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008781else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008782 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008783fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008784rm -f core conftest.err conftest.$ac_objext \
8785 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008786LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008787fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8789$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008790if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008791 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008792
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008793 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008794 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008795 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008796else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008797
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8799$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008800if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008801 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008802else
Martin v. Löwis11437992002-04-12 09:54:03 +00008803 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008804LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008807
Martin v. Löwiseba40652007-08-30 20:10:57 +00008808/* Override any GCC internal prototype to avoid an error.
8809 Use char because int might match the return type of a GCC
8810 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008811#ifdef __cplusplus
8812extern "C"
8813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008814char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008815int
8816main ()
8817{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008818return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008819 ;
8820 return 0;
8821}
8822_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008823if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008824 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008825else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008826 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008827fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008828rm -f core conftest.err conftest.$ac_objext \
8829 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008830LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008831fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8833$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008834if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008835 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008836
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008837 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008838 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008839 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008840else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008841
Martin v. Löwis130fb172001-07-19 11:00:41 +00008842 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008843fi
8844
Guido van Rossum627b2d71993-12-24 10:39:16 +00008845
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008846fi
8847
Guido van Rossum0be3e491997-05-22 20:33:33 +00008848fi
8849
Guido van Rossum49545951997-12-02 19:28:29 +00008850fi
8851
Guido van Rossumb93a8621998-05-07 13:27:32 +00008852fi
8853
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008854
Michael W. Hudson54241132001-12-07 15:38:26 +00008855fi
8856
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008857
8858fi
8859
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008860fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008861rm -f core conftest.err conftest.$ac_objext \
8862 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008863fi
8864
Martin v. Löwis11437992002-04-12 09:54:03 +00008865fi
8866
8867
8868fi
8869
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008870
Michael W. Hudson54241132001-12-07 15:38:26 +00008871
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8873$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008874if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008875 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008876else
Martin v. Löwis11437992002-04-12 09:54:03 +00008877 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008878LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008881
Martin v. Löwiseba40652007-08-30 20:10:57 +00008882/* Override any GCC internal prototype to avoid an error.
8883 Use char because int might match the return type of a GCC
8884 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008885#ifdef __cplusplus
8886extern "C"
8887#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008888char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008889int
8890main ()
8891{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008892return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008893 ;
8894 return 0;
8895}
8896_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008897if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008898 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008899else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008900 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008901fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008902rm -f core conftest.err conftest.$ac_objext \
8903 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008904LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8907$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008908if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008909 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008910
Martin v. Löwis130fb172001-07-19 11:00:41 +00008911 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008912 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008913 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008914fi
8915
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008916
Neal Norwitza978ab02002-11-02 16:58:05 +00008917 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8919$as_echo_n "checking for thr_create in -lthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008920if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008921 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008922else
Martin v. Löwis11437992002-04-12 09:54:03 +00008923 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008924LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008927
Martin v. Löwiseba40652007-08-30 20:10:57 +00008928/* Override any GCC internal prototype to avoid an error.
8929 Use char because int might match the return type of a GCC
8930 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008931#ifdef __cplusplus
8932extern "C"
8933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008934char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008935int
8936main ()
8937{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008938return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008939 ;
8940 return 0;
8941}
8942_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008943if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008944 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008945else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008946 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008947fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008948rm -f core conftest.err conftest.$ac_objext \
8949 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008950LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008951fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8953$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008954if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008955 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008956
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008957 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008958 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008959 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008960fi
8961
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008962 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008963
Martin v. Löwis130fb172001-07-19 11:00:41 +00008964 if test "$USE_THREAD_MODULE" != "#"
8965 then
8966 # If the above checks didn't disable threads, (at least) OSF1
8967 # needs this '-threads' argument during linking.
8968 case $ac_sys_system in
8969 OSF1) LDLAST=-threads;;
8970 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008971 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008972fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008973
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008974if test "$posix_threads" = "yes"; then
8975 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008977$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008978
8979 fi
8980
8981 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8982 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02008983 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008984$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008985
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008986 ;;
8987 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008988$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008989
8990 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02008991 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008992$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00008993
8994 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008995 esac
8996
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8998$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008999 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009000 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009001else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009002 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009003 ac_cv_pthread_system_supported=no
9004else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009006/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009007#include <pthread.h>
9008 void *foo(void *parm) {
9009 return NULL;
9010 }
9011 main() {
9012 pthread_attr_t attr;
9013 pthread_t id;
9014 if (pthread_attr_init(&attr)) exit(-1);
9015 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9016 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9017 exit(0);
9018 }
9019_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009020if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009021 ac_cv_pthread_system_supported=yes
9022else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009023 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009024fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9026 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009027fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009028
Martin v. Löwiseba40652007-08-30 20:10:57 +00009029
Guido van Rossum627b2d71993-12-24 10:39:16 +00009030fi
9031
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9033$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009034 if test "$ac_cv_pthread_system_supported" = "yes"; then
9035
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009036$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009037
9038 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009039 for ac_func in pthread_sigmask
9040do :
9041 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Charles-François Natali97781b02011-07-22 23:43:42 +02009042if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009043 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009044#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009045_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009046 case $ac_sys_system in
9047 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009048
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009049$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009050
9051 ;;
9052 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009053fi
9054done
9055
9056fi
9057
9058
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009059# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009060
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9062$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009063# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009064if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009065 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9068$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009069 ipv6=no
9070 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009071 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9072$as_echo "yes" >&6; }
9073 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009074
9075 ipv6=yes
9076 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009077 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009078else
Martin v. Löwis11437992002-04-12 09:54:03 +00009079
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009080 if test "$cross_compiling" = yes; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009081
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9083$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009084 ipv6=no
9085
9086else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009088/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009089 /* AF_INET6 available check */
9090#include <sys/types.h>
9091#include <sys/socket.h>
9092main()
9093{
9094 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9095 exit(1);
9096 else
9097 exit(0);
9098}
9099
Martin v. Löwis11437992002-04-12 09:54:03 +00009100_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009101if ac_fn_c_try_run "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009102
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9104$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009105 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009106
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009107else
Matthias Klosec511b472010-05-08 11:01:39 +00009108
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9110$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009111 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009112
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009113fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9115 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009116fi
9117
Martin v. Löwiseba40652007-08-30 20:10:57 +00009118
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009119if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9121$as_echo_n "checking if RFC2553 API is available... " >&6; }
9122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009123/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009124
9125 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009126#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009127int
9128main ()
9129{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009130struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009131 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009132 ;
9133 return 0;
9134}
Matthias Klosec511b472010-05-08 11:01:39 +00009135
Martin v. Löwis11437992002-04-12 09:54:03 +00009136_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009137if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009138
9139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009140$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009141 ipv6=yes
9142
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009143else
Matthias Klosec511b472010-05-08 11:01:39 +00009144
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009146$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009147 ipv6=no
9148
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009151fi
9152
9153if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009154 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009155
9156fi
9157
Martin v. Löwiseba40652007-08-30 20:10:57 +00009158fi
9159
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009160
9161ipv6type=unknown
9162ipv6lib=none
9163ipv6trylibc=no
9164
9165if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9167$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009168 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9169 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009170 case $i in
9171 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009173/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009174
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009175#include <netinet/in.h>
9176#ifdef IPV6_INRIA_VERSION
9177yes
9178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009179_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009180if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009181 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009182 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009183fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009184rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009185
9186 ;;
9187 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009189/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009190
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009191#include <netinet/in.h>
9192#ifdef __KAME__
9193yes
9194#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009195_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009196if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009197 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009198 ipv6type=$i;
9199 ipv6lib=inet6
9200 ipv6libdir=/usr/local/v6/lib
9201 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009202fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009203rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009204
9205 ;;
9206 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009208/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009209
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009210#include <features.h>
9211#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9212yes
9213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009214_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009216 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009217 ipv6type=$i;
9218 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009219fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009220rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009221
9222 ;;
9223 linux-inet6)
9224 if test -d /usr/inet6; then
9225 ipv6type=$i
9226 ipv6lib=inet6
9227 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009228 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009229 fi
9230 ;;
9231 solaris)
9232 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009233 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009234 ipv6type=$i
9235 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009236 fi
9237 fi
9238 ;;
9239 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009241/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009242
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009243#include <sys/param.h>
9244#ifdef _TOSHIBA_INET6
9245yes
9246#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009247_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009248if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009249 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009250 ipv6type=$i;
9251 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009252 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009253fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009254rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009255
9256 ;;
9257 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009259/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009260
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009261#include </usr/local/v6/include/sys/v6config.h>
9262#ifdef __V6D__
9263yes
9264#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009265_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009266if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009267 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009268 ipv6type=$i;
9269 ipv6lib=v6;
9270 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009271 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009272fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009273rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009274
9275 ;;
9276 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009278/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009279
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009280#include <sys/param.h>
9281#ifdef _ZETA_MINAMI_INET6
9282yes
9283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009284_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009286 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009287 ipv6type=$i;
9288 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009289 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009290fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009291rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009292
9293 ;;
9294 esac
9295 if test "$ipv6type" != "unknown"; then
9296 break
9297 fi
9298 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9300$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009301fi
9302
9303if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9304 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9305 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9306 echo "using lib$ipv6lib"
9307 else
9308 if test $ipv6trylibc = "yes"; then
9309 echo "using libc"
9310 else
9311 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9312 echo "You need to fetch lib$ipv6lib.a from appropriate"
9313 echo 'ipv6 kit and compile beforehand.'
9314 exit 1
9315 fi
9316 fi
9317fi
9318
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9320$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009322/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009323
9324 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009325int
9326main ()
9327{
9328FSIORefNum fRef = 0
9329 ;
9330 return 0;
9331}
Mark Dickinson0712b562010-05-08 19:13:21 +00009332
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009333_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009334if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009335
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009336
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009337$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009338
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9340$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009341
Mark Dickinson0712b562010-05-08 19:13:21 +00009342else
9343
9344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9345$as_echo "no" >&6; }
9346
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009347fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9349
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009350# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9352$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009353
Martin v. Löwiseba40652007-08-30 20:10:57 +00009354# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009355if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009356 withval=$with_doc_strings;
9357fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009358
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009359
9360if test -z "$with_doc_strings"
9361then with_doc_strings="yes"
9362fi
9363if test "$with_doc_strings" != "no"
9364then
9365
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009366$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009367
9368fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9370$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009371
Neil Schemenauera35c6882001-02-27 04:45:05 +00009372# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9374$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009375
Martin v. Löwiseba40652007-08-30 20:10:57 +00009376# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009377if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009378 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009379if test "$withval" != no
9380then
9381
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009382$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009383
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9385$as_echo "yes" >&6; }
9386else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9387$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009388fi
9389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9391$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009392fi
9393
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009394
9395# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9397$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009398
Martin v. Löwiseba40652007-08-30 20:10:57 +00009399# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009400if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009401 withval=$with_pymalloc;
9402fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009403
Neil Schemenauera35c6882001-02-27 04:45:05 +00009404
Neil Schemenauer16c22972002-03-22 15:34:49 +00009405if test -z "$with_pymalloc"
9406then with_pymalloc="yes"
9407fi
9408if test "$with_pymalloc" != "no"
9409then
Martin v. Löwis11437992002-04-12 09:54:03 +00009410
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009411$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009412
9413fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9415$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009416
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009417# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9419$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009420
9421# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009422if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009423 withval=$with_valgrind;
9424else
9425 with_valgrind=no
9426fi
9427
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9429$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009430if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009431 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 +02009432if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009433
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009434$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009435
9436else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009437 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009438
9439fi
9440
9441
9442fi
9443
Barry Warsawef82cd72000-06-30 16:21:01 +00009444# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9446$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009447
Martin v. Löwiseba40652007-08-30 20:10:57 +00009448# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009449if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009450 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009451if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009452then
9453
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009454$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009455
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9457$as_echo "yes" >&6; }
9458else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9459$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009460fi
9461else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9463$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009464fi
9465
Barry Warsawef82cd72000-06-30 16:21:01 +00009466
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009467# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009468
Guido van Rossum98935bf2001-09-05 19:13:16 +00009469DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009470
Guido van Rossume97ee181999-12-20 21:27:22 +00009471# the dlopen() function means we might want to use dynload_shlib.o. some
9472# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009473for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009474do :
9475 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Charles-François Natali97781b02011-07-22 23:43:42 +02009476if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009478#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009479_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009480
Guido van Rossume97ee181999-12-20 21:27:22 +00009481fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009482done
Guido van Rossume97ee181999-12-20 21:27:22 +00009483
Michael W. Hudson54241132001-12-07 15:38:26 +00009484
Guido van Rossume97ee181999-12-20 21:27:22 +00009485# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9486# loading of modules.
9487
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9489$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009490if test -z "$DYNLOADFILE"
9491then
9492 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009493 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9494 if test "$ac_cv_func_dlopen" = yes
9495 then DYNLOADFILE="dynload_shlib.o"
9496 else DYNLOADFILE="dynload_aix.o"
9497 fi
9498 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009499 BeOS*) DYNLOADFILE="dynload_beos.o";;
9500 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009501 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9502 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009503 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009504 *)
9505 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9506 # out any dynamic loading
9507 if test "$ac_cv_func_dlopen" = yes
9508 then DYNLOADFILE="dynload_shlib.o"
9509 else DYNLOADFILE="dynload_stub.o"
9510 fi
9511 ;;
9512 esac
9513fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9515$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009516if test "$DYNLOADFILE" != "dynload_stub.o"
9517then
Martin v. Löwis11437992002-04-12 09:54:03 +00009518
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009519$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009520
9521fi
9522
Neil Schemenauer4e425612001-06-19 15:44:15 +00009523# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9524
Michael W. Hudson54241132001-12-07 15:38:26 +00009525
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9527$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009528if test -z "$MACHDEP_OBJS"
9529then
Jack Jansene578a632001-08-15 01:27:14 +00009530 MACHDEP_OBJS=$extra_machdep_objs
9531else
9532 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009533fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9535$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009536
Guido van Rossum627b2d71993-12-24 10:39:16 +00009537# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009538for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9539 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009540 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009541 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009542 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009543 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009544 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009545 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9546 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009547 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009548 setlocale setregid setreuid setresuid setresgid \
9549 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009550 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009551 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009552 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009553do :
9554 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9555ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009556if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009557 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009558#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009559_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009560
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009561fi
9562done
9563
Michael W. Hudson54241132001-12-07 15:38:26 +00009564
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009565# For some functions, having a definition is not sufficient, since
9566# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9568$as_echo_n "checking for chroot... " >&6; }
9569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009570/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009571#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009572int
9573main ()
9574{
9575void *x=chroot
9576 ;
9577 return 0;
9578}
9579_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009580if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009581
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009582$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009583
Matthias Klosec511b472010-05-08 11:01:39 +00009584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009585$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009586else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9588$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009589
9590fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9593$as_echo_n "checking for link... " >&6; }
9594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009595/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009596#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009597int
9598main ()
9599{
9600void *x=link
9601 ;
9602 return 0;
9603}
9604_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009605if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009606
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009607$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009608
Matthias Klosec511b472010-05-08 11:01:39 +00009609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009610$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009611else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9613$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009614
9615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9618$as_echo_n "checking for symlink... " >&6; }
9619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009620/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009621#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009622int
9623main ()
9624{
9625void *x=symlink
9626 ;
9627 return 0;
9628}
9629_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009630if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009631
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009632$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009633
Matthias Klosec511b472010-05-08 11:01:39 +00009634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009635$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9638$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009639
9640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9643$as_echo_n "checking for fchdir... " >&6; }
9644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009645/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009646#include <unistd.h>
9647int
9648main ()
9649{
9650void *x=fchdir
9651 ;
9652 return 0;
9653}
9654_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009655if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009656
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009657$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009658
Matthias Klosec511b472010-05-08 11:01:39 +00009659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009660$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009661else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9663$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009664
9665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9668$as_echo_n "checking for fsync... " >&6; }
9669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009670/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009671#include <unistd.h>
9672int
9673main ()
9674{
9675void *x=fsync
9676 ;
9677 return 0;
9678}
9679_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009680if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009681
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009682$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009683
Matthias Klosec511b472010-05-08 11:01:39 +00009684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009685$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009686else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9688$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009689
9690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9693$as_echo_n "checking for fdatasync... " >&6; }
9694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009695/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009696#include <unistd.h>
9697int
9698main ()
9699{
9700void *x=fdatasync
9701 ;
9702 return 0;
9703}
9704_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009705if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009706
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009707$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009708
Matthias Klosec511b472010-05-08 11:01:39 +00009709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009710$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009711else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9713$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009714
9715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9718$as_echo_n "checking for epoll... " >&6; }
9719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009720/* end confdefs.h. */
9721#include <sys/epoll.h>
9722int
9723main ()
9724{
9725void *x=epoll_create
9726 ;
9727 return 0;
9728}
9729_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009730if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009731
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009732$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009733
Matthias Klosec511b472010-05-08 11:01:39 +00009734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009735$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009736else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9738$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009739
9740fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9743$as_echo_n "checking for kqueue... " >&6; }
9744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009745/* end confdefs.h. */
9746
9747#include <sys/types.h>
9748#include <sys/event.h>
9749
9750int
9751main ()
9752{
9753int x=kqueue()
9754 ;
9755 return 0;
9756}
9757_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009758if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009759
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009760$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009761
Matthias Klosec511b472010-05-08 11:01:39 +00009762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009763$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009764else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9766$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009767
9768fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009770# On some systems (eg. FreeBSD 5), we would find a definition of the
9771# functions ctermid_r, setgroups in the library, but no prototype
9772# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9773# address to avoid compiler warnings and potential miscompilations
9774# because of the missing prototypes.
9775
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9777$as_echo_n "checking for ctermid_r... " >&6; }
9778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009779/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009780
Martin v. Löwisd5843682002-11-21 20:41:28 +00009781#include <stdio.h>
9782
Martin v. Löwisd5843682002-11-21 20:41:28 +00009783int
9784main ()
9785{
9786void* p = ctermid_r
9787 ;
9788 return 0;
9789}
9790_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009791if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009792
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009793$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009794
Matthias Klosec511b472010-05-08 11:01:39 +00009795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009796$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9799$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009800
9801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9803
Antoine Pitroub170f172010-09-10 18:47:36 +00009804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9805$as_echo_n "checking for flock declaration... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009806if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009807 $as_echo_n "(cached) " >&6
9808else
9809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009810/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009811#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009812int
9813main ()
9814{
9815void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +00009816
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009817 ;
9818 return 0;
9819}
9820_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009821if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009822 ac_cv_flock_decl=yes
9823else
9824 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009825
9826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +00009828
Antoine Pitroub170f172010-09-10 18:47:36 +00009829fi
9830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9831$as_echo "$ac_cv_flock_decl" >&6; }
9832if test "x${ac_cv_flock_decl}" = xyes; then
9833 for ac_func in flock
9834do :
9835 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Charles-François Natali97781b02011-07-22 23:43:42 +02009836if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009837 cat >>confdefs.h <<_ACEOF
9838#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +00009839_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +00009840
Antoine Pitrou85729812010-09-07 14:55:24 +00009841else
Antoine Pitroub170f172010-09-10 18:47:36 +00009842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +00009843$as_echo_n "checking for flock in -lbsd... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009844if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitrou85729812010-09-07 14:55:24 +00009845 $as_echo_n "(cached) " >&6
9846else
9847 ac_check_lib_save_LIBS=$LIBS
9848LIBS="-lbsd $LIBS"
9849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9850/* end confdefs.h. */
9851
9852/* Override any GCC internal prototype to avoid an error.
9853 Use char because int might match the return type of a GCC
9854 builtin and then its argument prototype would still apply. */
9855#ifdef __cplusplus
9856extern "C"
9857#endif
9858char flock ();
9859int
9860main ()
9861{
9862return flock ();
9863 ;
9864 return 0;
9865}
9866_ACEOF
9867if ac_fn_c_try_link "$LINENO"; then :
9868 ac_cv_lib_bsd_flock=yes
9869else
9870 ac_cv_lib_bsd_flock=no
9871fi
9872rm -f core conftest.err conftest.$ac_objext \
9873 conftest$ac_exeext conftest.$ac_ext
9874LIBS=$ac_check_lib_save_LIBS
9875fi
9876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9877$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009878if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009879 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +00009880
9881
9882$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9883
9884
9885fi
9886
9887
9888fi
Antoine Pitroub170f172010-09-10 18:47:36 +00009889done
9890
Antoine Pitrou85729812010-09-07 14:55:24 +00009891fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009892
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9894$as_echo_n "checking for getpagesize... " >&6; }
9895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009896/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009897
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009898#include <unistd.h>
9899
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009900int
9901main ()
9902{
9903void* p = getpagesize
9904 ;
9905 return 0;
9906}
9907_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009908if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009909
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009910$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009911
Matthias Klosec511b472010-05-08 11:01:39 +00009912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009913$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009914else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9916$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009917
9918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009920
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009921for ac_prog in true
9922do
9923 # Extract the first word of "$ac_prog", so it can be a program name with args.
9924set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9926$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009927if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009928 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009929else
9930 if test -n "$TRUE"; then
9931 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9932else
9933as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9934for as_dir in $PATH
9935do
9936 IFS=$as_save_IFS
9937 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009938 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00009939 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 +00009940 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009941 $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 +00009942 break 2
9943 fi
9944done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009945 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00009946IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009947
9948fi
9949fi
9950TRUE=$ac_cv_prog_TRUE
9951if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9953$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009954else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9956$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009957fi
9958
Martin v. Löwiseba40652007-08-30 20:10:57 +00009959
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009960 test -n "$TRUE" && break
9961done
9962test -n "$TRUE" || TRUE="/bin/true"
9963
9964
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9966$as_echo_n "checking for inet_aton in -lc... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009967if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009968 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009969else
9970 ac_check_lib_save_LIBS=$LIBS
9971LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009973/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009974
Martin v. Löwiseba40652007-08-30 20:10:57 +00009975/* Override any GCC internal prototype to avoid an error.
9976 Use char because int might match the return type of a GCC
9977 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009978#ifdef __cplusplus
9979extern "C"
9980#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009981char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009982int
9983main ()
9984{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009985return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009986 ;
9987 return 0;
9988}
9989_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009990if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009991 ac_cv_lib_c_inet_aton=yes
9992else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009993 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009994fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009995rm -f core conftest.err conftest.$ac_objext \
9996 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009997LIBS=$ac_check_lib_save_LIBS
9998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10000$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010001if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010002 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10005$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010006if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010007 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010008else
10009 ac_check_lib_save_LIBS=$LIBS
10010LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010012/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010013
Martin v. Löwiseba40652007-08-30 20:10:57 +000010014/* Override any GCC internal prototype to avoid an error.
10015 Use char because int might match the return type of a GCC
10016 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010017#ifdef __cplusplus
10018extern "C"
10019#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010020char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010021int
10022main ()
10023{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010024return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010025 ;
10026 return 0;
10027}
10028_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010029if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010030 ac_cv_lib_resolv_inet_aton=yes
10031else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010032 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010033fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010034rm -f core conftest.err conftest.$ac_objext \
10035 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010036LIBS=$ac_check_lib_save_LIBS
10037fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10039$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010040if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010041 cat >>confdefs.h <<_ACEOF
10042#define HAVE_LIBRESOLV 1
10043_ACEOF
10044
10045 LIBS="-lresolv $LIBS"
10046
10047fi
10048
10049
10050fi
10051
10052
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010053# On Tru64, chflags seems to be present, but calling it will
10054# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10056$as_echo_n "checking for chflags... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010057if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010058 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010060 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010061 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010062else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010064/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010065
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010066#include <sys/stat.h>
10067#include <unistd.h>
10068int main(int argc, char*argv[])
10069{
10070 if(chflags(argv[0], 0) != 0)
10071 return 1;
10072 return 0;
10073}
Ned Deily43e10542011-06-27 23:41:53 -070010074
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010075_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010076if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010077 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010079 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010080fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10082 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010083fi
10084
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010085
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010086fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10088$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010089if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010090 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Charles-François Natali97781b02011-07-22 23:43:42 +020010091if test "x$ac_cv_func_chflags" = x""yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010092 ac_cv_have_chflags="yes"
10093else
10094 ac_cv_have_chflags="no"
10095fi
10096
10097fi
10098if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010099
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010100$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010101
10102fi
10103
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10105$as_echo_n "checking for lchflags... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010106if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010107 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010109 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010110 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010111else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010113/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010114
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010115#include <sys/stat.h>
10116#include <unistd.h>
10117int main(int argc, char*argv[])
10118{
10119 if(lchflags(argv[0], 0) != 0)
10120 return 1;
10121 return 0;
10122}
Ned Deily43e10542011-06-27 23:41:53 -070010123
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010124_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010125if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010126 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010127else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010128 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010129fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10131 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010132fi
10133
10134
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010135fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10137$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010138if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010139 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Charles-François Natali97781b02011-07-22 23:43:42 +020010140if test "x$ac_cv_func_lchflags" = x""yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010141 ac_cv_have_lchflags="yes"
10142else
10143 ac_cv_have_lchflags="no"
10144fi
10145
10146fi
10147if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010148
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010149$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010150
10151fi
10152
Ronald Oussorenf8752642006-07-06 10:13:35 +000010153case $ac_sys_system/$ac_sys_release in
10154Darwin/*)
10155 _CUR_CFLAGS="${CFLAGS}"
10156 _CUR_LDFLAGS="${LDFLAGS}"
10157 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10158 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10159 ;;
10160esac
10161
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10163$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010164if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010165 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010166else
10167 ac_check_lib_save_LIBS=$LIBS
10168LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010170/* end confdefs.h. */
10171
Martin v. Löwiseba40652007-08-30 20:10:57 +000010172/* Override any GCC internal prototype to avoid an error.
10173 Use char because int might match the return type of a GCC
10174 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010175#ifdef __cplusplus
10176extern "C"
10177#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010178char inflateCopy ();
10179int
10180main ()
10181{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010182return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010183 ;
10184 return 0;
10185}
10186_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010187if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010188 ac_cv_lib_z_inflateCopy=yes
10189else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010190 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010191fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010192rm -f core conftest.err conftest.$ac_objext \
10193 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010194LIBS=$ac_check_lib_save_LIBS
10195fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10197$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010198if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010199
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010200$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010201
10202fi
10203
10204
Ronald Oussorenf8752642006-07-06 10:13:35 +000010205case $ac_sys_system/$ac_sys_release in
10206Darwin/*)
10207 CFLAGS="${_CUR_CFLAGS}"
10208 LDFLAGS="${_CUR_LDFLAGS}"
10209 ;;
10210esac
10211
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10213$as_echo_n "checking for hstrerror... " >&6; }
10214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010215/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010216
Martin v. Löwise9416172003-05-03 10:12:45 +000010217#include <netdb.h>
10218
Martin v. Löwise9416172003-05-03 10:12:45 +000010219int
10220main ()
10221{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010222void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010223 ;
10224 return 0;
10225}
10226_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010227if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010228
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010229$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010230
Matthias Klosec511b472010-05-08 11:01:39 +000010231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010232$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010233else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10235$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010236
10237fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010238rm -f core conftest.err conftest.$ac_objext \
10239 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010240
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10242$as_echo_n "checking for inet_aton... " >&6; }
10243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010244/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010245
Martin v. Löwis86d66262006-02-17 08:40:11 +000010246#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010247#include <sys/socket.h>
10248#include <netinet/in.h>
10249#include <arpa/inet.h>
10250
Martin v. Löwise9416172003-05-03 10:12:45 +000010251int
10252main ()
10253{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010254void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010255 ;
10256 return 0;
10257}
10258_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010259if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010260
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010261$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010262
Matthias Klosec511b472010-05-08 11:01:39 +000010263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010264$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010265else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10267$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010268
10269fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010270rm -f core conftest.err conftest.$ac_objext \
10271 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010272
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10274$as_echo_n "checking for inet_pton... " >&6; }
10275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010276/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010277
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010278#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010279#include <sys/socket.h>
10280#include <netinet/in.h>
10281#include <arpa/inet.h>
10282
Martin v. Löwise9416172003-05-03 10:12:45 +000010283int
10284main ()
10285{
10286void* p = inet_pton
10287 ;
10288 return 0;
10289}
10290_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010291if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010292
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010293$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010294
Matthias Klosec511b472010-05-08 11:01:39 +000010295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010296$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010297else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10299$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010300
10301fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010303
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010304# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10306$as_echo_n "checking for setgroups... " >&6; }
10307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010308/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010309
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010310#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010311#ifdef HAVE_GRP_H
10312#include <grp.h>
10313#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010314
Martin v. Löwisd5843682002-11-21 20:41:28 +000010315int
10316main ()
10317{
10318void* p = setgroups
10319 ;
10320 return 0;
10321}
10322_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010323if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010324
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010325$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010326
Matthias Klosec511b472010-05-08 11:01:39 +000010327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010328$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010329else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10331$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010332
10333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010335
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010336# check for openpty and forkpty
10337
10338for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010339do :
10340 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Charles-François Natali97781b02011-07-22 23:43:42 +020010341if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010342 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010343#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010344_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010345
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010346else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10348$as_echo_n "checking for openpty in -lutil... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010349if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010350 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010351else
Martin v. Löwis11437992002-04-12 09:54:03 +000010352 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010353LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010355/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010356
Martin v. Löwiseba40652007-08-30 20:10:57 +000010357/* Override any GCC internal prototype to avoid an error.
10358 Use char because int might match the return type of a GCC
10359 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010360#ifdef __cplusplus
10361extern "C"
10362#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010363char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010364int
10365main ()
10366{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010367return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010368 ;
10369 return 0;
10370}
10371_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010372if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010373 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010374else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010375 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010376fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010377rm -f core conftest.err conftest.$ac_objext \
10378 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010379LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010380fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10382$as_echo "$ac_cv_lib_util_openpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010383if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010384 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010385 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010386else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10388$as_echo_n "checking for openpty in -lbsd... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010389if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010390 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010391else
10392 ac_check_lib_save_LIBS=$LIBS
10393LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010395/* end confdefs.h. */
10396
Martin v. Löwiseba40652007-08-30 20:10:57 +000010397/* Override any GCC internal prototype to avoid an error.
10398 Use char because int might match the return type of a GCC
10399 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010400#ifdef __cplusplus
10401extern "C"
10402#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010403char openpty ();
10404int
10405main ()
10406{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010407return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010408 ;
10409 return 0;
10410}
10411_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010412if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010413 ac_cv_lib_bsd_openpty=yes
10414else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010415 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010416fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010417rm -f core conftest.err conftest.$ac_objext \
10418 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010419LIBS=$ac_check_lib_save_LIBS
10420fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10422$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010423if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010424 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010425 LIBS="$LIBS -lbsd"
10426fi
10427
10428
10429fi
10430
Fred Drake8cef4cf2000-06-28 16:40:38 +000010431
10432fi
10433done
10434
10435for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010436do :
10437 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Charles-François Natali97781b02011-07-22 23:43:42 +020010438if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010439 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010440#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010441_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010442
Fred Drake8cef4cf2000-06-28 16:40:38 +000010443else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10445$as_echo_n "checking for forkpty in -lutil... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010446if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010447 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010448else
Martin v. Löwis11437992002-04-12 09:54:03 +000010449 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010450LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010453
Martin v. Löwiseba40652007-08-30 20:10:57 +000010454/* Override any GCC internal prototype to avoid an error.
10455 Use char because int might match the return type of a GCC
10456 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010457#ifdef __cplusplus
10458extern "C"
10459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010460char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010461int
10462main ()
10463{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010464return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010465 ;
10466 return 0;
10467}
10468_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010469if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010470 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010471else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010472 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010473fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010474rm -f core conftest.err conftest.$ac_objext \
10475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010476LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010477fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10479$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010480if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010481 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010482 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010483else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10485$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010486if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010487 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010488else
10489 ac_check_lib_save_LIBS=$LIBS
10490LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010492/* end confdefs.h. */
10493
Martin v. Löwiseba40652007-08-30 20:10:57 +000010494/* Override any GCC internal prototype to avoid an error.
10495 Use char because int might match the return type of a GCC
10496 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010497#ifdef __cplusplus
10498extern "C"
10499#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010500char forkpty ();
10501int
10502main ()
10503{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010504return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010505 ;
10506 return 0;
10507}
10508_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010509if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010510 ac_cv_lib_bsd_forkpty=yes
10511else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010512 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010513fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010514rm -f core conftest.err conftest.$ac_objext \
10515 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010516LIBS=$ac_check_lib_save_LIBS
10517fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10519$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010520if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010521 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010522 LIBS="$LIBS -lbsd"
10523fi
10524
10525
10526fi
10527
Fred Drake8cef4cf2000-06-28 16:40:38 +000010528
10529fi
10530done
10531
Jack Jansendd19cf82001-12-06 22:36:17 +000010532
Brett Cannonaa5778d2008-03-18 04:09:00 +000010533# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010534for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010535do :
10536 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Charles-François Natali97781b02011-07-22 23:43:42 +020010537if test "x$ac_cv_func_memmove" = x""yes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010538 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010539#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010540_ACEOF
10541
10542fi
10543done
10544
10545
Michael W. Hudson54241132001-12-07 15:38:26 +000010546# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010547for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010548do :
10549 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10550ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010551if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010552 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010553#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010554_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010555
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010556fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010557done
10558
Michael W. Hudson54241132001-12-07 15:38:26 +000010559
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010560ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Charles-François Natali97781b02011-07-22 23:43:42 +020010561if test "x$ac_cv_func_dup2" = x""yes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010562 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010563
Martin v. Löwis1142de32002-03-29 16:28:31 +000010564else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010565 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010566 *" dup2.$ac_objext "* ) ;;
10567 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000010568 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010569esac
10570
Martin v. Löwis1142de32002-03-29 16:28:31 +000010571fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010572
10573ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Charles-François Natali97781b02011-07-22 23:43:42 +020010574if test "x$ac_cv_func_getcwd" = x""yes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010575 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10576
10577else
10578 case " $LIBOBJS " in
10579 *" getcwd.$ac_objext "* ) ;;
10580 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10581 ;;
10582esac
10583
10584fi
10585
10586ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Charles-François Natali97781b02011-07-22 23:43:42 +020010587if test "x$ac_cv_func_strdup" = x""yes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010588 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10589
10590else
10591 case " $LIBOBJS " in
10592 *" strdup.$ac_objext "* ) ;;
10593 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10594 ;;
10595esac
10596
10597fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010598
10599
10600for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010601do :
10602 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Charles-François Natali97781b02011-07-22 23:43:42 +020010603if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010604 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010605#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010606_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010608/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010609#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010610int
10611main ()
10612{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010613getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010614 ;
10615 return 0;
10616}
10617_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010618if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010619
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010620$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010621
Guido van Rossum627b2d71993-12-24 10:39:16 +000010622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010624
Guido van Rossum627b2d71993-12-24 10:39:16 +000010625fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010626done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010627
Jack Jansen150753c2003-03-29 22:07:47 +000010628for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010629do :
10630 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Charles-François Natali97781b02011-07-22 23:43:42 +020010631if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010632 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010633#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010634_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010636/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010637#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010638int
10639main ()
10640{
10641setpgrp(0,0);
10642 ;
10643 return 0;
10644}
10645_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010646if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010647
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010648$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010649
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010652
10653fi
10654done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010655
Thomas Wouters3a584202000-08-05 23:28:51 +000010656for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010657do :
10658 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Charles-François Natali97781b02011-07-22 23:43:42 +020010659if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010660 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010661#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010662_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010664/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010665#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010666int
10667main ()
10668{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010669gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010670 ;
10671 return 0;
10672}
10673_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010674if ac_fn_c_try_compile "$LINENO"; then :
10675
Guido van Rossum627b2d71993-12-24 10:39:16 +000010676else
Skip Montanaro6dead952003-09-25 14:50:04 +000010677
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010678$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010679
Martin v. Löwis11437992002-04-12 09:54:03 +000010680
Guido van Rossum627b2d71993-12-24 10:39:16 +000010681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010683
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010684fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010685done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010686
Michael W. Hudson54241132001-12-07 15:38:26 +000010687
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10689$as_echo_n "checking for major... " >&6; }
10690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010691/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010692
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010693#if defined(MAJOR_IN_MKDEV)
10694#include <sys/mkdev.h>
10695#elif defined(MAJOR_IN_SYSMACROS)
10696#include <sys/sysmacros.h>
10697#else
10698#include <sys/types.h>
10699#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010700
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010701int
10702main ()
10703{
10704
10705 makedev(major(0),minor(0));
10706
10707 ;
10708 return 0;
10709}
10710_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010711if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010712
10713
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010714$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010715
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10717$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010718
10719else
Skip Montanaro6dead952003-09-25 14:50:04 +000010720
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10722$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010723
10724fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010725rm -f core conftest.err conftest.$ac_objext \
10726 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010727
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010728# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010729# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10731$as_echo_n "checking for getaddrinfo... " >&6; }
10732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010733/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010734
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010735#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010736#include <sys/socket.h>
10737#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010738#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010739
Martin v. Löwis11437992002-04-12 09:54:03 +000010740int
10741main ()
10742{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010743getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010744 ;
10745 return 0;
10746}
10747_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010748if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010749 have_getaddrinfo=yes
10750else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010751 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010752fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010753rm -f core conftest.err conftest.$ac_objext \
10754 conftest$ac_exeext conftest.$ac_ext
10755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10756$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010757if test $have_getaddrinfo = yes
10758then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10760$as_echo_n "checking getaddrinfo bug... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010761 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010762 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010763else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010764 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010765 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010766else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010768/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010769
10770#include <sys/types.h>
10771#include <netdb.h>
10772#include <string.h>
10773#include <sys/socket.h>
10774#include <netinet/in.h>
10775
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010776int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010777{
10778 int passive, gaierr, inet4 = 0, inet6 = 0;
10779 struct addrinfo hints, *ai, *aitop;
10780 char straddr[INET6_ADDRSTRLEN], strport[16];
10781
10782 for (passive = 0; passive <= 1; passive++) {
10783 memset(&hints, 0, sizeof(hints));
10784 hints.ai_family = AF_UNSPEC;
10785 hints.ai_flags = passive ? AI_PASSIVE : 0;
10786 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010787 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010788 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10789 (void)gai_strerror(gaierr);
10790 goto bad;
10791 }
10792 for (ai = aitop; ai; ai = ai->ai_next) {
10793 if (ai->ai_addr == NULL ||
10794 ai->ai_addrlen == 0 ||
10795 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10796 straddr, sizeof(straddr), strport, sizeof(strport),
10797 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10798 goto bad;
10799 }
10800 switch (ai->ai_family) {
10801 case AF_INET:
10802 if (strcmp(strport, "54321") != 0) {
10803 goto bad;
10804 }
10805 if (passive) {
10806 if (strcmp(straddr, "0.0.0.0") != 0) {
10807 goto bad;
10808 }
10809 } else {
10810 if (strcmp(straddr, "127.0.0.1") != 0) {
10811 goto bad;
10812 }
10813 }
10814 inet4++;
10815 break;
10816 case AF_INET6:
10817 if (strcmp(strport, "54321") != 0) {
10818 goto bad;
10819 }
10820 if (passive) {
10821 if (strcmp(straddr, "::") != 0) {
10822 goto bad;
10823 }
10824 } else {
10825 if (strcmp(straddr, "::1") != 0) {
10826 goto bad;
10827 }
10828 }
10829 inet6++;
10830 break;
10831 case AF_UNSPEC:
10832 goto bad;
10833 break;
10834 default:
10835 /* another family support? */
10836 break;
10837 }
10838 }
10839 }
10840
10841 if (!(inet4 == 0 || inet4 == 2))
10842 goto bad;
10843 if (!(inet6 == 0 || inet6 == 2))
10844 goto bad;
10845
10846 if (aitop)
10847 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010848 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010849
10850 bad:
10851 if (aitop)
10852 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010853 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010854}
10855
Martin v. Löwis11437992002-04-12 09:54:03 +000010856_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010857if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010858 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010860 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010861fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010862rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10863 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010865
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010866fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010867
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010869
Benjamin Peterson75fed812010-11-01 01:47:19 +000010870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10871$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10872
Mark Dickinson0ef0b912009-12-31 21:11:48 +000010873if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010874then
10875 if test $ipv6 = yes
10876 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010877 echo 'Fatal: You must get working getaddrinfo() function.'
10878 echo ' or you can specify "--disable-ipv6"'.
10879 exit 1
10880 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010881else
Martin v. Löwis11437992002-04-12 09:54:03 +000010882
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010883$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010884
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010885fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000010886
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010887for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010888do :
10889 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Charles-François Natali97781b02011-07-22 23:43:42 +020010890if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010891 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010892#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010893_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010894
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010895fi
10896done
10897
Michael W. Hudson54241132001-12-07 15:38:26 +000010898
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010899# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10901$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 +020010902if test "${ac_cv_header_time+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010903 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010906/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010907#include <sys/types.h>
10908#include <sys/time.h>
10909#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010910
Martin v. Löwis11437992002-04-12 09:54:03 +000010911int
10912main ()
10913{
10914if ((struct tm *) 0)
10915return 0;
10916 ;
10917 return 0;
10918}
10919_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010920if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010921 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010922else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010923 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010926fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10928$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010929if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010930
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010931$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010932
10933fi
10934
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10936$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 +020010937if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010938 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010939else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010941/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010942#include <sys/types.h>
10943#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010944
Martin v. Löwis11437992002-04-12 09:54:03 +000010945int
10946main ()
10947{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010948struct tm tm;
10949 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010950 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010951 ;
10952 return 0;
10953}
10954_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010955if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010956 ac_cv_struct_tm=time.h
10957else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010958 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010961fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10963$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010964if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010965
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010966$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010967
10968fi
10969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010970ac_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 +000010971#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010972
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010973"
Charles-François Natali97781b02011-07-22 23:43:42 +020010974if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010975
10976cat >>confdefs.h <<_ACEOF
10977#define HAVE_STRUCT_TM_TM_ZONE 1
10978_ACEOF
10979
10980
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010981fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010982
Martin v. Löwis11437992002-04-12 09:54:03 +000010983if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10984
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010985$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010986
10987else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010988 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10989"
Charles-François Natali97781b02011-07-22 23:43:42 +020010990if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010991 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000010992else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010993 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000010994fi
10995
Martin v. Löwiseba40652007-08-30 20:10:57 +000010996cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010997#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000010998_ACEOF
10999
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11001$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011002if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011003 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011004else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011006/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011007#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011008#if !HAVE_DECL_TZNAME
11009extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011011
Martin v. Löwis11437992002-04-12 09:54:03 +000011012int
11013main ()
11014{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011015return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011016 ;
11017 return 0;
11018}
11019_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011020if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011021 ac_cv_var_tzname=yes
11022else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011023 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011024fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011025rm -f core conftest.err conftest.$ac_objext \
11026 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011027fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11029$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011030 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011031
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011032$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011033
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011034 fi
11035fi
11036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011037ac_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 +020011038if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011039
11040cat >>confdefs.h <<_ACEOF
11041#define HAVE_STRUCT_STAT_ST_RDEV 1
11042_ACEOF
11043
11044
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011045fi
11046
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011047ac_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 +020011048if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011049
Martin v. Löwis11437992002-04-12 09:54:03 +000011050cat >>confdefs.h <<_ACEOF
11051#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11052_ACEOF
11053
11054
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011055fi
11056
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011057ac_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 +020011058if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011059
11060cat >>confdefs.h <<_ACEOF
11061#define HAVE_STRUCT_STAT_ST_FLAGS 1
11062_ACEOF
11063
11064
11065fi
11066
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011067ac_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 +020011068if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011069
11070cat >>confdefs.h <<_ACEOF
11071#define HAVE_STRUCT_STAT_ST_GEN 1
11072_ACEOF
11073
11074
11075fi
11076
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077ac_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 +020011078if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011079
11080cat >>confdefs.h <<_ACEOF
11081#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11082_ACEOF
11083
11084
11085fi
11086
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011087ac_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 +020011088if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011089
Martin v. Löwis11437992002-04-12 09:54:03 +000011090cat >>confdefs.h <<_ACEOF
11091#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11092_ACEOF
11093
11094
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011095$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011096
11097else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011098 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011099 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011100 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11101 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011102esac
11103
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011104fi
11105
Michael W. Hudson54241132001-12-07 15:38:26 +000011106
Martin v. Löwis11437992002-04-12 09:54:03 +000011107
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11109$as_echo_n "checking for time.h that defines altzone... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011110if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011111 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011112else
Matthias Klosec511b472010-05-08 11:01:39 +000011113
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011115/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011116#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011117int
11118main ()
11119{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011120return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011121 ;
11122 return 0;
11123}
11124_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011125if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011126 ac_cv_header_time_altzone=yes
11127else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011128 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011131
Martin v. Löwiseba40652007-08-30 20:10:57 +000011132fi
11133
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11135$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011136if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011137
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011138$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011139
11140fi
11141
Guido van Rossumda88dad1995-01-26 00:46:29 +000011142was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11144$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011146/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011147
11148#include <sys/types.h>
11149#include <sys/select.h>
11150#include <sys/time.h>
11151
Martin v. Löwis11437992002-04-12 09:54:03 +000011152int
11153main ()
11154{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011155;
Martin v. Löwis11437992002-04-12 09:54:03 +000011156 ;
11157 return 0;
11158}
11159_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011160if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011161
11162
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011163$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011164
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011165 was_it_defined=yes
11166
Martin v. Löwiseba40652007-08-30 20:10:57 +000011167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11170$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011171
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11173$as_echo_n "checking for addrinfo... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011174if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011175 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011176else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011178/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011179#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011180int
11181main ()
11182{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011183struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011184 ;
11185 return 0;
11186}
11187_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011188if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011189 ac_cv_struct_addrinfo=yes
11190else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011191 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11194fi
11195
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11197$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011198if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011199
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011200$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011201
11202fi
11203
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11205$as_echo_n "checking for sockaddr_storage... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011206if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011207 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011210/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011211
11212# include <sys/types.h>
11213# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011214int
11215main ()
11216{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011217struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011218 ;
11219 return 0;
11220}
11221_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011222if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011223 ac_cv_struct_sockaddr_storage=yes
11224else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011225 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11228fi
11229
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11231$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011232if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011233
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011234$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011235
11236fi
11237
Guido van Rossum627b2d71993-12-24 10:39:16 +000011238# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011239
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11241$as_echo_n "checking whether char is unsigned... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011242if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011243 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011244else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011247$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011248int
11249main ()
11250{
11251static int test_array [1 - 2 * !(((char) -1) < 0)];
11252test_array [0] = 0
11253
11254 ;
11255 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011256}
Martin v. Löwis11437992002-04-12 09:54:03 +000011257_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011258if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011259 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011260else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011261 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011262fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011264fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11266$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011267if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011268 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011269
11270fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011271
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11273$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011274if test "${ac_cv_c_const+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011275 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011276else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011278/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011279
Martin v. Löwis11437992002-04-12 09:54:03 +000011280int
11281main ()
11282{
11283/* FIXME: Include the comments suggested by Paul. */
11284#ifndef __cplusplus
11285 /* Ultrix mips cc rejects this. */
11286 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000011287 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011289 char const *const *pcpcc;
11290 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 /* NEC SVR4.0.2 mips cc rejects this. */
11292 struct point {int x, y;};
11293 static struct point const zero = {0,0};
11294 /* AIX XL C 1.02.0.0 rejects this.
11295 It does not let you subtract one const X* pointer from another in
11296 an arm of an if-expression whose if-part is not a constant
11297 expression */
11298 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011299 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011300 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011301 ++pcpcc;
11302 ppc = (char**) pcpcc;
11303 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011304 { /* SCO 3.2v4 cc rejects this. */
11305 char *t;
11306 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011307
Martin v. Löwis11437992002-04-12 09:54:03 +000011308 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011309 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011310 }
11311 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11312 int x[] = {25, 17};
11313 const int *foo = &x[0];
11314 ++foo;
11315 }
11316 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11317 typedef const int *iptr;
11318 iptr p = 0;
11319 ++p;
11320 }
11321 { /* AIX XL C 1.02.0.0 rejects this saying
11322 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11323 struct s { int j; const int *ap[3]; };
11324 struct s *b; b->j = 5;
11325 }
11326 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11327 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011328 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011329 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011330 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011331#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011332
Martin v. Löwis11437992002-04-12 09:54:03 +000011333 ;
11334 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011335}
Martin v. Löwis11437992002-04-12 09:54:03 +000011336_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011337if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011338 ac_cv_c_const=yes
11339else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011340 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011343fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11345$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011346if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011347
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011348$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011349
11350fi
11351
Michael W. Hudson54241132001-12-07 15:38:26 +000011352
Guido van Rossumda88dad1995-01-26 00:46:29 +000011353works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11355$as_echo_n "checking for working volatile... " >&6; }
11356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011357/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011358
Martin v. Löwis11437992002-04-12 09:54:03 +000011359int
11360main ()
11361{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011362volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011363 ;
11364 return 0;
11365}
11366_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011367if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011368 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011369else
Skip Montanaro6dead952003-09-25 14:50:04 +000011370
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011371$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011372
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011373
Guido van Rossum627b2d71993-12-24 10:39:16 +000011374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11377$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011378
Guido van Rossumda88dad1995-01-26 00:46:29 +000011379works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11381$as_echo_n "checking for working signed char... " >&6; }
11382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011383/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011384
Martin v. Löwis11437992002-04-12 09:54:03 +000011385int
11386main ()
11387{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011388signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011389 ;
11390 return 0;
11391}
11392_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011393if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011394 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011395else
Skip Montanaro6dead952003-09-25 14:50:04 +000011396
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011397$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011398
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011399
Guido van Rossum7f43da71994-08-01 12:15:30 +000011400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11403$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011404
Guido van Rossumda88dad1995-01-26 00:46:29 +000011405have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11407$as_echo_n "checking for prototypes... " >&6; }
11408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011409/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011410int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011411int
11412main ()
11413{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011414return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011415 ;
11416 return 0;
11417}
11418_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011420
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011421$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011422
Matthias Klosec511b472010-05-08 11:01:39 +000011423 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11427$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011428
Guido van Rossumda88dad1995-01-26 00:46:29 +000011429works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11431$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011433/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011434
11435#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011436int foo(int x, ...) {
11437 va_list va;
11438 va_start(va, x);
11439 va_arg(va, int);
11440 va_arg(va, char *);
11441 va_arg(va, double);
11442 return 0;
11443}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011444
Martin v. Löwis11437992002-04-12 09:54:03 +000011445int
11446main ()
11447{
Guido van Rossum90eea071996-08-30 20:58:57 +000011448return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011449 ;
11450 return 0;
11451}
11452_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011453if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011454
11455
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011456$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011457
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011458 works=yes
11459
Guido van Rossum627b2d71993-12-24 10:39:16 +000011460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11463$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011464
Martin v. Löwisd6320502004-08-12 13:45:08 +000011465# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11467$as_echo_n "checking for socketpair... " >&6; }
11468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011469/* end confdefs.h. */
11470
11471#include <sys/types.h>
11472#include <sys/socket.h>
11473
11474int
11475main ()
11476{
11477void *x=socketpair
11478 ;
11479 return 0;
11480}
11481_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011482if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011483
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011484$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011485
Matthias Klosec511b472010-05-08 11:01:39 +000011486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011487$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011488else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11490$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011491
11492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011494
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011495# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11497$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011499/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011500#include <sys/types.h>
11501#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011502int
11503main ()
11504{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011505struct sockaddr x;
11506x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011507 ;
11508 return 0;
11509}
11510_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011511if ac_fn_c_try_compile "$LINENO"; then :
11512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11513$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011514
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011515$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011516
11517else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11519$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011520
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011523
Guido van Rossumda88dad1995-01-26 00:46:29 +000011524va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11526$as_echo_n "checking whether va_list is an array... " >&6; }
11527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011528/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011529
11530#ifdef HAVE_STDARG_PROTOTYPES
11531#include <stdarg.h>
11532#else
11533#include <varargs.h>
11534#endif
11535
Martin v. Löwis11437992002-04-12 09:54:03 +000011536int
11537main ()
11538{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011539va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011540 ;
11541 return 0;
11542}
11543_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011544if ac_fn_c_try_compile "$LINENO"; then :
11545
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011546else
Skip Montanaro6dead952003-09-25 14:50:04 +000011547
Martin v. Löwis11437992002-04-12 09:54:03 +000011548
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011549$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011550
Guido van Rossumda88dad1995-01-26 00:46:29 +000011551 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011552
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11556$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011557
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011558# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011559
11560
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011561ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Charles-François Natali97781b02011-07-22 23:43:42 +020011562if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011563
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011564 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011565
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11567$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011568 OLD_CFLAGS=$CFLAGS
11569 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011571/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011572
11573# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011574
Martin v. Löwis11437992002-04-12 09:54:03 +000011575int
11576main ()
11577{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011578
11579 char *name;
11580 struct hostent *he, *res;
11581 char buffer[2048];
11582 int buflen = 2048;
11583 int h_errnop;
11584
11585 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011586
11587 ;
11588 return 0;
11589}
11590_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011591if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011592
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011593 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011594
Martin v. Löwis11437992002-04-12 09:54:03 +000011595
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011596$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011597
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11599$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011600
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011601else
Skip Montanaro6dead952003-09-25 14:50:04 +000011602
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11604$as_echo "no" >&6; }
11605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11606$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011608/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011609
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011610# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011611
Martin v. Löwis11437992002-04-12 09:54:03 +000011612int
11613main ()
11614{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011615
11616 char *name;
11617 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011618 char buffer[2048];
11619 int buflen = 2048;
11620 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011621
Matthias Klosec511b472010-05-08 11:01:39 +000011622 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011623
11624 ;
11625 return 0;
11626}
11627_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011628if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011629
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011630 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011631
Martin v. Löwis11437992002-04-12 09:54:03 +000011632
Matthias Klosec511b472010-05-08 11:01:39 +000011633$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011634
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11636$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011637
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011638else
Skip Montanaro6dead952003-09-25 14:50:04 +000011639
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11641$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11643$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11645/* end confdefs.h. */
11646
11647# include <netdb.h>
11648
11649int
11650main ()
11651{
11652
11653 char *name;
11654 struct hostent *he;
11655 struct hostent_data data;
11656
11657 (void) gethostbyname_r(name, he, &data);
11658
11659 ;
11660 return 0;
11661}
11662_ACEOF
11663if ac_fn_c_try_compile "$LINENO"; then :
11664
11665 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11666
11667
11668$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11669
11670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11671$as_echo "yes" >&6; }
11672
11673else
11674
11675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11676$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011677
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011680
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011686 CFLAGS=$OLD_CFLAGS
11687
11688else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011689
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011690 for ac_func in gethostbyname
11691do :
11692 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Charles-François Natali97781b02011-07-22 23:43:42 +020011693if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011694 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011695#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011696_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011697
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011698fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011699done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011700
Michael W. Hudson54241132001-12-07 15:38:26 +000011701
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011702fi
11703
Michael W. Hudson54241132001-12-07 15:38:26 +000011704
11705
11706
11707
11708
11709
Guido van Rossum627b2d71993-12-24 10:39:16 +000011710# checks for system services
11711# (none yet)
11712
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011713# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011714ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Charles-François Natali97781b02011-07-22 23:43:42 +020011715if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011716
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011717else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11719$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011720if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011721 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011722else
Martin v. Löwis11437992002-04-12 09:54:03 +000011723 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011724LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011727
Martin v. Löwiseba40652007-08-30 20:10:57 +000011728/* Override any GCC internal prototype to avoid an error.
11729 Use char because int might match the return type of a GCC
11730 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011731#ifdef __cplusplus
11732extern "C"
11733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011734char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011735int
11736main ()
11737{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011738return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011739 ;
11740 return 0;
11741}
11742_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011743if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011744 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011745else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011746 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011747fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011748rm -f core conftest.err conftest.$ac_objext \
11749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011750LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011751fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11753$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011754if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011755 cat >>confdefs.h <<_ACEOF
11756#define HAVE_LIBIEEE 1
11757_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011758
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011759 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011760
Guido van Rossum627b2d71993-12-24 10:39:16 +000011761fi
11762
Michael W. Hudson54241132001-12-07 15:38:26 +000011763
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011764fi
11765
Michael W. Hudson54241132001-12-07 15:38:26 +000011766
Guido van Rossum7f253911997-05-09 02:42:48 +000011767# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11769$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011770
Martin v. Löwiseba40652007-08-30 20:10:57 +000011771# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011772if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011773 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011774if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011775then
11776
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011777$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011778
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11780$as_echo "yes" >&6; }
11781else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11782$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011783fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011784else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11786$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011787fi
11788
Guido van Rossum7f253911997-05-09 02:42:48 +000011789
Guido van Rossum7f43da71994-08-01 12:15:30 +000011790# check for --with-libm=...
11791
Guido van Rossum563e7081996-09-10 18:20:48 +000011792case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011793Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011794BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011795*) LIBM=-lm
11796esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11798$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011799
Martin v. Löwiseba40652007-08-30 20:10:57 +000011800# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011801if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011802 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011803if test "$withval" = no
11804then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11806$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011807elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011808then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11810$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011811else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011812fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011813else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11815$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011816fi
11817
Guido van Rossum7f43da71994-08-01 12:15:30 +000011818
11819# check for --with-libc=...
11820
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11822$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011823
Martin v. Löwiseba40652007-08-30 20:10:57 +000011824# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011825if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011826 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011827if test "$withval" = no
11828then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11830$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011831elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011832then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11834$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011835else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011836fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011837else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11839$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011840fi
11841
Guido van Rossum7f43da71994-08-01 12:15:30 +000011842
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011843# **************************************************
11844# * Check for various properties of floating point *
11845# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000011846
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11848$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011849if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011850 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011851else
11852
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011853if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011854 ac_cv_little_endian_double=no
11855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011857/* end confdefs.h. */
11858
11859#include <string.h>
11860int main() {
11861 double x = 9006104071832581.0;
11862 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11863 return 0;
11864 else
11865 return 1;
11866}
11867
11868_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011869if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011870 ac_cv_little_endian_double=yes
11871else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011872 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011873fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011874rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11875 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011876fi
11877
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011878fi
11879
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11881$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011882if test "$ac_cv_little_endian_double" = yes
11883then
11884
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011885$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011886
11887fi
11888
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11890$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011891if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011892 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011893else
11894
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011895if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011896 ac_cv_big_endian_double=no
11897else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011899/* end confdefs.h. */
11900
11901#include <string.h>
11902int main() {
11903 double x = 9006104071832581.0;
11904 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11905 return 0;
11906 else
11907 return 1;
11908}
11909
11910_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011911if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011912 ac_cv_big_endian_double=yes
11913else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011914 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011915fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011916rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11917 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011918fi
11919
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011920fi
11921
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11923$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011924if test "$ac_cv_big_endian_double" = yes
11925then
11926
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011927$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011928
11929fi
11930
11931# Some ARM platforms use a mixed-endian representation for doubles.
11932# While Python doesn't currently have full support for these platforms
11933# (see e.g., issue 1762561), we can at least make sure that float <-> string
11934# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11936$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011937if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011938 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011939else
11940
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011941if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011942 ac_cv_mixed_endian_double=no
11943else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011945/* end confdefs.h. */
11946
11947#include <string.h>
11948int main() {
11949 double x = 9006104071832581.0;
11950 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11951 return 0;
11952 else
11953 return 1;
11954}
11955
11956_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011957if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011958 ac_cv_mixed_endian_double=yes
11959else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011960 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011961fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11963 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011964fi
11965
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011966fi
11967
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11969$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011970if test "$ac_cv_mixed_endian_double" = yes
11971then
11972
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011973$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011974
11975fi
11976
11977# The short float repr introduced in Python 3.1 requires the
11978# correctly-rounded string <-> double conversion functions from
11979# Python/dtoa.c, which in turn require that the FPU uses 53-bit
11980# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000011981# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011982# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000011983
11984# This inline assembler syntax may also work for suncc and icc,
11985# so we try it on all platforms.
11986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11988$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011990/* end confdefs.h. */
11991
11992int
11993main ()
11994{
11995
Mark Dickinsona548dee2009-11-15 13:12:43 +000011996 unsigned short cw;
11997 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11998 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011999
12000 ;
12001 return 0;
12002}
12003_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012004if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012005 have_gcc_asm_for_x87=yes
12006else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012007 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012008fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12011$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012012if test "$have_gcc_asm_for_x87" = yes
12013then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012014
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012015$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012016
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012017fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012018
Mark Dickinson04b27232009-01-04 12:29:36 +000012019# Detect whether system arithmetic is subject to x87-style double
12020# rounding issues. The result of this test has little meaning on non
12021# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12022# mode is round-to-nearest and double rounding issues are present, and
12023# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12025$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012026# $BASECFLAGS may affect the result
12027ac_save_cc="$CC"
12028CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012029if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012030 ac_cv_x87_double_rounding=no
12031else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012033/* end confdefs.h. */
12034
12035#include <stdlib.h>
12036#include <math.h>
12037int main() {
12038 volatile double x, y, z;
12039 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12040 x = 0.99999999999999989; /* 1-2**-53 */
12041 y = 1./x;
12042 if (y != 1.)
12043 exit(0);
12044 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12045 x = 1e16;
12046 y = 2.99999;
12047 z = x + y;
12048 if (z != 1e16+4.)
12049 exit(0);
12050 /* both tests show evidence of double rounding */
12051 exit(1);
12052}
12053
12054_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012055if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012056 ac_cv_x87_double_rounding=no
12057else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012058 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012059fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012060rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12061 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012062fi
12063
Mark Dickinson99abd142009-10-24 13:44:16 +000012064CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12066$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012067if test "$ac_cv_x87_double_rounding" = yes
12068then
12069
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012070$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012071
12072fi
12073
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012074# ************************************
12075# * Check for mathematical functions *
12076# ************************************
12077
12078LIBS_SAVE=$LIBS
12079LIBS="$LIBS $LIBM"
12080
Mark Dickinson265d7382008-04-21 22:32:24 +000012081# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12082# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12084$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012085if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012086 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012087else
12088
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012089if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012090 ac_cv_tanh_preserves_zero_sign=no
12091else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012093/* end confdefs.h. */
12094
12095#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012096#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012097int main() {
12098 /* return 0 if either negative zeros don't exist
12099 on this platform or if negative zeros exist
12100 and tanh(-0.) == -0. */
12101 if (atan2(0., -1.) == atan2(-0., -1.) ||
12102 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12103 else exit(1);
12104}
12105
12106_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012107if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012108 ac_cv_tanh_preserves_zero_sign=yes
12109else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012110 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012111fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12113 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012114fi
12115
Mark Dickinson265d7382008-04-21 22:32:24 +000012116fi
12117
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12119$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012120if test "$ac_cv_tanh_preserves_zero_sign" = yes
12121then
12122
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012123$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012124
12125fi
12126
Mark Dickinson65898e02009-09-05 10:27:00 +000012127for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012128do :
12129 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12130ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012131if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012132 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012133#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012134_ACEOF
12135
12136fi
12137done
12138
Mark Dickinson65898e02009-09-05 10:27:00 +000012139for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012140do :
12141 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12142ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012143if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012144 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012145#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012146_ACEOF
12147
12148fi
12149done
12150
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012151ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12152"
Charles-François Natali97781b02011-07-22 23:43:42 +020012153if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012154 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012155else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012156 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012157fi
12158
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012159cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012160#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012161_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012162ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12163"
Charles-François Natali97781b02011-07-22 23:43:42 +020012164if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012165 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012166else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012167 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012168fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012169
12170cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012171#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012172_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012173ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12174"
Charles-François Natali97781b02011-07-22 23:43:42 +020012175if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012176 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012177else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012178 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012179fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012180
12181cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012182#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012183_ACEOF
12184
12185
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012186LIBS=$LIBS_SAVE
12187
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012188# For multiprocessing module, check that sem_open
12189# actually works. For FreeBSD versions <= 7.2,
12190# the kernel module that provides POSIX semaphores
12191# isn't loaded by default, so an attempt to call
12192# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12194$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012195if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012196 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012197else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012198 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012199 ac_cv_posix_semaphores_enabled=yes
12200else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012202/* end confdefs.h. */
12203
12204#include <unistd.h>
12205#include <fcntl.h>
12206#include <stdio.h>
12207#include <semaphore.h>
12208#include <sys/stat.h>
12209
12210int main(void) {
12211 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12212 if (a == SEM_FAILED) {
12213 perror("sem_open");
12214 return 1;
12215 }
12216 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012217 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012218 return 0;
12219}
12220
12221_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012222if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012223 ac_cv_posix_semaphores_enabled=yes
12224else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012225 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012226fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12228 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012229fi
12230
12231
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012232fi
12233
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12235$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012236if test $ac_cv_posix_semaphores_enabled = no
12237then
12238
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012239$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012240
12241fi
12242
12243# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12245$as_echo_n "checking for broken sem_getvalue... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012246if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012247 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012248else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012249 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012250 ac_cv_broken_sem_getvalue=yes
12251else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012253/* end confdefs.h. */
12254
12255#include <unistd.h>
12256#include <fcntl.h>
12257#include <stdio.h>
12258#include <semaphore.h>
12259#include <sys/stat.h>
12260
12261int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012262 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012263 int count;
12264 int res;
12265 if(a==SEM_FAILED){
12266 perror("sem_open");
12267 return 1;
12268
12269 }
12270 res = sem_getvalue(a, &count);
12271 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012272 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012273 return res==-1 ? 1 : 0;
12274}
12275
12276_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012277if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012278 ac_cv_broken_sem_getvalue=no
12279else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012280 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012281fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12283 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012284fi
12285
12286
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012287fi
12288
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12290$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012291if test $ac_cv_broken_sem_getvalue = yes
12292then
12293
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012294$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012295
12296fi
12297
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012298# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12300$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012301# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012302if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012303 enableval=$enable_big_digits; case $enable_big_digits in
12304yes)
12305 enable_big_digits=30 ;;
12306no)
12307 enable_big_digits=15 ;;
1230815|30)
12309 ;;
12310*)
Charles-François Natali97781b02011-07-22 23:43:42 +020012311 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 +000012312esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12314$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012315
12316cat >>confdefs.h <<_ACEOF
12317#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12318_ACEOF
12319
12320
12321else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12323$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012324fi
12325
12326
Guido van Rossumef2255b2000-03-10 22:30:29 +000012327# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012328ac_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 +020012329if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012330
12331
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012332$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012333
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012334 wchar_h="yes"
12335
Guido van Rossumef2255b2000-03-10 22:30:29 +000012336else
Martin v. Löwis11437992002-04-12 09:54:03 +000012337 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012338
12339fi
12340
Michael W. Hudson54241132001-12-07 15:38:26 +000012341
Martin v. Löwis11437992002-04-12 09:54:03 +000012342
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012343# determine wchar_t size
12344if test "$wchar_h" = yes
12345then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012346 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012347# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12348# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12349# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12351$as_echo_n "checking size of wchar_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012352if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012353 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012354else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012355 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12356"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012357
Martin v. Löwis11437992002-04-12 09:54:03 +000012358else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012359 if test "$ac_cv_type_wchar_t" = yes; then
12360 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12361$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012362as_fn_error 77 "cannot compute sizeof (wchar_t)
Charles-François Natali97781b02011-07-22 23:43:42 +020012363See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012364 else
12365 ac_cv_sizeof_wchar_t=0
12366 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012367fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012368
Martin v. Löwis11437992002-04-12 09:54:03 +000012369fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12371$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012372
12373
12374
Martin v. Löwis11437992002-04-12 09:54:03 +000012375cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012376#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012377_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012378
Michael W. Hudson54241132001-12-07 15:38:26 +000012379
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012380fi
12381
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12383$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012384have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012386/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012387
12388#include <tcl.h>
12389#if TCL_UTF_MAX != 6
12390# error "NOT UCS4_TCL"
12391#endif
12392int
12393main ()
12394{
12395
12396 ;
12397 return 0;
12398}
12399_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012400if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012401
12402
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012403$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012404
12405 have_ucs4_tcl=yes
12406
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12410$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012411
Skip Montanaro6dead952003-09-25 14:50:04 +000012412# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012413if test "$wchar_h" = yes
12414then
12415 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12417$as_echo_n "checking whether wchar_t is signed... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012418 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012419 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012420else
12421
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012422 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012423 ac_cv_wchar_t_signed=yes
12424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012426/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012427
12428 #include <wchar.h>
12429 int main()
12430 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012431 /* Success: exit code 0 */
12432 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012433 }
12434
12435_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012436if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012437 ac_cv_wchar_t_signed=yes
12438else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012439 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012440fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12442 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012443fi
12444
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012445fi
12446
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12448$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012449fi
12450
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12452$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012453# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012454if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012455 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012456else
12457 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012458fi
12459
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012460
12461if test $enable_unicode = yes
12462then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012463 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012464 case "$have_ucs4_tcl" in
12465 yes) enable_unicode="ucs4"
12466 ;;
12467 *) enable_unicode="ucs2"
12468 ;;
12469 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012470fi
12471
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012472
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012473case "$enable_unicode" in
12474ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012475 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012476
12477 ;;
12478ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012479 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012480
12481 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +020012482*) 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 +000012483esac
12484
Michael W. Hudson54241132001-12-07 15:38:26 +000012485
Martin v. Löwis11437992002-04-12 09:54:03 +000012486
12487
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012488if test "$enable_unicode" = "no"
12489then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012490 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12492$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012493else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012494 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012495
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012496$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012497
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012498
12499 # wchar_t is only usable if it maps to an unsigned type
12500 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012501 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012502 then
12503 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012504
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012505$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012506
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012507 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012508
12509 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12510 then
12511 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012512 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012513
12514 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12515 then
12516 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012517 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012518
12519 else
12520 PY_UNICODE_TYPE="no type found"
12521 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12523$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012524fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012525
12526# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12528$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012529if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012530 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012531else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012532 ac_cv_c_bigendian=unknown
12533 # See if we're dealing with a universal compiler.
12534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12535/* end confdefs.h. */
12536#ifndef __APPLE_CC__
12537 not a universal capable compiler
12538 #endif
12539 typedef int dummy;
12540
Skip Montanaro6dead952003-09-25 14:50:04 +000012541_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012542if ac_fn_c_try_compile "$LINENO"; then :
12543
12544 # Check for potential -arch flags. It is not universal unless
12545 # there are at least two -arch flags with different values.
12546 ac_arch=
12547 ac_prev=
12548 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12549 if test -n "$ac_prev"; then
12550 case $ac_word in
12551 i?86 | x86_64 | ppc | ppc64)
12552 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12553 ac_arch=$ac_word
12554 else
12555 ac_cv_c_bigendian=universal
12556 break
12557 fi
12558 ;;
12559 esac
12560 ac_prev=
12561 elif test "x$ac_word" = "x-arch"; then
12562 ac_prev=arch
12563 fi
12564 done
12565fi
12566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12567 if test $ac_cv_c_bigendian = unknown; then
12568 # See if sys/param.h defines the BYTE_ORDER macro.
12569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012570/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012571#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012572 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012573
Martin v. Löwis11437992002-04-12 09:54:03 +000012574int
12575main ()
12576{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012577#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12578 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12579 && LITTLE_ENDIAN)
12580 bogus endian macros
12581 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012582
12583 ;
12584 return 0;
12585}
12586_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012587if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012588 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012590/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012591#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012592 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012593
Martin v. Löwis11437992002-04-12 09:54:03 +000012594int
12595main ()
12596{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012597#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012598 not big endian
12599 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012600
12601 ;
12602 return 0;
12603}
12604_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012605if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012606 ac_cv_c_bigendian=yes
12607else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012608 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012611fi
12612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12613 fi
12614 if test $ac_cv_c_bigendian = unknown; then
12615 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012617/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012618#include <limits.h>
12619
Martin v. Löwis11437992002-04-12 09:54:03 +000012620int
12621main ()
12622{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012623#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12624 bogus endian macros
12625 #endif
12626
Martin v. Löwis11437992002-04-12 09:54:03 +000012627 ;
12628 return 0;
12629}
12630_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012631if ac_fn_c_try_compile "$LINENO"; then :
12632 # It does; now see whether it defined to _BIG_ENDIAN or not.
12633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12634/* end confdefs.h. */
12635#include <limits.h>
12636
12637int
12638main ()
12639{
12640#ifndef _BIG_ENDIAN
12641 not big endian
12642 #endif
12643
12644 ;
12645 return 0;
12646}
12647_ACEOF
12648if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012649 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012650else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012651 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012652fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12654fi
12655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12656 fi
12657 if test $ac_cv_c_bigendian = unknown; then
12658 # Compile a test program.
12659 if test "$cross_compiling" = yes; then :
12660 # Try to guess by grepping values from an object file.
12661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12662/* end confdefs.h. */
12663short int ascii_mm[] =
12664 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12665 short int ascii_ii[] =
12666 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12667 int use_ascii (int i) {
12668 return ascii_mm[i] + ascii_ii[i];
12669 }
12670 short int ebcdic_ii[] =
12671 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12672 short int ebcdic_mm[] =
12673 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12674 int use_ebcdic (int i) {
12675 return ebcdic_mm[i] + ebcdic_ii[i];
12676 }
12677 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012678
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012679int
12680main ()
12681{
12682return use_ascii (foo) == use_ebcdic (foo);
12683 ;
12684 return 0;
12685}
12686_ACEOF
12687if ac_fn_c_try_compile "$LINENO"; then :
12688 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12689 ac_cv_c_bigendian=yes
12690 fi
12691 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12692 if test "$ac_cv_c_bigendian" = unknown; then
12693 ac_cv_c_bigendian=no
12694 else
12695 # finding both strings is unlikely to happen, but who knows?
12696 ac_cv_c_bigendian=unknown
12697 fi
12698 fi
12699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012701else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012703/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012704$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012705int
12706main ()
12707{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012708
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012709 /* Are we little or big endian? From Harbison&Steele. */
12710 union
12711 {
12712 long int l;
12713 char c[sizeof (long int)];
12714 } u;
12715 u.l = 1;
12716 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012717
12718 ;
12719 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012720}
Martin v. Löwis11437992002-04-12 09:54:03 +000012721_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012722if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012723 ac_cv_c_bigendian=no
12724else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012725 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012726fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12728 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012730
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012731 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012732fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12734$as_echo "$ac_cv_c_bigendian" >&6; }
12735 case $ac_cv_c_bigendian in #(
12736 yes)
12737 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12738;; #(
12739 no)
12740 ;; #(
12741 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012742
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012743$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012744
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012745 ;; #(
12746 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012747 as_fn_error $? "unknown endianness
Charles-François Natali97781b02011-07-22 23:43:42 +020012748 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012749 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012750
Michael W. Hudson54241132001-12-07 15:38:26 +000012751
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012752# Check whether right shifting a negative integer extends the sign bit
12753# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12755$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012756if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012757 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012758else
Martin v. Löwis11437992002-04-12 09:54:03 +000012759
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012760if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012761 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012762else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012764/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012765
12766int main()
12767{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012768 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012769}
12770
Martin v. Löwis11437992002-04-12 09:54:03 +000012771_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012772if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012773 ac_cv_rshift_extends_sign=yes
12774else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012775 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012776fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012779fi
12780
Martin v. Löwiseba40652007-08-30 20:10:57 +000012781fi
12782
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12784$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012785if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012786then
Martin v. Löwis11437992002-04-12 09:54:03 +000012787
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012788$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012789
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012790fi
12791
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012792# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12794$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012795if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012796 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012797else
Martin v. Löwis11437992002-04-12 09:54:03 +000012798
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012800/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012801#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012802int
12803main ()
12804{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012805
12806 FILE *f = fopen("/dev/null", "r");
12807 flockfile(f);
12808 getc_unlocked(f);
12809 funlockfile(f);
12810
Martin v. Löwis11437992002-04-12 09:54:03 +000012811 ;
12812 return 0;
12813}
12814_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012815if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012816 ac_cv_have_getc_unlocked=yes
12817else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012818 ac_cv_have_getc_unlocked=no
12819fi
12820rm -f core conftest.err conftest.$ac_objext \
12821 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012823
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12825$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012826if test "$ac_cv_have_getc_unlocked" = yes
12827then
Martin v. Löwis11437992002-04-12 09:54:03 +000012828
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012829$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012830
12831fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012832
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012833# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012834# save the value of LIBS so we don't actually link Python with readline
12835LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012836
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012837# On some systems we need to link readline to a termcap compatible
12838# library. NOTE: Keep the precedence of listed libraries synchronised
12839# with setup.py.
12840py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12842$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012843for py_libtermcap in "" ncursesw ncurses curses termcap; do
12844 if test -z "$py_libtermcap"; then
12845 READLINE_LIBS="-lreadline"
12846 else
12847 READLINE_LIBS="-lreadline -l$py_libtermcap"
12848 fi
12849 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012851/* end confdefs.h. */
12852
Martin v. Löwiseba40652007-08-30 20:10:57 +000012853/* Override any GCC internal prototype to avoid an error.
12854 Use char because int might match the return type of a GCC
12855 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012856#ifdef __cplusplus
12857extern "C"
12858#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012859char readline ();
12860int
12861main ()
12862{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012863return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012864 ;
12865 return 0;
12866}
12867_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012868if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012869 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012870fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012871rm -f core conftest.err conftest.$ac_objext \
12872 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012873 if test $py_cv_lib_readline = yes; then
12874 break
12875 fi
12876done
12877# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12878#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000012879if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12881$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12884$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012885
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012886$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012887
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012888fi
12889
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012890# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12892$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012893if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012894 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012895else
12896 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012897LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012899/* end confdefs.h. */
12900
Martin v. Löwiseba40652007-08-30 20:10:57 +000012901/* Override any GCC internal prototype to avoid an error.
12902 Use char because int might match the return type of a GCC
12903 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012904#ifdef __cplusplus
12905extern "C"
12906#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012907char rl_callback_handler_install ();
12908int
12909main ()
12910{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012911return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012912 ;
12913 return 0;
12914}
12915_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012916if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012917 ac_cv_lib_readline_rl_callback_handler_install=yes
12918else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012919 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012920fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012921rm -f core conftest.err conftest.$ac_objext \
12922 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012923LIBS=$ac_check_lib_save_LIBS
12924fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12926$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012927if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012928
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012929$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012930
12931fi
12932
12933
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012934# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012936/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012937#include <readline/readline.h>
12938_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012939if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012940 have_readline=yes
12941else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012942 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000012943
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012944fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012945rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012946if test $have_readline = yes
12947then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012949/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012950#include <readline/readline.h>
12951
12952_ACEOF
12953if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012954 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012955
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012956$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012957
12958fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012959rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012960
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012962/* end confdefs.h. */
12963#include <readline/readline.h>
12964
12965_ACEOF
12966if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012967 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012968
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012969$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012970
12971fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012972rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012973
12974fi
12975
Martin v. Löwis0daad592001-09-30 21:09:59 +000012976# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12978$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012979if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012980 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012981else
Martin v. Löwis11437992002-04-12 09:54:03 +000012982 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012983LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012986
Martin v. Löwiseba40652007-08-30 20:10:57 +000012987/* Override any GCC internal prototype to avoid an error.
12988 Use char because int might match the return type of a GCC
12989 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012990#ifdef __cplusplus
12991extern "C"
12992#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012993char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012994int
12995main ()
12996{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012997return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012998 ;
12999 return 0;
13000}
13001_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013002if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013003 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013004else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013005 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013006fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013007rm -f core conftest.err conftest.$ac_objext \
13008 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013009LIBS=$ac_check_lib_save_LIBS
13010fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13012$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013013if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013014
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013015$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013016
Martin v. Löwis0daad592001-09-30 21:09:59 +000013017fi
13018
Michael W. Hudson54241132001-12-07 15:38:26 +000013019
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013020# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13022$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013023if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013024 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013025else
13026 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013027LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013029/* end confdefs.h. */
13030
13031/* Override any GCC internal prototype to avoid an error.
13032 Use char because int might match the return type of a GCC
13033 builtin and then its argument prototype would still apply. */
13034#ifdef __cplusplus
13035extern "C"
13036#endif
13037char rl_completion_display_matches_hook ();
13038int
13039main ()
13040{
13041return rl_completion_display_matches_hook ();
13042 ;
13043 return 0;
13044}
13045_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013046if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013047 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013049 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013050fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013051rm -f core conftest.err conftest.$ac_objext \
13052 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013053LIBS=$ac_check_lib_save_LIBS
13054fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13056$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013057if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013058
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013059$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013060
13061fi
13062
13063
Martin v. Löwis0daad592001-09-30 21:09:59 +000013064# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13066$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013067if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013068 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013069else
Martin v. Löwis11437992002-04-12 09:54:03 +000013070 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013071LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013074
Martin v. Löwiseba40652007-08-30 20:10:57 +000013075/* Override any GCC internal prototype to avoid an error.
13076 Use char because int might match the return type of a GCC
13077 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013078#ifdef __cplusplus
13079extern "C"
13080#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013081char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013082int
13083main ()
13084{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013085return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013086 ;
13087 return 0;
13088}
13089_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013090if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013091 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013092else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013093 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013094fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013095rm -f core conftest.err conftest.$ac_objext \
13096 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013097LIBS=$ac_check_lib_save_LIBS
13098fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13100$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013101if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013102
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013103$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013104
Guido van Rossum353ae582001-07-10 16:45:32 +000013105fi
13106
Jack Jansendd19cf82001-12-06 22:36:17 +000013107
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013108# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013110/* end confdefs.h. */
13111#include <readline/readline.h>
13112_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013113if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013114 have_readline=yes
13115else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013116 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013117
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013118fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013119rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013120if test $have_readline = yes
13121then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013123/* end confdefs.h. */
13124#include <readline/readline.h>
13125
13126_ACEOF
13127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013128 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013129
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013130$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013131
13132fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013133rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013134
13135fi
13136
Martin v. Löwis82bca632006-02-10 20:49:30 +000013137# End of readline checks: restore LIBS
13138LIBS=$LIBS_no_readline
13139
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13141$as_echo_n "checking for broken nice()... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013142if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013143 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013144else
Martin v. Löwis11437992002-04-12 09:54:03 +000013145
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013146if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013147 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013148else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013150/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013151
13152int main()
13153{
13154 int val1 = nice(1);
13155 if (val1 != -1 && val1 == nice(2))
13156 exit(0);
13157 exit(1);
13158}
13159
Martin v. Löwis11437992002-04-12 09:54:03 +000013160_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013161if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013162 ac_cv_broken_nice=yes
13163else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013164 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013165fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13167 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013168fi
13169
Martin v. Löwiseba40652007-08-30 20:10:57 +000013170fi
13171
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13173$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013174if test "$ac_cv_broken_nice" = yes
13175then
Martin v. Löwis11437992002-04-12 09:54:03 +000013176
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013177$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013178
13179fi
13180
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13182$as_echo_n "checking for broken poll()... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013183if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013184 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013185else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013186 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013187 ac_cv_broken_poll=no
13188else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013190/* end confdefs.h. */
13191
13192#include <poll.h>
13193
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013194int main()
13195{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013196 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013197 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013198
13199 close (42);
13200
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013201 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013202 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013203 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013204 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013205 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013206 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013207 return 1;
13208}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013209
13210_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013211if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013212 ac_cv_broken_poll=yes
13213else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013214 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013215fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13217 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013219
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013220fi
13221
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13223$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013224if test "$ac_cv_broken_poll" = yes
13225then
13226
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013227$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013228
13229fi
13230
Brett Cannon43802422005-02-10 20:48:03 +000013231# 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 +000013232# (which is not required by ISO C or UNIX spec) and/or if we support
13233# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013234ac_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 +000013235#include <$ac_cv_struct_tm>
13236
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013237"
Charles-François Natali97781b02011-07-22 23:43:42 +020013238if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013239
13240cat >>confdefs.h <<_ACEOF
13241#define HAVE_STRUCT_TM_TM_ZONE 1
13242_ACEOF
13243
13244
13245fi
13246
13247if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13248
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013249$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013250
13251else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013252 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13253"
Charles-François Natali97781b02011-07-22 23:43:42 +020013254if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013255 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013256else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013257 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013258fi
13259
Martin v. Löwiseba40652007-08-30 20:10:57 +000013260cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013261#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013262_ACEOF
13263
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13265$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013266if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013267 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013268else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013270/* end confdefs.h. */
13271#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013272#if !HAVE_DECL_TZNAME
13273extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013274#endif
13275
13276int
13277main ()
13278{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013279return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013280 ;
13281 return 0;
13282}
13283_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013284if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013285 ac_cv_var_tzname=yes
13286else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013287 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013288fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013289rm -f core conftest.err conftest.$ac_objext \
13290 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013291fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13293$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013294 if test $ac_cv_var_tzname = yes; then
13295
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013296$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013297
13298 fi
13299fi
13300
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013301
Martin v. Löwis1d459062005-03-14 21:23:33 +000013302# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13304$as_echo_n "checking for working tzset()... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013305if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013306 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013307else
13308
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013309if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013310 ac_cv_working_tzset=no
13311else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013313/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013314
13315#include <stdlib.h>
13316#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013317#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013318
13319#if HAVE_TZNAME
13320extern char *tzname[];
13321#endif
13322
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013323int main()
13324{
Brett Cannon18367812003-09-19 00:59:16 +000013325 /* Note that we need to ensure that not only does tzset(3)
13326 do 'something' with localtime, but it works as documented
13327 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013328 This includes making sure that tzname is set properly if
13329 tm->tm_zone does not exist since it is the alternative way
13330 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013331
13332 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013333 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013334 */
13335
Martin v. Löwis1d459062005-03-14 21:23:33 +000013336 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013337 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13338
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013339 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013340 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013341 if (localtime(&groundhogday)->tm_hour != 0)
13342 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013343#if HAVE_TZNAME
13344 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13345 if (strcmp(tzname[0], "UTC") ||
13346 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13347 exit(1);
13348#endif
Brett Cannon18367812003-09-19 00:59:16 +000013349
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013350 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013351 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013352 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013353 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013354#if HAVE_TZNAME
13355 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13356 exit(1);
13357#endif
Brett Cannon18367812003-09-19 00:59:16 +000013358
13359 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13360 tzset();
13361 if (localtime(&groundhogday)->tm_hour != 11)
13362 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013363#if HAVE_TZNAME
13364 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13365 exit(1);
13366#endif
13367
13368#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013369 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13370 exit(1);
13371 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13372 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013373#endif
Brett Cannon18367812003-09-19 00:59:16 +000013374
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013375 exit(0);
13376}
13377
13378_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013379if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013380 ac_cv_working_tzset=yes
13381else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013382 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013383fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13385 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013386fi
13387
Martin v. Löwiseba40652007-08-30 20:10:57 +000013388fi
13389
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13391$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013392if test "$ac_cv_working_tzset" = yes
13393then
13394
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013395$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013396
13397fi
13398
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013399# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13401$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013402if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013403 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013404else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013406/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013407#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013408int
13409main ()
13410{
13411
13412struct stat st;
13413st.st_mtim.tv_nsec = 1;
13414
13415 ;
13416 return 0;
13417}
13418_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013420 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013422 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13425fi
13426
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13428$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013429if test "$ac_cv_stat_tv_nsec" = yes
13430then
13431
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013432$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013433
13434fi
13435
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013436# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13438$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013439if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013440 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013441else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013443/* end confdefs.h. */
13444#include <sys/stat.h>
13445int
13446main ()
13447{
13448
13449struct stat st;
13450st.st_mtimespec.tv_nsec = 1;
13451
13452 ;
13453 return 0;
13454}
13455_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013456if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013457 ac_cv_stat_tv_nsec2=yes
13458else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013459 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13462fi
13463
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13465$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013466if test "$ac_cv_stat_tv_nsec2" = yes
13467then
13468
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013469$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013470
13471fi
13472
Jack Jansen666b1e72001-10-31 12:11:48 +000013473# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13475$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013476if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013477 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013478else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013480/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013481#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013482int
13483main ()
13484{
Jack Jansen666b1e72001-10-31 12:11:48 +000013485
13486 int rtn;
13487 rtn = mvwdelch(0,0,0);
13488
Martin v. Löwis11437992002-04-12 09:54:03 +000013489 ;
13490 return 0;
13491}
13492_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013493if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013494 ac_cv_mvwdelch_is_expression=yes
13495else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013496 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013497fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13499fi
13500
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13502$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013503
13504if test "$ac_cv_mvwdelch_is_expression" = yes
13505then
Martin v. Löwis11437992002-04-12 09:54:03 +000013506
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013507$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013508
13509fi
13510
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13512$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013513if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013514 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013515else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013517/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013518#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013519int
13520main ()
13521{
Jack Jansen666b1e72001-10-31 12:11:48 +000013522
13523 WINDOW *w;
13524 w->_flags = 0;
13525
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 ;
13527 return 0;
13528}
13529_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013530if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013531 ac_cv_window_has_flags=yes
13532else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013533 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13536fi
13537
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13539$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013540
Jack Jansen666b1e72001-10-31 12:11:48 +000013541
13542if test "$ac_cv_window_has_flags" = yes
13543then
Martin v. Löwis11437992002-04-12 09:54:03 +000013544
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013545$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013546
13547fi
13548
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13550$as_echo_n "checking for is_term_resized... " >&6; }
13551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013552/* end confdefs.h. */
13553#include <curses.h>
13554int
13555main ()
13556{
13557void *x=is_term_resized
13558 ;
13559 return 0;
13560}
13561_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013562if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013563
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013564$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013565
Matthias Klosec511b472010-05-08 11:01:39 +000013566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013567$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013568else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13570$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013571
13572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13576$as_echo_n "checking for resize_term... " >&6; }
13577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013578/* end confdefs.h. */
13579#include <curses.h>
13580int
13581main ()
13582{
13583void *x=resize_term
13584 ;
13585 return 0;
13586}
13587_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013588if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013589
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013590$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013591
Matthias Klosec511b472010-05-08 11:01:39 +000013592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013593$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013594else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13596$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013597
13598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13600
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13602$as_echo_n "checking for resizeterm... " >&6; }
13603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013604/* end confdefs.h. */
13605#include <curses.h>
13606int
13607main ()
13608{
13609void *x=resizeterm
13610 ;
13611 return 0;
13612}
13613_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013614if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013615
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013616$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013617
Matthias Klosec511b472010-05-08 11:01:39 +000013618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013619$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013620else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13622$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013623
13624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13628$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013629
13630if test -r /dev/ptmx
13631then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13633$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013634
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013635$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013636
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013637else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13639$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013640fi
13641
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13643$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013644
13645if test -r /dev/ptc
13646then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13648$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013649
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013650$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013651
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013652else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13654$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013655fi
13656
Mark Dickinson82864d12009-11-15 16:18:58 +000013657if test "$have_long_long" = yes
13658then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13660$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013661 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013662 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013663else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013664 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013665 ac_cv_have_long_long_format=no
13666else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013668/* end confdefs.h. */
13669
13670 #include <stdio.h>
13671 #include <stddef.h>
13672 #include <string.h>
13673
13674 #ifdef HAVE_SYS_TYPES_H
13675 #include <sys/types.h>
13676 #endif
13677
13678 int main()
13679 {
13680 char buffer[256];
13681
13682 if (sprintf(buffer, "%lld", (long long)123) < 0)
13683 return 1;
13684 if (strcmp(buffer, "123"))
13685 return 1;
13686
13687 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13688 return 1;
13689 if (strcmp(buffer, "-123"))
13690 return 1;
13691
13692 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13693 return 1;
13694 if (strcmp(buffer, "123"))
13695 return 1;
13696
13697 return 0;
13698 }
13699
13700_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013701if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013702 ac_cv_have_long_long_format=yes
13703else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013704 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013705fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13707 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013708fi
13709
13710
Mark Dickinson82864d12009-11-15 16:18:58 +000013711fi
13712
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13714$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013715fi
13716
Mark Dickinson5ce84742009-12-31 20:48:04 +000013717if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013718then
13719
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013720$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013721
13722fi
13723
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013724if test $ac_sys_system = Darwin
13725then
13726 LIBS="$LIBS -framework CoreFoundation"
13727fi
13728
Mark Dickinson82864d12009-11-15 16:18:58 +000013729
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13731$as_echo_n "checking for %zd printf() format support... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013732if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013733 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013734else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013735 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013736 ac_cv_have_size_t_format="cross -- assuming yes"
13737
Brett Cannon09d12362006-05-11 05:11:33 +000013738else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013740/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013741
Brett Cannon09d12362006-05-11 05:11:33 +000013742#include <stdio.h>
13743#include <stddef.h>
13744#include <string.h>
13745
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013746#ifdef HAVE_SYS_TYPES_H
13747#include <sys/types.h>
13748#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013749
13750#ifdef HAVE_SSIZE_T
13751typedef ssize_t Py_ssize_t;
13752#elif SIZEOF_VOID_P == SIZEOF_LONG
13753typedef long Py_ssize_t;
13754#else
13755typedef int Py_ssize_t;
13756#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013757
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013758int main()
13759{
13760 char buffer[256];
13761
Brett Cannon09d12362006-05-11 05:11:33 +000013762 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13763 return 1;
13764
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013765 if (strcmp(buffer, "123"))
13766 return 1;
13767
13768 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13769 return 1;
13770
13771 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013772 return 1;
13773
13774 return 0;
13775}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013776
Brett Cannon09d12362006-05-11 05:11:33 +000013777_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013778if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013779 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013780else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013781 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13784 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013785fi
13786
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013787fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13789$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013790if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013791
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013792$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013793
13794fi
13795
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013796ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013797#ifdef HAVE_SYS_TYPES_H
13798#include <sys/types.h>
13799#endif
13800#ifdef HAVE_SYS_SOCKET_H
13801#include <sys/socket.h>
13802#endif
13803
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013804"
Charles-François Natali97781b02011-07-22 23:43:42 +020013805if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013806
Martin v. Löwis11437992002-04-12 09:54:03 +000013807else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013808
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013809$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013810
13811fi
13812
Michael W. Hudson54241132001-12-07 15:38:26 +000013813
Benjamin Peterson7497e912010-10-16 00:53:39 +000013814case $ac_sys_system in
13815AIX*)
13816
13817$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13818 ;;
13819esac
13820
13821
Michael W. Hudson54241132001-12-07 15:38:26 +000013822
13823
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013824for h in `(cd $srcdir;echo Python/thread_*.h)`
13825do
13826 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13827done
13828
Michael W. Hudson54241132001-12-07 15:38:26 +000013829
Neal Norwitzd24499d2005-12-18 21:36:39 +000013830SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13832$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013833for dir in $SRCDIRS; do
13834 if test ! -d $dir; then
13835 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013836 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013837done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13839$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013840
Guido van Rossum627b2d71993-12-24 10:39:16 +000013841# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000013842ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013843
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000013844ac_config_files="$ac_config_files Modules/ld_so_aix"
13845
Martin v. Löwis11437992002-04-12 09:54:03 +000013846cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013847# This file is a shell script that caches the results of configure
13848# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013849# scripts and configure runs, see configure's option --config-cache.
13850# It is not useful on other systems. If it contains results you don't
13851# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013852#
Martin v. Löwis11437992002-04-12 09:54:03 +000013853# config.status only pays attention to the cache file if you give it
13854# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013855#
Skip Montanaro6dead952003-09-25 14:50:04 +000013856# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013857# loading this file, other *unset* `ac_cv_foo' will be assigned the
13858# following values.
13859
13860_ACEOF
13861
Guido van Rossumf78abae1997-01-21 22:02:36 +000013862# The following way of writing the cache mishandles newlines in values,
13863# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013864# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013865# Ultrix sh set writes to stderr and can't be redirected directly,
13866# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013867(
13868 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13869 eval ac_val=\$$ac_var
13870 case $ac_val in #(
13871 *${as_nl}*)
13872 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013873 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13874$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013875 esac
13876 case $ac_var in #(
13877 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013878 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13879 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013880 esac ;;
13881 esac
13882 done
13883
Martin v. Löwis11437992002-04-12 09:54:03 +000013884 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000013885 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13886 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013887 # `set' does not quote correctly, so add quotes: double-quote
13888 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013889 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013890 "s/'/'\\\\''/g;
13891 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013892 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013893 *)
13894 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013895 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013896 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013897 esac |
13898 sort
13899) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013900 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000013901 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013902 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000013903 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13905 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000013906 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13907 :end' >>confcache
13908if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13909 if test -w "$cache_file"; then
Charles-François Natali97781b02011-07-22 23:43:42 +020013910 test "x$cache_file" != "x/dev/null" &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013911 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13912$as_echo "$as_me: updating cache $cache_file" >&6;}
Charles-François Natali97781b02011-07-22 23:43:42 +020013913 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013914 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013915 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13916$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013917 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013918fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013919rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013920
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013921test "x$prefix" = xNONE && prefix=$ac_default_prefix
13922# Let make expand exec_prefix.
13923test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013924
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013925DEFS=-DHAVE_CONFIG_H
13926
Skip Montanaro6dead952003-09-25 14:50:04 +000013927ac_libobjs=
13928ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013929U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013930for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13931 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013932 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013933 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000013934 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13935 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013936 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13937 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013938done
13939LIBOBJS=$ac_libobjs
13940
13941LTLIBOBJS=$ac_ltlibobjs
13942
13943
Martin v. Löwis11437992002-04-12 09:54:03 +000013944
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013945
Charles-François Natali97781b02011-07-22 23:43:42 +020013946: ${CONFIG_STATUS=./config.status}
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013947ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013948ac_clean_files_save=$ac_clean_files
13949ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013950{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13951$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13952as_write_fail=0
13953cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013954#! $SHELL
13955# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013956# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013957# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013958# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013959
Martin v. Löwis11437992002-04-12 09:54:03 +000013960debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013961ac_cs_recheck=false
13962ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013963
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013964SHELL=\${CONFIG_SHELL-$SHELL}
13965export SHELL
13966_ASEOF
13967cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13968## -------------------- ##
13969## M4sh Initialization. ##
13970## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013971
Martin v. Löwiseba40652007-08-30 20:10:57 +000013972# Be more Bourne compatible
13973DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013974if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013975 emulate sh
13976 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013977 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013978 # is contrary to our usage. Disable this feature.
13979 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013980 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000013981else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013982 case `(set -o) 2>/dev/null` in #(
13983 *posix*) :
13984 set -o posix ;; #(
13985 *) :
13986 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013987esac
Martin v. Löwis11437992002-04-12 09:54:03 +000013988fi
Michael W. Hudson54241132001-12-07 15:38:26 +000013989
Skip Montanaro6dead952003-09-25 14:50:04 +000013990
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013991as_nl='
13992'
13993export as_nl
13994# Printing a long string crashes Solaris 7 /usr/bin/printf.
13995as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13996as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13997as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13998# Prefer a ksh shell builtin over an external printf program on Solaris,
13999# but without wasting forks for bash or zsh.
14000if test -z "$BASH_VERSION$ZSH_VERSION" \
14001 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14002 as_echo='print -r --'
14003 as_echo_n='print -rn --'
14004elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14005 as_echo='printf %s\n'
14006 as_echo_n='printf %s'
14007else
14008 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14009 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14010 as_echo_n='/usr/ucb/echo -n'
14011 else
14012 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14013 as_echo_n_body='eval
14014 arg=$1;
14015 case $arg in #(
14016 *"$as_nl"*)
14017 expr "X$arg" : "X\\(.*\\)$as_nl";
14018 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14019 esac;
14020 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14021 '
14022 export as_echo_n_body
14023 as_echo_n='sh -c $as_echo_n_body as_echo'
14024 fi
14025 export as_echo_body
14026 as_echo='sh -c $as_echo_body as_echo'
14027fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014028
14029# The user is always right.
14030if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014031 PATH_SEPARATOR=:
14032 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14033 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14034 PATH_SEPARATOR=';'
14035 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014036fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014037
Martin v. Löwiseba40652007-08-30 20:10:57 +000014038
14039# IFS
14040# We need space, tab and new line, in precisely that order. Quoting is
14041# there to prevent editors from complaining about space-tab.
14042# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14043# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014044IFS=" "" $as_nl"
14045
14046# Find who we are. Look in the path if we contain no directory separator.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014047case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014048 *[\\/]* ) as_myself=$0 ;;
14049 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014050for as_dir in $PATH
14051do
14052 IFS=$as_save_IFS
14053 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014054 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14055 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014056IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014057
Martin v. Löwiseba40652007-08-30 20:10:57 +000014058 ;;
14059esac
14060# We did not find ourselves, most probably we were run as `sh COMMAND'
14061# in which case we are not to be found in the path.
14062if test "x$as_myself" = x; then
14063 as_myself=$0
14064fi
14065if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014066 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14067 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014068fi
14069
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014070# Unset variables that we do not need and which cause bugs (e.g. in
14071# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14072# suppresses any "Segmentation fault" message there. '((' could
14073# trigger a bug in pdksh 5.2.14.
14074for as_var in BASH_ENV ENV MAIL MAILPATH
14075do eval test x\${$as_var+set} = xset \
14076 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014077done
14078PS1='$ '
14079PS2='> '
14080PS4='+ '
14081
14082# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014083LC_ALL=C
14084export LC_ALL
14085LANGUAGE=C
14086export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014087
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014088# CDPATH.
14089(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14090
14091
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014092# as_fn_error STATUS ERROR [LINENO LOG_FD]
14093# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014094# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14095# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014096# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014097as_fn_error ()
14098{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014099 as_status=$1; test $as_status -eq 0 && as_status=1
14100 if test "$4"; then
14101 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14102 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014103 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014104 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014105 as_fn_exit $as_status
14106} # as_fn_error
14107
14108
14109# as_fn_set_status STATUS
14110# -----------------------
14111# Set $? to STATUS, without forking.
14112as_fn_set_status ()
14113{
14114 return $1
14115} # as_fn_set_status
14116
14117# as_fn_exit STATUS
14118# -----------------
14119# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14120as_fn_exit ()
14121{
14122 set +e
14123 as_fn_set_status $1
14124 exit $1
14125} # as_fn_exit
14126
14127# as_fn_unset VAR
14128# ---------------
14129# Portably unset VAR.
14130as_fn_unset ()
14131{
14132 { eval $1=; unset $1;}
14133}
14134as_unset=as_fn_unset
14135# as_fn_append VAR VALUE
14136# ----------------------
14137# Append the text in VALUE to the end of the definition contained in VAR. Take
14138# advantage of any shell optimizations that allow amortized linear growth over
14139# repeated appends, instead of the typical quadratic growth present in naive
14140# implementations.
14141if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14142 eval 'as_fn_append ()
14143 {
14144 eval $1+=\$2
14145 }'
14146else
14147 as_fn_append ()
14148 {
14149 eval $1=\$$1\$2
14150 }
14151fi # as_fn_append
14152
14153# as_fn_arith ARG...
14154# ------------------
14155# Perform arithmetic evaluation on the ARGs, and store the result in the
14156# global $as_val. Take advantage of shells that can avoid forks. The arguments
14157# must be portable across $(()) and expr.
14158if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14159 eval 'as_fn_arith ()
14160 {
14161 as_val=$(( $* ))
14162 }'
14163else
14164 as_fn_arith ()
14165 {
14166 as_val=`expr "$@" || test $? -eq 1`
14167 }
14168fi # as_fn_arith
14169
14170
Martin v. Löwiseba40652007-08-30 20:10:57 +000014171if expr a : '\(a\)' >/dev/null 2>&1 &&
14172 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14173 as_expr=expr
14174else
14175 as_expr=false
14176fi
14177
14178if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14179 as_basename=basename
14180else
14181 as_basename=false
14182fi
14183
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014184if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14185 as_dirname=dirname
14186else
14187 as_dirname=false
14188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014189
Martin v. Löwiseba40652007-08-30 20:10:57 +000014190as_me=`$as_basename -- "$0" ||
14191$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14192 X"$0" : 'X\(//\)$' \| \
14193 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014194$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014195 sed '/^.*\/\([^/][^/]*\)\/*$/{
14196 s//\1/
14197 q
14198 }
14199 /^X\/\(\/\/\)$/{
14200 s//\1/
14201 q
14202 }
14203 /^X\/\(\/\).*/{
14204 s//\1/
14205 q
14206 }
14207 s/.*/./; q'`
14208
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014209# Avoid depending upon Character Ranges.
14210as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14211as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14212as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14213as_cr_digits='0123456789'
14214as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014215
14216ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014217case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014218-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014219 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014220 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014221 xy) ECHO_C='\c';;
14222 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14223 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014224 esac;;
14225*)
14226 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014227esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014228
Martin v. Löwis11437992002-04-12 09:54:03 +000014229rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014230if test -d conf$$.dir; then
14231 rm -f conf$$.dir/conf$$.file
14232else
14233 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014234 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014235fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014236if (echo >conf$$.file) 2>/dev/null; then
14237 if ln -s conf$$.file conf$$ 2>/dev/null; then
14238 as_ln_s='ln -s'
14239 # ... but there are two gotchas:
14240 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14241 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14242 # In both cases, we have to default to `cp -p'.
14243 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14244 as_ln_s='cp -p'
14245 elif ln conf$$.file conf$$ 2>/dev/null; then
14246 as_ln_s=ln
14247 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014248 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014249 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014250else
14251 as_ln_s='cp -p'
14252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014253rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14254rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014255
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014256
14257# as_fn_mkdir_p
14258# -------------
14259# Create "$as_dir" as a directory, including parents if necessary.
14260as_fn_mkdir_p ()
14261{
14262
14263 case $as_dir in #(
14264 -*) as_dir=./$as_dir;;
14265 esac
14266 test -d "$as_dir" || eval $as_mkdir_p || {
14267 as_dirs=
14268 while :; do
14269 case $as_dir in #(
14270 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14271 *) as_qdir=$as_dir;;
14272 esac
14273 as_dirs="'$as_qdir' $as_dirs"
14274 as_dir=`$as_dirname -- "$as_dir" ||
14275$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14276 X"$as_dir" : 'X\(//\)[^/]' \| \
14277 X"$as_dir" : 'X\(//\)$' \| \
14278 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14279$as_echo X"$as_dir" |
14280 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14281 s//\1/
14282 q
14283 }
14284 /^X\(\/\/\)[^/].*/{
14285 s//\1/
14286 q
14287 }
14288 /^X\(\/\/\)$/{
14289 s//\1/
14290 q
14291 }
14292 /^X\(\/\).*/{
14293 s//\1/
14294 q
14295 }
14296 s/.*/./; q'`
14297 test -d "$as_dir" && break
14298 done
14299 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014300 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014301
14302
14303} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014304if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014305 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014306else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014307 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014308 as_mkdir_p=false
14309fi
14310
Martin v. Löwiseba40652007-08-30 20:10:57 +000014311if test -x / >/dev/null 2>&1; then
14312 as_test_x='test -x'
14313else
14314 if ls -dL / >/dev/null 2>&1; then
14315 as_ls_L_option=L
14316 else
14317 as_ls_L_option=
14318 fi
14319 as_test_x='
14320 eval sh -c '\''
14321 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014322 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000014323 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014324 case $1 in #(
14325 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014326 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014327 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014328 ???[sx]*):;;*)false;;esac;fi
14329 '\'' sh
14330 '
14331fi
14332as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014333
14334# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014335as_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 +000014336
14337# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014338as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014339
14340
Martin v. Löwis11437992002-04-12 09:54:03 +000014341exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014342## ----------------------------------- ##
14343## Main body of $CONFIG_STATUS script. ##
14344## ----------------------------------- ##
14345_ASEOF
14346test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014347
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014348cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14349# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014350# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014351# values after options handling.
14352ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014353This file was extended by python $as_me 2.7, which was
Charles-François Natali97781b02011-07-22 23:43:42 +020014354generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014355
14356 CONFIG_FILES = $CONFIG_FILES
14357 CONFIG_HEADERS = $CONFIG_HEADERS
14358 CONFIG_LINKS = $CONFIG_LINKS
14359 CONFIG_COMMANDS = $CONFIG_COMMANDS
14360 $ $0 $@
14361
Martin v. Löwiseba40652007-08-30 20:10:57 +000014362on `(hostname || uname -n) 2>/dev/null | sed 1q`
14363"
14364
Martin v. Löwis11437992002-04-12 09:54:03 +000014365_ACEOF
14366
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014367case $ac_config_files in *"
14368"*) set x $ac_config_files; shift; ac_config_files=$*;;
14369esac
14370
14371case $ac_config_headers in *"
14372"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14373esac
14374
14375
14376cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014377# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014378config_files="$ac_config_files"
14379config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014380
Martin v. Löwiseba40652007-08-30 20:10:57 +000014381_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014382
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014383cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014384ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014385\`$as_me' instantiates files and other configuration actions
14386from templates according to the current configuration. Unless the files
14387and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014388
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014389Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014390
14391 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014392 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014393 --config print configuration, then exit
14394 -q, --quiet, --silent
14395 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014396 -d, --debug don't remove temporary files
14397 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014398 --file=FILE[:TEMPLATE]
14399 instantiate the configuration file FILE
14400 --header=FILE[:TEMPLATE]
14401 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014402
14403Configuration files:
14404$config_files
14405
14406Configuration headers:
14407$config_headers
14408
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014409Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014410
Martin v. Löwiseba40652007-08-30 20:10:57 +000014411_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014412cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14413ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014414ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014415python config.status 2.7
Charles-François Natali97781b02011-07-22 23:43:42 +020014416configured by $0, generated by GNU Autoconf 2.67,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014417 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014418
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014419Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014420This config.status script is free software; the Free Software Foundation
14421gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014422
14423ac_pwd='$ac_pwd'
14424srcdir='$srcdir'
14425INSTALL='$INSTALL'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014426test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014427_ACEOF
14428
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014429cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14430# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014431ac_need_defaults=:
14432while test $# != 0
14433do
14434 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014435 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014436 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14437 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014438 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014439 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014440 --*=)
14441 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14442 ac_optarg=
14443 ac_shift=:
14444 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014445 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014446 ac_option=$1
14447 ac_optarg=$2
14448 ac_shift=shift
14449 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014450 esac
14451
Skip Montanaro6dead952003-09-25 14:50:04 +000014452 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014454 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14455 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014456 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014457 $as_echo "$ac_cs_version"; exit ;;
14458 --config | --confi | --conf | --con | --co | --c )
14459 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014460 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014461 debug=: ;;
14462 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014463 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014464 case $ac_optarg in
14465 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014466 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014467 esac
14468 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014469 ac_need_defaults=false;;
14470 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014471 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014472 case $ac_optarg in
14473 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14474 esac
14475 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014476 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014477 --he | --h)
14478 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014479 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014480Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014481 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014482 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014483 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14484 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14485 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014486
14487 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014488 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014489Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014490
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014491 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014492 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014493
14494 esac
14495 shift
14496done
14497
Skip Montanaro6dead952003-09-25 14:50:04 +000014498ac_configure_extra_args=
14499
14500if $ac_cs_silent; then
14501 exec 6>/dev/null
14502 ac_configure_extra_args="$ac_configure_extra_args --silent"
14503fi
14504
14505_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014506cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014507if \$ac_cs_recheck; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014508 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14509 shift
14510 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14511 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014512 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014513 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014514fi
14515
Martin v. Löwis11437992002-04-12 09:54:03 +000014516_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014517cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014518exec 5>>config.log
14519{
14520 echo
14521 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14522## Running $as_me. ##
14523_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014524 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014525} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014526
Martin v. Löwiseba40652007-08-30 20:10:57 +000014527_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014528cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014529_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014530
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014531cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014532
14533# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014534for ac_config_target in $ac_config_targets
14535do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014536 case $ac_config_target in
14537 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14538 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14539 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14540 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014541 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14542 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014543 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14544 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014545 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014546 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014547
Charles-François Natali97781b02011-07-22 23:43:42 +020014548 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014549 esac
14550done
14551
Martin v. Löwiseba40652007-08-30 20:10:57 +000014552
Martin v. Löwis11437992002-04-12 09:54:03 +000014553# If the user did not use the arguments to specify the items to instantiate,
14554# then the envvar interface is used. Set only those that are not.
14555# We use the long form for the default assignment because of an extremely
14556# bizarre bug on SunOS 4.1.3.
14557if $ac_need_defaults; then
14558 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14559 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14560fi
14561
Skip Montanaro6dead952003-09-25 14:50:04 +000014562# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014563# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014564# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014565# Hook for its removal unless debugging.
14566# Note that there is a small window in which the directory will not be cleaned:
14567# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014568$debug ||
14569{
Charles-François Natali97781b02011-07-22 23:43:42 +020014570 tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000014571 trap 'exit_status=$?
Charles-François Natali97781b02011-07-22 23:43:42 +020014572 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000014573' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014574 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014575}
Martin v. Löwis11437992002-04-12 09:54:03 +000014576# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014577
Martin v. Löwis11437992002-04-12 09:54:03 +000014578{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014579 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Charles-François Natali97781b02011-07-22 23:43:42 +020014580 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014581} ||
14582{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014583 tmp=./conf$$-$RANDOM
14584 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014585} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014586
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014587# Set up the scripts for CONFIG_FILES section.
14588# No need to generate them if there are no CONFIG_FILES.
14589# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014590if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014591
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014592
14593ac_cr=`echo X | tr X '\015'`
14594# On cygwin, bash can eat \r inside `` if the user requested igncr.
14595# But we know of no other shell where ac_cr would be empty at this
14596# point, so we can use a bashism as a fallback.
14597if test "x$ac_cr" = x; then
14598 eval ac_cr=\$\'\\r\'
14599fi
14600ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14601if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014602 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014603else
14604 ac_cs_awk_cr=$ac_cr
14605fi
14606
Charles-François Natali97781b02011-07-22 23:43:42 +020014607echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014608_ACEOF
14609
Martin v. Löwiseba40652007-08-30 20:10:57 +000014610
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014611{
14612 echo "cat >conf$$subs.awk <<_ACEOF" &&
14613 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14614 echo "_ACEOF"
14615} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014616 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14617ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014618ac_delim='%!_!# '
14619for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014620 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014621 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014622
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014623 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14624 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014625 break
14626 elif $ac_last_try; then
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 else
14629 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014630 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014631done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014632rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014633
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014634cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Charles-François Natali97781b02011-07-22 23:43:42 +020014635cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014636_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014637sed -n '
14638h
14639s/^/S["/; s/!.*/"]=/
14640p
14641g
14642s/^[^!]*!//
14643:repl
14644t repl
14645s/'"$ac_delim"'$//
14646t delim
14647:nl
14648h
14649s/\(.\{148\}\)..*/\1/
14650t more1
14651s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14652p
14653n
14654b repl
14655:more1
14656s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14657p
14658g
14659s/.\{148\}//
14660t nl
14661:delim
14662h
14663s/\(.\{148\}\)..*/\1/
14664t more2
14665s/["\\]/\\&/g; s/^/"/; s/$/"/
14666p
14667b
14668:more2
14669s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14670p
14671g
14672s/.\{148\}//
14673t delim
14674' <conf$$subs.awk | sed '
14675/^[^""]/{
14676 N
14677 s/\n//
14678}
14679' >>$CONFIG_STATUS || ac_write_fail=1
14680rm -f conf$$subs.awk
14681cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14682_ACAWK
Charles-François Natali97781b02011-07-22 23:43:42 +020014683cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014684 for (key in S) S_is_set[key] = 1
14685 FS = ""
14686
14687}
14688{
14689 line = $ 0
14690 nfields = split(line, field, "@")
14691 substed = 0
14692 len = length(field[1])
14693 for (i = 2; i < nfields; i++) {
14694 key = field[i]
14695 keylen = length(key)
14696 if (S_is_set[key]) {
14697 value = S[key]
14698 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14699 len += length(value) + length(field[++i])
14700 substed = 1
14701 } else
14702 len += 1 + keylen
14703 }
14704
14705 print line
14706}
14707
14708_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014709_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014710cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14711if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14712 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14713else
14714 cat
Charles-François Natali97781b02011-07-22 23:43:42 +020014715fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014716 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014717_ACEOF
14718
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014719# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14720# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000014721# trailing colons and then remove the whole line if VPATH becomes empty
14722# (actually we leave an empty line to preserve line numbers).
14723if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014724 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14725h
14726s///
14727s/^/:/
14728s/[ ]*$/:/
14729s/:\$(srcdir):/:/g
14730s/:\${srcdir}:/:/g
14731s/:@srcdir@:/:/g
14732s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014733s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014734x
14735s/\(=[ ]*\).*/\1/
14736G
14737s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014738s/^[^=]*=[ ]*$//
14739}'
14740fi
14741
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014742cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014743fi # test -n "$CONFIG_FILES"
14744
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014745# Set up the scripts for CONFIG_HEADERS section.
14746# No need to generate them if there are no CONFIG_HEADERS.
14747# This happens for instance with `./config.status Makefile'.
14748if test -n "$CONFIG_HEADERS"; then
Charles-François Natali97781b02011-07-22 23:43:42 +020014749cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014750BEGIN {
14751_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014752
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014753# Transform confdefs.h into an awk script `defines.awk', embedded as
14754# here-document in config.status, that substitutes the proper values into
14755# config.h.in to produce config.h.
14756
14757# Create a delimiter string that does not exist in confdefs.h, to ease
14758# handling of long lines.
14759ac_delim='%!_!# '
14760for ac_last_try in false false :; do
Charles-François Natali97781b02011-07-22 23:43:42 +020014761 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14762 if test -z "$ac_t"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014763 break
14764 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014765 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014766 else
14767 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14768 fi
14769done
14770
14771# For the awk script, D is an array of macro values keyed by name,
14772# likewise P contains macro parameters if any. Preserve backslash
14773# newline sequences.
14774
14775ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14776sed -n '
14777s/.\{148\}/&'"$ac_delim"'/g
14778t rset
14779:rset
14780s/^[ ]*#[ ]*define[ ][ ]*/ /
14781t def
14782d
14783:def
14784s/\\$//
14785t bsnl
14786s/["\\]/\\&/g
14787s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14788D["\1"]=" \3"/p
14789s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14790d
14791:bsnl
14792s/["\\]/\\&/g
14793s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14794D["\1"]=" \3\\\\\\n"\\/p
14795t cont
14796s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14797t cont
14798d
14799:cont
14800n
14801s/.\{148\}/&'"$ac_delim"'/g
14802t clear
14803:clear
14804s/\\$//
14805t bsnlc
14806s/["\\]/\\&/g; s/^/"/; s/$/"/p
14807d
14808:bsnlc
14809s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14810b cont
14811' <confdefs.h | sed '
14812s/'"$ac_delim"'/"\\\
14813"/g' >>$CONFIG_STATUS || ac_write_fail=1
14814
14815cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14816 for (key in D) D_is_set[key] = 1
14817 FS = ""
14818}
14819/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14820 line = \$ 0
14821 split(line, arg, " ")
14822 if (arg[1] == "#") {
14823 defundef = arg[2]
14824 mac1 = arg[3]
14825 } else {
14826 defundef = substr(arg[1], 2)
14827 mac1 = arg[2]
14828 }
14829 split(mac1, mac2, "(") #)
14830 macro = mac2[1]
14831 prefix = substr(line, 1, index(line, defundef) - 1)
14832 if (D_is_set[macro]) {
14833 # Preserve the white space surrounding the "#".
14834 print prefix "define", macro P[macro] D[macro]
14835 next
14836 } else {
14837 # Replace #undef with comments. This is necessary, for example,
14838 # in the case of _POSIX_SOURCE, which is predefined and required
14839 # on some systems where configure will not decide to define it.
14840 if (defundef == "undef") {
14841 print "/*", prefix defundef, macro, "*/"
14842 next
14843 }
14844 }
14845}
14846{ print }
14847_ACAWK
14848_ACEOF
14849cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014850 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014851fi # test -n "$CONFIG_HEADERS"
14852
14853
14854eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14855shift
14856for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000014857do
14858 case $ac_tag in
14859 :[FHLC]) ac_mode=$ac_tag; continue;;
14860 esac
14861 case $ac_mode$ac_tag in
14862 :[FHL]*:*);;
Charles-François Natali97781b02011-07-22 23:43:42 +020014863 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014864 :[FH]-) ac_tag=-:-;;
14865 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14866 esac
14867 ac_save_IFS=$IFS
14868 IFS=:
14869 set x $ac_tag
14870 IFS=$ac_save_IFS
14871 shift
14872 ac_file=$1
14873 shift
14874
14875 case $ac_mode in
14876 :L) ac_source=$1;;
14877 :[FH])
14878 ac_file_inputs=
14879 for ac_f
14880 do
14881 case $ac_f in
Charles-François Natali97781b02011-07-22 23:43:42 +020014882 -) ac_f="$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014883 *) # Look for the file first in the build tree, then in the source tree
14884 # (if the path is not absolute). The absolute path cannot be DOS-style,
14885 # because $ac_f cannot contain `:'.
14886 test -f "$ac_f" ||
14887 case $ac_f in
14888 [\\/$]*) false;;
14889 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14890 esac ||
Charles-François Natali97781b02011-07-22 23:43:42 +020014891 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014892 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014893 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14894 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014895 done
14896
14897 # Let's still pretend it is `configure' which instantiates (i.e., don't
14898 # use $as_me), people would be surprised to read:
14899 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014900 configure_input='Generated from '`
14901 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14902 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014903 if test x"$ac_file" != x-; then
14904 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014905 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14906$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014907 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014908 # Neutralize special characters interpreted by sed in replacement strings.
14909 case $configure_input in #(
14910 *\&* | *\|* | *\\* )
14911 ac_sed_conf_input=`$as_echo "$configure_input" |
14912 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14913 *) ac_sed_conf_input=$configure_input;;
14914 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014915
14916 case $ac_tag in
Charles-François Natali97781b02011-07-22 23:43:42 +020014917 *:-:* | *:-) cat >"$tmp/stdin" \
14918 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014919 esac
14920 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014921 esac
14922
Martin v. Löwiseba40652007-08-30 20:10:57 +000014923 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014924$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014925 X"$ac_file" : 'X\(//\)[^/]' \| \
14926 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000014927 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014928$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014929 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14930 s//\1/
14931 q
14932 }
14933 /^X\(\/\/\)[^/].*/{
14934 s//\1/
14935 q
14936 }
14937 /^X\(\/\/\)$/{
14938 s//\1/
14939 q
14940 }
14941 /^X\(\/\).*/{
14942 s//\1/
14943 q
14944 }
14945 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014946 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014947 ac_builddir=.
14948
Martin v. Löwiseba40652007-08-30 20:10:57 +000014949case "$ac_dir" in
14950.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14951*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014952 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014953 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014954 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014955 case $ac_top_builddir_sub in
14956 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14957 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14958 esac ;;
14959esac
14960ac_abs_top_builddir=$ac_pwd
14961ac_abs_builddir=$ac_pwd$ac_dir_suffix
14962# for backward compatibility:
14963ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014964
14965case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014966 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014967 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014968 ac_top_srcdir=$ac_top_builddir_sub
14969 ac_abs_top_srcdir=$ac_pwd ;;
14970 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014971 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014972 ac_top_srcdir=$srcdir
14973 ac_abs_top_srcdir=$srcdir ;;
14974 *) # Relative name.
14975 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14976 ac_top_srcdir=$ac_top_build_prefix$srcdir
14977 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014978esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014979ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014980
Martin v. Löwis11437992002-04-12 09:54:03 +000014981
Martin v. Löwiseba40652007-08-30 20:10:57 +000014982 case $ac_mode in
14983 :F)
14984 #
14985 # CONFIG_FILE
14986 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014987
14988 case $INSTALL in
14989 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014990 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014991 esac
Brett Cannon19fab762007-06-02 03:02:29 +000014992_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014993
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014994cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014995# If the template does not know about datarootdir, expand it.
14996# FIXME: This hack should be removed a few years after 2.60.
14997ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014998ac_sed_dataroot='
14999/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015000 p
15001 q
15002}
15003/@datadir@/p
15004/@docdir@/p
15005/@infodir@/p
15006/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015007/@mandir@/p'
15008case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015009*datarootdir*) ac_datarootdir_seen=yes;;
15010*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015011 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15012$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015013_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015014cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015015 ac_datarootdir_hack='
15016 s&@datadir@&$datadir&g
15017 s&@docdir@&$docdir&g
15018 s&@infodir@&$infodir&g
15019 s&@localedir@&$localedir&g
15020 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015021 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015022esac
15023_ACEOF
15024
15025# Neutralize VPATH when `$srcdir' = `.'.
15026# Shell code in configure.ac might set extrasub.
15027# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015028cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15029ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015030$extrasub
15031_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015032cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015033:t
15034/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015035s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015036s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015037s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015038s&@srcdir@&$ac_srcdir&;t t
15039s&@abs_srcdir@&$ac_abs_srcdir&;t t
15040s&@top_srcdir@&$ac_top_srcdir&;t t
15041s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15042s&@builddir@&$ac_builddir&;t t
15043s&@abs_builddir@&$ac_abs_builddir&;t t
15044s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15045s&@INSTALL@&$ac_INSTALL&;t t
15046$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015047"
Charles-François Natali97781b02011-07-22 23:43:42 +020015048eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15049 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015050
Martin v. Löwiseba40652007-08-30 20:10:57 +000015051test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Charles-François Natali97781b02011-07-22 23:43:42 +020015052 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15053 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015054 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015055which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015056$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015057which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015058
Charles-François Natali97781b02011-07-22 23:43:42 +020015059 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015060 case $ac_file in
Charles-François Natali97781b02011-07-22 23:43:42 +020015061 -) cat "$tmp/out" && rm -f "$tmp/out";;
15062 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015063 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015064 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015065 ;;
15066 :H)
15067 #
15068 # CONFIG_HEADER
15069 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015070 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015071 {
15072 $as_echo "/* $configure_input */" \
Charles-François Natali97781b02011-07-22 23:43:42 +020015073 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15074 } >"$tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015075 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Charles-François Natali97781b02011-07-22 23:43:42 +020015076 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015077 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15078$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015079 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015080 rm -f "$ac_file"
Charles-François Natali97781b02011-07-22 23:43:42 +020015081 mv "$tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015082 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015083 fi
15084 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015085 $as_echo "/* $configure_input */" \
Charles-François Natali97781b02011-07-22 23:43:42 +020015086 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015087 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015088 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015089 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015090
Martin v. Löwiseba40652007-08-30 20:10:57 +000015091
15092 esac
15093
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015094
15095 case $ac_file$ac_mode in
15096 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15097
15098 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015099done # for ac_tag
15100
Guido van Rossum627b2d71993-12-24 10:39:16 +000015101
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015102as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015103_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015104ac_clean_files=$ac_clean_files_save
15105
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015106test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015107 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015108
Martin v. Löwis11437992002-04-12 09:54:03 +000015109
15110# configure is writing to config.log, and then calls config.status.
15111# config.status does its own redirection, appending to config.log.
15112# Unfortunately, on DOS this fails, as config.log is still kept open
15113# by configure, so config.status won't be able to write to it; its
15114# output is simply discarded. So we exec the FD to /dev/null,
15115# effectively closing config.log, so it can be properly (re)opened and
15116# appended to by config.status. When coming back to configure, we
15117# need to make the FD available again.
15118if test "$no_create" != yes; then
15119 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015120 ac_config_status_args=
15121 test "$silent" = yes &&
15122 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015123 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015124 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015125 exec 5>>config.log
15126 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15127 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015128 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015129fi
15130if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15131 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15132$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015133fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015134
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015135
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015136echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015137if test ! -f Modules/Setup
15138then
15139 cp $srcdir/Modules/Setup.dist Modules/Setup
15140fi
15141
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015142echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015143if test ! -f Modules/Setup.local
15144then
15145 echo "# Edit this file for local setup changes" >Modules/Setup.local
15146fi
15147
15148echo "creating Makefile"
15149$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15150 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015151 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015152
15153case $ac_sys_system in
15154BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015155 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015156
15157 Support for BeOS is deprecated as of Python 2.6.
15158 See PEP 11 for the gory details.
15159 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015160$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015161
15162 Support for BeOS is deprecated as of Python 2.6.
15163 See PEP 11 for the gory details.
15164 " >&2;}
15165 ;;
15166*) ;;
15167esac
15168
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015169mv config.c Modules