blob: f355e447f14104d292a41ac37e7f7a4a8a94108c [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
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002998 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002999 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003000 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003001 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003002 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003003 esac
3004fi
Guido van Rossum91922671997-10-09 20:24:13 +00003005
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003006# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3007# disable features if it is defined, without any means to access these
3008# features as extensions. For these systems, we skip the definition of
3009# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3010# some feature, make sure there is no alternative way to access this
3011# feature. Also, when using wildcards, make sure you have verified the
3012# need for not defining _XOPEN_SOURCE on all systems matching the
3013# wildcard, and that the wildcard does not include future systems
3014# (which may remove their limitations).
3015case $ac_sys_system/$ac_sys_release in
3016 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3017 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003018 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003019 # In addition, Stefan Krah confirms that issue #1244610 exists through
3020 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003021 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003022 define_xopen_source=no
3023 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3024 # also defined. This can be overridden by defining _BSD_SOURCE
3025 # As this has a different meaning on Linux, only define it on OpenBSD
3026
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003027$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003028
3029 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003030 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003031 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3032 # also defined. This can be overridden by defining _BSD_SOURCE
3033 # As this has a different meaning on Linux, only define it on OpenBSD
3034
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003035$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003036
3037 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003038 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3039 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3040 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003041 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 +00003042 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003043 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3044 # request to enable features supported by the standard as a request
3045 # to disable features not supported by the standard. The best way
3046 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3047 # entirely and define __EXTENSIONS__ instead.
3048 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003049 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003050 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3051 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003052 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003053 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003054 define_xopen_source=no;;
3055 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003056 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003057 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003058 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003059 # On FreeBSD 4, the math functions C89 does not cover are never defined
3060 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3061 FreeBSD/4.*)
3062 define_xopen_source=no;;
3063 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3064 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3065 # identifies itself as Darwin/7.*
3066 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3067 # disables platform specific features beyond repair.
3068 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3069 # has no effect, don't bother defining them
3070 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003071 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003072 Darwin/1[0-9].*)
3073 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003074 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3075 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3076 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003077 AIX/4)
3078 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003079 AIX/5)
3080 if test `uname -r` -eq 1; then
3081 define_xopen_source=no
3082 fi
3083 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003084 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3085 # defining NI_NUMERICHOST.
3086 QNX/6.3.2)
3087 define_xopen_source=no
3088 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003089
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003090esac
3091
3092if test $define_xopen_source = yes
3093then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003094
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003095$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003096
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003097
3098 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3099 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3100 # several APIs are not declared. Since this is also needed in some
3101 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003102
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003103$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003104
3105
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003106
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003107$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003108
3109
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003110fi
3111
Guido van Rossum91922671997-10-09 20:24:13 +00003112#
3113# SGI compilers allow the specification of the both the ABI and the
3114# ISA on the command line. Depending on the values of these switches,
3115# different and often incompatable code will be generated.
3116#
3117# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3118# thus supply support for various ABI/ISA combinations. The MACHDEP
3119# variable is also adjusted.
3120#
3121
3122if test ! -z "$SGI_ABI"
3123then
3124 CC="cc $SGI_ABI"
3125 LDFLAGS="$SGI_ABI $LDFLAGS"
3126 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3127fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3129$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003130
Jack Jansen83f898c2002-12-30 22:23:40 +00003131# And add extra plat-mac for darwin
3132
Jack Jansen7b59b422003-03-17 15:44:10 +00003133
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3135$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003136if test -z "$EXTRAPLATDIR"
3137then
3138 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003139 darwin)
3140 EXTRAPLATDIR="\$(PLATMACDIRS)"
3141 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3142 ;;
3143 *)
3144 EXTRAPLATDIR=""
3145 EXTRAMACHDEPPATH=""
3146 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003147 esac
3148fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3150$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003151
Jack Jansen6b08a402004-06-03 12:41:45 +00003152# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3153# it may influence the way we can build extensions, so distutils
3154# needs to check it
3155
Ronald Oussoren988117f2006-04-29 11:31:35 +00003156
Jack Jansen6b08a402004-06-03 12:41:45 +00003157CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003158EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003159
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3161$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003162ac_sys_machine=`uname -m`
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3164$as_echo "$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003165
Guido van Rossum627b2d71993-12-24 10:39:16 +00003166# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003167
3168# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3169# for debug/optimization stuff. BASECFLAGS is for flags that are required
3170# just to get things to compile and link. Users are free to override OPT
3171# when running configure or make. The build should not break if they do.
3172# BASECFLAGS should generally not be messed with, however.
3173
3174# XXX shouldn't some/most/all of this code be merged with the stuff later
3175# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3177$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003178
Martin v. Löwiseba40652007-08-30 20:10:57 +00003179# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003180if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003181 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003182 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003183 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003184 without_gcc=yes;;
3185 yes) CC=gcc
3186 without_gcc=no;;
3187 *) CC=$withval
3188 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003189 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003190else
Martin v. Löwis11437992002-04-12 09:54:03 +00003191
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003192 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003193 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003194 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003195 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003196 case $BE_HOST_CPU in
3197 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003198 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003199 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003200 BASECFLAGS="$BASECFLAGS -export pragma"
3201 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003202 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003203 ;;
3204 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003205 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003206 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003207 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003208 ;;
3209 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003210 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003211 ;;
3212 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003213 AR="\$(srcdir)/Modules/ar_beos"
3214 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003215 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003216 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003217 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003218fi
3219
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3221$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003222
Guido van Rossum8b131c51995-03-09 14:10:13 +00003223# If the user switches compilers, we can't believe the cache
3224if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3225then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003226 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003227(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003228fi
3229
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003230# If the user set CFLAGS, use this instead of the automatically
3231# determined setting
3232preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003233ac_ext=c
3234ac_cpp='$CPP $CPPFLAGS'
3235ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3236ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3237ac_compiler_gnu=$ac_cv_c_compiler_gnu
3238if test -n "$ac_tool_prefix"; then
3239 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3240set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3242$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003243if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003244 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003245else
3246 if test -n "$CC"; then
3247 ac_cv_prog_CC="$CC" # Let the user override the test.
3248else
Martin v. Löwis11437992002-04-12 09:54:03 +00003249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3250for as_dir in $PATH
3251do
3252 IFS=$as_save_IFS
3253 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003254 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003255 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 +00003256 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003257 $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 +00003258 break 2
3259 fi
3260done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003261 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003262IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003263
Jack Jansendd19cf82001-12-06 22:36:17 +00003264fi
3265fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003266CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003267if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3269$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003270else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3272$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003273fi
3274
Martin v. Löwiseba40652007-08-30 20:10:57 +00003275
Martin v. Löwis11437992002-04-12 09:54:03 +00003276fi
3277if test -z "$ac_cv_prog_CC"; then
3278 ac_ct_CC=$CC
3279 # Extract the first word of "gcc", so it can be a program name with args.
3280set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3282$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003283if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003284 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003285else
3286 if test -n "$ac_ct_CC"; then
3287 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3288else
3289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3290for as_dir in $PATH
3291do
3292 IFS=$as_save_IFS
3293 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003294 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003295 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 +00003296 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003297 $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 +00003298 break 2
3299 fi
3300done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003301 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003302IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003303
3304fi
3305fi
3306ac_ct_CC=$ac_cv_prog_ac_ct_CC
3307if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3309$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003310else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3312$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003313fi
3314
Martin v. Löwiseba40652007-08-30 20:10:57 +00003315 if test "x$ac_ct_CC" = x; then
3316 CC=""
3317 else
3318 case $cross_compiling:$ac_tool_warned in
3319yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003320{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3321$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003322ac_tool_warned=yes ;;
3323esac
3324 CC=$ac_ct_CC
3325 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003326else
3327 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003328fi
3329
Jack Jansendd19cf82001-12-06 22:36:17 +00003330if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003331 if test -n "$ac_tool_prefix"; then
3332 # 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 +00003333set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3335$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003336if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003337 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003338else
3339 if test -n "$CC"; then
3340 ac_cv_prog_CC="$CC" # Let the user override the test.
3341else
Martin v. Löwis11437992002-04-12 09:54:03 +00003342as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3343for as_dir in $PATH
3344do
3345 IFS=$as_save_IFS
3346 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003347 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003348 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 +00003349 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003350 $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 +00003351 break 2
3352 fi
3353done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003354 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003355IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003356
3357fi
3358fi
3359CC=$ac_cv_prog_CC
3360if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3362$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003363else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3365$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003366fi
3367
Martin v. Löwiseba40652007-08-30 20:10:57 +00003368
Martin v. Löwis11437992002-04-12 09:54:03 +00003369 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003370fi
3371if test -z "$CC"; then
3372 # Extract the first word of "cc", so it can be a program name with args.
3373set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3375$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003376if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003377 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003378else
3379 if test -n "$CC"; then
3380 ac_cv_prog_CC="$CC" # Let the user override the test.
3381else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003382 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3384for as_dir in $PATH
3385do
3386 IFS=$as_save_IFS
3387 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003388 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003389 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 +00003390 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3391 ac_prog_rejected=yes
3392 continue
3393 fi
3394 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003395 $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 +00003396 break 2
3397 fi
3398done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003399 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003400IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003401
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003402if test $ac_prog_rejected = yes; then
3403 # We found a bogon in the path, so make sure we never use it.
3404 set dummy $ac_cv_prog_CC
3405 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003406 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003407 # We chose a different compiler from the bogus one.
3408 # However, it has the same basename, so the bogon will be chosen
3409 # first if we set CC to just the basename; use the full file name.
3410 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003411 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003412 fi
3413fi
3414fi
3415fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003416CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003417if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3419$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003420else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3422$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003423fi
3424
Martin v. Löwiseba40652007-08-30 20:10:57 +00003425
Martin v. Löwis11437992002-04-12 09:54:03 +00003426fi
3427if test -z "$CC"; then
3428 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003429 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003430 do
3431 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3432set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3434$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003435if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003436 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003437else
3438 if test -n "$CC"; then
3439 ac_cv_prog_CC="$CC" # Let the user override the test.
3440else
Martin v. Löwis11437992002-04-12 09:54:03 +00003441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3442for as_dir in $PATH
3443do
3444 IFS=$as_save_IFS
3445 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003446 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003447 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 +00003448 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003449 $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 +00003450 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003451 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003452done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003453 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003454IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003455
3456fi
3457fi
3458CC=$ac_cv_prog_CC
3459if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3461$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003462else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3464$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003465fi
3466
Martin v. Löwiseba40652007-08-30 20:10:57 +00003467
Martin v. Löwis11437992002-04-12 09:54:03 +00003468 test -n "$CC" && break
3469 done
3470fi
3471if test -z "$CC"; then
3472 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003473 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003474do
3475 # Extract the first word of "$ac_prog", so it can be a program name with args.
3476set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3478$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003479if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003480 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003481else
3482 if test -n "$ac_ct_CC"; then
3483 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3484else
3485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3486for as_dir in $PATH
3487do
3488 IFS=$as_save_IFS
3489 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003490 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003491 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 +00003492 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003493 $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 +00003494 break 2
3495 fi
3496done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003497 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003498IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003499
Martin v. Löwis11437992002-04-12 09:54:03 +00003500fi
3501fi
3502ac_ct_CC=$ac_cv_prog_ac_ct_CC
3503if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3505$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003506else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3508$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003509fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003510
Martin v. Löwiseba40652007-08-30 20:10:57 +00003511
Martin v. Löwis11437992002-04-12 09:54:03 +00003512 test -n "$ac_ct_CC" && break
3513done
Michael W. Hudson54241132001-12-07 15:38:26 +00003514
Martin v. Löwiseba40652007-08-30 20:10:57 +00003515 if test "x$ac_ct_CC" = x; then
3516 CC=""
3517 else
3518 case $cross_compiling:$ac_tool_warned in
3519yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003520{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3521$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003522ac_tool_warned=yes ;;
3523esac
3524 CC=$ac_ct_CC
3525 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003526fi
3527
3528fi
3529
3530
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003531test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3532$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003533as_fn_error $? "no acceptable C compiler found in \$PATH
Charles-François Natali97781b02011-07-22 23:43:42 +02003534See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003535
3536# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003537$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3538set X $ac_compile
3539ac_compiler=$2
3540for ac_option in --version -v -V -qversion; do
3541 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003542case "(($ac_try" in
3543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3544 *) ac_try_echo=$ac_try;;
3545esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003546eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3547$as_echo "$ac_try_echo"; } >&5
3548 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003549 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003550 if test -s conftest.err; then
3551 sed '10a\
3552... rest of stderr output deleted ...
3553 10q' conftest.err >conftest.er1
3554 cat conftest.er1 >&5
3555 fi
3556 rm -f conftest.er1 conftest.err
3557 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3558 test $ac_status = 0; }
3559done
Martin v. Löwis11437992002-04-12 09:54:03 +00003560
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003562/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003563
Martin v. Löwis11437992002-04-12 09:54:03 +00003564int
3565main ()
3566{
3567
3568 ;
3569 return 0;
3570}
3571_ACEOF
3572ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003573ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003574# Try to create an executable without -o first, disregard a.out.
3575# It will help us diagnose broken compilers, and finding out an intuition
3576# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3578$as_echo_n "checking whether the C compiler works... " >&6; }
3579ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3580
3581# The possible output files:
3582ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3583
Martin v. Löwiseba40652007-08-30 20:10:57 +00003584ac_rmfiles=
3585for ac_file in $ac_files
3586do
3587 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003588 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003589 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3590 esac
3591done
3592rm -f $ac_rmfiles
3593
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003594if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003595case "(($ac_try" in
3596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3597 *) ac_try_echo=$ac_try;;
3598esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003599eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3600$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003601 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003602 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003603 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3604 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003605 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3606# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3607# in a Makefile. We should not override ac_cv_exeext if it was cached,
3608# so that the user can short-circuit this test for compilers unknown to
3609# Autoconf.
3610for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003611do
3612 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003614 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003615 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003616 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003617 # We found the default executable, but exeext='' is most
3618 # certainly right.
3619 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003620 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003621 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003622 then :; else
3623 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3624 fi
3625 # We set ac_cv_exeext here because the later test for it is not
3626 # safe: cross compilers may not add the suffix if given an `-o'
3627 # argument, so we may need to know it at that point already.
3628 # Even if this section looks crufty: it has the advantage of
3629 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003630 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003631 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003632 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003633 esac
3634done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003635test "$ac_cv_exeext" = no && ac_cv_exeext=
3636
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003637else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003638 ac_file=''
3639fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003640if test -z "$ac_file"; then :
3641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
3643$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003644sed 's/^/| /' conftest.$ac_ext >&5
3645
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003646{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3647$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003648as_fn_error 77 "C compiler cannot create executables
Charles-François Natali97781b02011-07-22 23:43:42 +02003649See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003650else
3651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3652$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003653fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3655$as_echo_n "checking for C compiler default output file name... " >&6; }
3656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3657$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003658ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003659
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003660rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003661ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3663$as_echo_n "checking for suffix of executables... " >&6; }
3664if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003665case "(($ac_try" in
3666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3667 *) ac_try_echo=$ac_try;;
3668esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003669eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3670$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003671 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003672 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003673 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3674 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003675 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3676# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3677# work properly (i.e., refer to `conftest.exe'), while it won't with
3678# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003679for ac_file in conftest.exe conftest conftest.*; do
3680 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003681 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003682 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003684 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 * ) break;;
3686 esac
3687done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003688else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003689 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003691as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Charles-François Natali97781b02011-07-22 23:43:42 +02003692See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003693fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003694rm -f conftest conftest$ac_cv_exeext
3695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3696$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003697
3698rm -f conftest.$ac_ext
3699EXEEXT=$ac_cv_exeext
3700ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3702/* end confdefs.h. */
3703#include <stdio.h>
3704int
3705main ()
3706{
3707FILE *f = fopen ("conftest.out", "w");
3708 return ferror (f) || fclose (f) != 0;
3709
3710 ;
3711 return 0;
3712}
Skip Montanaro6dead952003-09-25 14:50:04 +00003713_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003714ac_clean_files="$ac_clean_files conftest.out"
3715# Check that the compiler produces executables we can run. If not, either
3716# the compiler is broken, or we cross compile.
3717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3718$as_echo_n "checking whether we are cross compiling... " >&6; }
3719if test "$cross_compiling" != yes; then
3720 { { ac_try="$ac_link"
3721case "(($ac_try" in
3722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3723 *) ac_try_echo=$ac_try;;
3724esac
3725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3726$as_echo "$ac_try_echo"; } >&5
3727 (eval "$ac_link") 2>&5
3728 ac_status=$?
3729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3730 test $ac_status = 0; }
3731 if { ac_try='./conftest$ac_cv_exeext'
3732 { { case "(($ac_try" in
3733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3734 *) ac_try_echo=$ac_try;;
3735esac
3736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3737$as_echo "$ac_try_echo"; } >&5
3738 (eval "$ac_try") 2>&5
3739 ac_status=$?
3740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3741 test $ac_status = 0; }; }; then
3742 cross_compiling=no
3743 else
3744 if test "$cross_compiling" = maybe; then
3745 cross_compiling=yes
3746 else
3747 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003749as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003750If you meant to cross compile, use \`--host'.
Charles-François Natali97781b02011-07-22 23:43:42 +02003751See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003752 fi
3753 fi
3754fi
3755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3756$as_echo "$cross_compiling" >&6; }
3757
3758rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3759ac_clean_files=$ac_clean_files_save
3760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3761$as_echo_n "checking for suffix of object files... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003762if test "${ac_cv_objext+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003763 $as_echo_n "(cached) " >&6
3764else
3765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003767
Martin v. Löwis11437992002-04-12 09:54:03 +00003768int
3769main ()
3770{
3771
3772 ;
3773 return 0;
3774}
3775_ACEOF
3776rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003777if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003778case "(($ac_try" in
3779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3780 *) ac_try_echo=$ac_try;;
3781esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003782eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3783$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003784 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003785 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003786 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3787 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003788 for ac_file in conftest.o conftest.obj conftest.*; do
3789 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003791 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3793 break;;
3794 esac
3795done
3796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003797 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003798sed 's/^/| /' conftest.$ac_ext >&5
3799
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003800{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3801$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003802as_fn_error $? "cannot compute suffix of object files: cannot compile
Charles-François Natali97781b02011-07-22 23:43:42 +02003803See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003804fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003805rm -f conftest.$ac_cv_objext conftest.$ac_ext
3806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3808$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003809OBJEXT=$ac_cv_objext
3810ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3812$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003813if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003814 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003815else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003818
Martin v. Löwis11437992002-04-12 09:54:03 +00003819int
3820main ()
3821{
3822#ifndef __GNUC__
3823 choke me
3824#endif
3825
3826 ;
3827 return 0;
3828}
3829_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003830if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003831 ac_compiler_gnu=yes
3832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003833 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003836ac_cv_c_compiler_gnu=$ac_compiler_gnu
3837
3838fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3840$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3841if test $ac_compiler_gnu = yes; then
3842 GCC=yes
3843else
3844 GCC=
3845fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003846ac_test_CFLAGS=${CFLAGS+set}
3847ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3849$as_echo_n "checking whether $CC accepts -g... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003850if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003851 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003852else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003853 ac_save_c_werror_flag=$ac_c_werror_flag
3854 ac_c_werror_flag=yes
3855 ac_cv_prog_cc_g=no
3856 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003859
Martin v. Löwis11437992002-04-12 09:54:03 +00003860int
3861main ()
3862{
3863
3864 ;
3865 return 0;
3866}
3867_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003868if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003869 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003870else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003871 CFLAGS=""
3872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003873/* end confdefs.h. */
3874
3875int
3876main ()
3877{
3878
3879 ;
3880 return 0;
3881}
3882_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003883if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003884
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003885else
3886 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00003887 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003889/* end confdefs.h. */
3890
3891int
3892main ()
3893{
3894
3895 ;
3896 return 0;
3897}
3898_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003899if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003900 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003901fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3907 ac_c_werror_flag=$ac_save_c_werror_flag
3908fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3910$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003911if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003912 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003913elif test $ac_cv_prog_cc_g = yes; then
3914 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003915 CFLAGS="-g -O2"
3916 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003917 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003918 fi
3919else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003920 if test "$GCC" = yes; then
3921 CFLAGS="-O2"
3922 else
3923 CFLAGS=
3924 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003925fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3927$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003928if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003929 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003930else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003931 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003932ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003934/* end confdefs.h. */
3935#include <stdarg.h>
3936#include <stdio.h>
3937#include <sys/types.h>
3938#include <sys/stat.h>
3939/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3940struct buf { int x; };
3941FILE * (*rcsopen) (struct buf *, struct stat *, int);
3942static char *e (p, i)
3943 char **p;
3944 int i;
3945{
3946 return p[i];
3947}
3948static char *f (char * (*g) (char **, int), char **p, ...)
3949{
3950 char *s;
3951 va_list v;
3952 va_start (v,p);
3953 s = g (p, va_arg (v,int));
3954 va_end (v);
3955 return s;
3956}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003957
3958/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3959 function prototypes and stuff, but not '\xHH' hex character constants.
3960 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003961 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003962 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3963 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003964 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003965int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3966
Martin v. Löwiseba40652007-08-30 20:10:57 +00003967/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3968 inside strings and character constants. */
3969#define FOO(x) 'x'
3970int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3971
Skip Montanaro6dead952003-09-25 14:50:04 +00003972int test (int i, double x);
3973struct s1 {int (*f) (int a);};
3974struct s2 {int (*f) (double a);};
3975int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3976int argc;
3977char **argv;
3978int
3979main ()
3980{
3981return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3982 ;
3983 return 0;
3984}
3985_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003986for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3987 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003988do
3989 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003990 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003991 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003993rm -f core conftest.err conftest.$ac_objext
3994 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003995done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003996rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003997CC=$ac_save_CC
3998
3999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004000# AC_CACHE_VAL
4001case "x$ac_cv_prog_cc_c89" in
4002 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4004$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004005 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4007$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004008 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004009 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4011$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004012esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004013if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004014
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004015fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004016
Martin v. Löwis11437992002-04-12 09:54:03 +00004017ac_ext=c
4018ac_cpp='$CPP $CPPFLAGS'
4019ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4020ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4021ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004022
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004023if test ! -z "$preset_cflags"
4024then
4025 CFLAGS=$preset_cflags
4026fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004027
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004028
4029
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4031$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004032
Martin v. Löwiseba40652007-08-30 20:10:57 +00004033# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004034if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004035 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004036
4037 case $withval in
4038 no) with_cxx_main=no
4039 MAINCC='$(CC)';;
4040 yes) with_cxx_main=yes
4041 MAINCC='$(CXX)';;
4042 *) with_cxx_main=yes
4043 MAINCC=$withval
4044 if test -z "$CXX"
4045 then
4046 CXX=$withval
4047 fi;;
4048 esac
4049else
4050
4051 with_cxx_main=no
4052 MAINCC='$(CC)'
4053
Martin v. Löwiseba40652007-08-30 20:10:57 +00004054fi
4055
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4057$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004058
4059preset_cxx="$CXX"
4060if test -z "$CXX"
4061then
4062 case "$CC" in
4063 gcc) # Extract the first word of "g++", so it can be a program name with args.
4064set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4066$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004067if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004068 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004069else
4070 case $CXX in
4071 [\\/]* | ?:[\\/]*)
4072 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4073 ;;
4074 *)
4075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4076for as_dir in notfound
4077do
4078 IFS=$as_save_IFS
4079 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004080 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004081 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 +00004082 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004083 $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 +00004084 break 2
4085 fi
4086done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004087 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004088IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004089
4090 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4091 ;;
4092esac
4093fi
4094CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004095if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4097$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4100$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004101fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004102
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004103 ;;
4104 cc) # Extract the first word of "c++", so it can be a program name with args.
4105set dummy c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4107$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004108if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004109 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004110else
4111 case $CXX in
4112 [\\/]* | ?:[\\/]*)
4113 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4114 ;;
4115 *)
4116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4117for as_dir in notfound
4118do
4119 IFS=$as_save_IFS
4120 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004121 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004122 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 +00004123 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004124 $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 +00004125 break 2
4126 fi
4127done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004128 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004129IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004130
4131 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4132 ;;
4133esac
4134fi
4135CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004136if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4138$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004139else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4141$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004143
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004144 ;;
4145 esac
4146 if test "$CXX" = "notfound"
4147 then
4148 CXX=""
4149 fi
4150fi
4151if test -z "$CXX"
4152then
4153 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4154do
4155 # Extract the first word of "$ac_prog", so it can be a program name with args.
4156set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4158$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004159if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004160 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004161else
4162 if test -n "$CXX"; then
4163 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4164else
4165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4166for as_dir in $PATH
4167do
4168 IFS=$as_save_IFS
4169 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004170 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004171 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 +00004172 ac_cv_prog_CXX="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004173 $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 +00004174 break 2
4175 fi
4176done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004177 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004178IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004179
4180fi
4181fi
4182CXX=$ac_cv_prog_CXX
4183if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4185$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004186else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4188$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004189fi
4190
Martin v. Löwiseba40652007-08-30 20:10:57 +00004191
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004192 test -n "$CXX" && break
4193done
4194test -n "$CXX" || CXX="notfound"
4195
4196 if test "$CXX" = "notfound"
4197 then
4198 CXX=""
4199 fi
4200fi
4201if test "$preset_cxx" != "$CXX"
4202then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004203 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004204
4205 By default, distutils will build C++ extension modules with \"$CXX\".
4206 If this is not intended, then set CXX on the configure command line.
4207 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004208$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004209
4210 By default, distutils will build C++ extension modules with \"$CXX\".
4211 If this is not intended, then set CXX on the configure command line.
4212 " >&2;}
4213fi
4214
4215
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004216# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004217
4218ac_ext=c
4219ac_cpp='$CPP $CPPFLAGS'
4220ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4221ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4222ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4224$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004225# On Suns, sometimes $CPP names a directory.
4226if test -n "$CPP" && test -d "$CPP"; then
4227 CPP=
4228fi
4229if test -z "$CPP"; then
Charles-François Natali97781b02011-07-22 23:43:42 +02004230 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004231 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004232else
Martin v. Löwis11437992002-04-12 09:54:03 +00004233 # Double quotes because CPP needs to be expanded
4234 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4235 do
4236 ac_preproc_ok=false
4237for ac_c_preproc_warn_flag in '' yes
4238do
4239 # Use a header file that comes with gcc, so configuring glibc
4240 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004241 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4242 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004243 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004244 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004246/* end confdefs.h. */
4247#ifdef __STDC__
4248# include <limits.h>
4249#else
4250# include <assert.h>
4251#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004252 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004253_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004254if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004255
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004256else
Martin v. Löwis11437992002-04-12 09:54:03 +00004257 # Broken: fails on valid input.
4258continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004259fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004260rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004261
Martin v. Löwiseba40652007-08-30 20:10:57 +00004262 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004263 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004266#include <ac_nonexistent.h>
4267_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004268if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004269 # Broken: success on invalid input.
4270continue
4271else
Martin v. Löwis11437992002-04-12 09:54:03 +00004272 # Passes both tests.
4273ac_preproc_ok=:
4274break
4275fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004276rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004277
4278done
4279# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004280rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004281if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 break
4283fi
4284
4285 done
4286 ac_cv_prog_CPP=$CPP
4287
4288fi
4289 CPP=$ac_cv_prog_CPP
4290else
4291 ac_cv_prog_CPP=$CPP
4292fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4294$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004295ac_preproc_ok=false
4296for ac_c_preproc_warn_flag in '' yes
4297do
4298 # Use a header file that comes with gcc, so configuring glibc
4299 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004300 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4301 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004302 # On the NeXT, cc -E runs the code through the compiler's parser,
4303 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004305/* end confdefs.h. */
4306#ifdef __STDC__
4307# include <limits.h>
4308#else
4309# include <assert.h>
4310#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004311 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004312_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004313if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004314
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004315else
Martin v. Löwis11437992002-04-12 09:54:03 +00004316 # Broken: fails on valid input.
4317continue
4318fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004319rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004320
Martin v. Löwiseba40652007-08-30 20:10:57 +00004321 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004322 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004325#include <ac_nonexistent.h>
4326_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004327if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004328 # Broken: success on invalid input.
4329continue
4330else
Martin v. Löwis11437992002-04-12 09:54:03 +00004331 # Passes both tests.
4332ac_preproc_ok=:
4333break
4334fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004335rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004336
4337done
4338# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004339rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004340if $ac_preproc_ok; then :
4341
Martin v. Löwis11437992002-04-12 09:54:03 +00004342else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004343 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4344$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004345as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Charles-François Natali97781b02011-07-22 23:43:42 +02004346See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004347fi
4348
4349ac_ext=c
4350ac_cpp='$CPP $CPPFLAGS'
4351ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4352ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4353ac_compiler_gnu=$ac_cv_c_compiler_gnu
4354
4355
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4357$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004358if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004359 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004360else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004361 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004362 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004363 # Loop through the user's path and test for each of PROGNAME-LIST
4364 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004365for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4366do
4367 IFS=$as_save_IFS
4368 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004369 for ac_prog in grep ggrep; do
4370 for ac_exec_ext in '' $ac_executable_extensions; do
4371 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4372 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4373# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004374 # Check for GNU $ac_path_GREP
4375case `"$ac_path_GREP" --version 2>&1` in
4376*GNU*)
4377 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4378*)
4379 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004380 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004381 while :
4382 do
4383 cat "conftest.in" "conftest.in" >"conftest.tmp"
4384 mv "conftest.tmp" "conftest.in"
4385 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004386 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004387 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4388 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004389 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004390 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4391 # Best one so far, save it but keep looking for a better one
4392 ac_cv_path_GREP="$ac_path_GREP"
4393 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004394 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004395 # 10*(2^10) chars as input seems more than enough
4396 test $ac_count -gt 10 && break
4397 done
4398 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4399esac
4400
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004401 $ac_path_GREP_found && break 3
4402 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004403 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004404 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004405IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004406 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004407 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 +00004408 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004409else
4410 ac_cv_path_GREP=$GREP
4411fi
4412
Martin v. Löwiseba40652007-08-30 20:10:57 +00004413fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4415$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004416 GREP="$ac_cv_path_GREP"
4417
4418
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4420$as_echo_n "checking for egrep... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004421if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004422 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004423else
4424 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4425 then ac_cv_path_EGREP="$GREP -E"
4426 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004427 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004428 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004429 # Loop through the user's path and test for each of PROGNAME-LIST
4430 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004431for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4432do
4433 IFS=$as_save_IFS
4434 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004435 for ac_prog in egrep; do
4436 for ac_exec_ext in '' $ac_executable_extensions; do
4437 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4438 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4439# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004440 # Check for GNU $ac_path_EGREP
4441case `"$ac_path_EGREP" --version 2>&1` in
4442*GNU*)
4443 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4444*)
4445 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004446 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004447 while :
4448 do
4449 cat "conftest.in" "conftest.in" >"conftest.tmp"
4450 mv "conftest.tmp" "conftest.in"
4451 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004452 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004453 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4454 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004455 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004456 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4457 # Best one so far, save it but keep looking for a better one
4458 ac_cv_path_EGREP="$ac_path_EGREP"
4459 ac_path_EGREP_max=$ac_count
4460 fi
4461 # 10*(2^10) chars as input seems more than enough
4462 test $ac_count -gt 10 && break
4463 done
4464 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4465esac
4466
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004467 $ac_path_EGREP_found && break 3
4468 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004469 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004470 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004471IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004472 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004473 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 +00004474 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004475else
4476 ac_cv_path_EGREP=$EGREP
4477fi
4478
Martin v. Löwiseba40652007-08-30 20:10:57 +00004479 fi
4480fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4482$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004483 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004484
4485
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4487$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004488if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004489 $as_echo_n "(cached) " >&6
4490else
4491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004492/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004493#include <stdlib.h>
4494#include <stdarg.h>
4495#include <string.h>
4496#include <float.h>
4497
4498int
4499main ()
4500{
4501
4502 ;
4503 return 0;
4504}
4505_ACEOF
4506if ac_fn_c_try_compile "$LINENO"; then :
4507 ac_cv_header_stdc=yes
4508else
4509 ac_cv_header_stdc=no
4510fi
4511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4512
4513if test $ac_cv_header_stdc = yes; then
4514 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4516/* end confdefs.h. */
4517#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004518
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004519_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004520if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004521 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004522
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004523else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004524 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004525fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004526rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004527
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004528fi
4529
4530if test $ac_cv_header_stdc = yes; then
4531 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4533/* end confdefs.h. */
4534#include <stdlib.h>
4535
4536_ACEOF
4537if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4538 $EGREP "free" >/dev/null 2>&1; then :
4539
4540else
4541 ac_cv_header_stdc=no
4542fi
4543rm -f conftest*
4544
4545fi
4546
4547if test $ac_cv_header_stdc = yes; then
4548 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4549 if test "$cross_compiling" = yes; then :
4550 :
4551else
4552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4553/* end confdefs.h. */
4554#include <ctype.h>
4555#include <stdlib.h>
4556#if ((' ' & 0x0FF) == 0x020)
4557# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4558# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4559#else
4560# define ISLOWER(c) \
4561 (('a' <= (c) && (c) <= 'i') \
4562 || ('j' <= (c) && (c) <= 'r') \
4563 || ('s' <= (c) && (c) <= 'z'))
4564# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4565#endif
4566
4567#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4568int
4569main ()
4570{
4571 int i;
4572 for (i = 0; i < 256; i++)
4573 if (XOR (islower (i), ISLOWER (i))
4574 || toupper (i) != TOUPPER (i))
4575 return 2;
4576 return 0;
4577}
4578_ACEOF
4579if ac_fn_c_try_run "$LINENO"; then :
4580
4581else
4582 ac_cv_header_stdc=no
4583fi
4584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4585 conftest.$ac_objext conftest.beam conftest.$ac_ext
4586fi
4587
4588fi
4589fi
4590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4591$as_echo "$ac_cv_header_stdc" >&6; }
4592if test $ac_cv_header_stdc = yes; then
4593
4594$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4595
4596fi
4597
4598# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4599for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4600 inttypes.h stdint.h unistd.h
4601do :
4602 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4603ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4604"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004605if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004606 cat >>confdefs.h <<_ACEOF
4607#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4608_ACEOF
4609
4610fi
4611
4612done
4613
4614
4615
4616 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 +02004617if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004618 MINIX=yes
4619else
4620 MINIX=
4621fi
4622
4623
4624 if test "$MINIX" = yes; then
4625
4626$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4627
4628
4629$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4630
4631
4632$as_echo "#define _MINIX 1" >>confdefs.h
4633
4634 fi
4635
4636
4637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4638$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004639if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004640 $as_echo_n "(cached) " >&6
4641else
4642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4643/* end confdefs.h. */
4644
4645# define __EXTENSIONS__ 1
4646 $ac_includes_default
4647int
4648main ()
4649{
4650
4651 ;
4652 return 0;
4653}
4654_ACEOF
4655if ac_fn_c_try_compile "$LINENO"; then :
4656 ac_cv_safe_to_define___extensions__=yes
4657else
4658 ac_cv_safe_to_define___extensions__=no
4659fi
4660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4661fi
4662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4663$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4664 test $ac_cv_safe_to_define___extensions__ = yes &&
4665 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4666
4667 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4668
4669 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4670
4671 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4672
4673 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4674
4675
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004676
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004677# Check for unsupported systems
4678case $ac_sys_system/$ac_sys_release in
4679atheos*|Linux*/1*)
4680 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4681 echo See README for details.
4682 exit 1;;
4683esac
4684
4685
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4687$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004688
4689# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004690if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004691 withval=$with_suffix;
4692 case $withval in
4693 no) EXEEXT=;;
4694 yes) EXEEXT=.exe;;
4695 *) EXEEXT=$withval;;
4696 esac
4697fi
4698
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4700$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004701
4702# Test whether we're running on a non-case-sensitive system, in which
4703# case we give a warning if no ext is given
4704
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4706$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004707if test ! -d CaseSensitiveTestDir; then
4708mkdir CaseSensitiveTestDir
4709fi
4710
4711if test -d casesensitivetestdir
4712then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4714$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004715 BUILDEXEEXT=.exe
4716else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4718$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004719 BUILDEXEEXT=$EXEEXT
4720fi
4721rmdir CaseSensitiveTestDir
4722
4723case $MACHDEP in
4724bsdos*)
4725 case $CC in
4726 gcc) CC="$CC -D_HAVE_BSDI";;
4727 esac;;
4728esac
4729
4730case $ac_sys_system in
4731hp*|HP*)
4732 case $CC in
4733 cc|*/cc) CC="$CC -Ae";;
4734 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004735SunOS*)
4736 # Some functions have a prototype only with that define, e.g. confstr
4737
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004738$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004739
4740 ;;
4741esac
4742
4743
4744
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4746$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004747if test -z "$LIBRARY"
4748then
4749 LIBRARY='libpython$(VERSION).a'
4750fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4752$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004753
4754# LDLIBRARY is the name of the library to link against (as opposed to the
4755# name of the library into which to insert object files). BLDLIBRARY is also
4756# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4757# is blank as the main program is not linked directly against LDLIBRARY.
4758# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4759# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4760# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4761# DLLLIBRARY is the shared (i.e., DLL) library.
4762#
4763# RUNSHARED is used to run shared python without installed libraries
4764#
4765# INSTSONAME is the name of the shared library that will be use to install
4766# on the system - some systems like version suffix, others don't
4767
4768
4769
4770
4771
4772
4773LDLIBRARY="$LIBRARY"
4774BLDLIBRARY='$(LDLIBRARY)'
4775INSTSONAME='$(LDLIBRARY)'
4776DLLLIBRARY=''
4777LDLIBRARYDIR=''
4778RUNSHARED=''
4779
4780# LINKCC is the command that links the python executable -- default is $(CC).
4781# If CXX is set, and if it is needed to link a main function that was
4782# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4783# python might then depend on the C++ runtime
4784# This is altered for AIX in order to build the export list before
4785# linking.
4786
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4788$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004789if test -z "$LINKCC"
4790then
4791 LINKCC='$(PURIFY) $(MAINCC)'
4792 case $ac_sys_system in
4793 AIX*)
4794 exp_extra="\"\""
4795 if test $ac_sys_release -ge 5 -o \
4796 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4797 exp_extra="."
4798 fi
4799 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004800 QNX*)
4801 # qcc must be used because the other compilers do not
4802 # support -N.
4803 LINKCC=qcc;;
4804 esac
4805fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4807$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004808
4809# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4810# make sure we default having it set to "no": this is used by
4811# distutils.unixccompiler to know if it should add --enable-new-dtags
4812# to linker command lines, and failing to detect GNU ld simply results
4813# in the same bahaviour as before.
4814
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4816$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004817ac_prog=ld
4818if test "$GCC" = yes; then
4819 ac_prog=`$CC -print-prog-name=ld`
4820fi
4821case `"$ac_prog" -V 2>&1 < /dev/null` in
4822 *GNU*)
4823 GNULD=yes;;
4824 *)
4825 GNULD=no;;
4826esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4828$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004829
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4831$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004832# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004833if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004834 enableval=$enable_shared;
4835fi
4836
4837
4838if test -z "$enable_shared"
4839then
4840 case $ac_sys_system in
4841 CYGWIN* | atheos*)
4842 enable_shared="yes";;
4843 *)
4844 enable_shared="no";;
4845 esac
4846fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4848$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004849
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4851$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004852# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004853if test "${enable_profiling+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004854 enableval=$enable_profiling; ac_save_cc="$CC"
4855 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004856 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004857 ac_enable_profiling="no"
4858else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004860/* end confdefs.h. */
4861int main() { return 0; }
4862_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004863if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004864 ac_enable_profiling="yes"
4865else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004866 ac_enable_profiling="no"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004867fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4869 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004870fi
4871
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004872 CC="$ac_save_cc"
4873fi
4874
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4876$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004877
4878case "$ac_enable_profiling" in
4879 "yes")
4880 BASECFLAGS="-pg $BASECFLAGS"
4881 LDFLAGS="-pg $LDFLAGS"
4882 ;;
4883esac
4884
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4886$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004887
4888# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4889# library that we build, but we do not want to link against it (we
4890# will find it with a -framework option). For this reason there is an
4891# extra variable BLDLIBRARY against which Python and the extension
4892# modules are linked, BLDLIBRARY. This is normally the same as
4893# LDLIBRARY, but empty for MacOSX framework builds.
4894if test "$enable_framework"
4895then
4896 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4897 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4898 BLDLIBRARY=''
4899else
4900 BLDLIBRARY='$(LDLIBRARY)'
4901fi
4902
4903# Other platforms follow
4904if test $enable_shared = "yes"; then
4905
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004906$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004907
4908 case $ac_sys_system in
4909 BeOS*)
4910 LDLIBRARY='libpython$(VERSION).so'
4911 ;;
4912 CYGWIN*)
4913 LDLIBRARY='libpython$(VERSION).dll.a'
4914 DLLLIBRARY='libpython$(VERSION).dll'
4915 ;;
4916 SunOS*)
4917 LDLIBRARY='libpython$(VERSION).so'
4918 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4919 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4920 INSTSONAME="$LDLIBRARY".$SOVERSION
4921 ;;
4922 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4923 LDLIBRARY='libpython$(VERSION).so'
4924 BLDLIBRARY='-L. -lpython$(VERSION)'
4925 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4926 case $ac_sys_system in
4927 FreeBSD*)
4928 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4929 ;;
4930 esac
4931 INSTSONAME="$LDLIBRARY".$SOVERSION
4932 ;;
4933 hp*|HP*)
4934 case `uname -m` in
4935 ia64)
4936 LDLIBRARY='libpython$(VERSION).so'
4937 ;;
4938 *)
4939 LDLIBRARY='libpython$(VERSION).sl'
4940 ;;
4941 esac
4942 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4943 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4944 ;;
4945 OSF*)
4946 LDLIBRARY='libpython$(VERSION).so'
4947 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4948 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4949 ;;
4950 atheos*)
4951 LDLIBRARY='libpython$(VERSION).so'
4952 BLDLIBRARY='-L. -lpython$(VERSION)'
4953 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4954 ;;
4955 Darwin*)
4956 LDLIBRARY='libpython$(VERSION).dylib'
4957 BLDLIBRARY='-L. -lpython$(VERSION)'
4958 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4959 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00004960 AIX*)
4961 LDLIBRARY='libpython$(VERSION).so'
4962 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4963 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004964
4965 esac
4966else # shared is disabled
4967 case $ac_sys_system in
4968 CYGWIN*)
4969 BLDLIBRARY='$(LIBRARY)'
4970 LDLIBRARY='libpython$(VERSION).dll.a'
4971 ;;
4972 esac
4973fi
4974
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4976$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004977
4978if test -n "$ac_tool_prefix"; then
4979 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4980set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4982$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004983if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004984 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004985else
4986 if test -n "$RANLIB"; then
4987 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4988else
4989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4990for as_dir in $PATH
4991do
4992 IFS=$as_save_IFS
4993 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004994 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004995 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4996 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004997 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004998 break 2
4999 fi
5000done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005001 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005002IFS=$as_save_IFS
5003
5004fi
5005fi
5006RANLIB=$ac_cv_prog_RANLIB
5007if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5009$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5012$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005013fi
5014
5015
5016fi
5017if test -z "$ac_cv_prog_RANLIB"; then
5018 ac_ct_RANLIB=$RANLIB
5019 # Extract the first word of "ranlib", so it can be a program name with args.
5020set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5022$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005023if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005024 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005025else
5026 if test -n "$ac_ct_RANLIB"; then
5027 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5028else
5029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5030for as_dir in $PATH
5031do
5032 IFS=$as_save_IFS
5033 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005034 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005035 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5036 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005038 break 2
5039 fi
5040done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005041 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005042IFS=$as_save_IFS
5043
5044fi
5045fi
5046ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5047if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5049$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005050else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5052$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005053fi
5054
5055 if test "x$ac_ct_RANLIB" = x; then
5056 RANLIB=":"
5057 else
5058 case $cross_compiling:$ac_tool_warned in
5059yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005060{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5061$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005062ac_tool_warned=yes ;;
5063esac
5064 RANLIB=$ac_ct_RANLIB
5065 fi
5066else
5067 RANLIB="$ac_cv_prog_RANLIB"
5068fi
5069
5070
5071for ac_prog in ar aal
5072do
5073 # Extract the first word of "$ac_prog", so it can be a program name with args.
5074set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5076$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005077if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005078 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005079else
5080 if test -n "$AR"; then
5081 ac_cv_prog_AR="$AR" # Let the user override the test.
5082else
5083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5084for as_dir in $PATH
5085do
5086 IFS=$as_save_IFS
5087 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005088 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005089 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5090 ac_cv_prog_AR="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005091 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005092 break 2
5093 fi
5094done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005095 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005096IFS=$as_save_IFS
5097
5098fi
5099fi
5100AR=$ac_cv_prog_AR
5101if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5103$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005104else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5106$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005107fi
5108
5109
5110 test -n "$AR" && break
5111done
5112test -n "$AR" || AR="ar"
5113
5114
5115# tweak ARFLAGS only if the user didn't set it on the command line
5116
5117if test -z "$ARFLAGS"
5118then
5119 ARFLAGS="rc"
5120fi
5121
5122
5123# Extract the first word of "svnversion", so it can be a program name with args.
5124set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5126$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005127if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005128 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005129else
5130 if test -n "$SVNVERSION"; then
5131 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5132else
5133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5134for as_dir in $PATH
5135do
5136 IFS=$as_save_IFS
5137 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005138 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005139 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5140 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005142 break 2
5143 fi
5144done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005145 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005146IFS=$as_save_IFS
5147
5148 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5149fi
5150fi
5151SVNVERSION=$ac_cv_prog_SVNVERSION
5152if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5154$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005155else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5157$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005158fi
5159
5160
5161if test $SVNVERSION = found
5162then
5163 SVNVERSION="svnversion \$(srcdir)"
5164else
5165 SVNVERSION="echo Unversioned directory"
5166fi
5167
Georg Brandl3a5508e2011-03-06 10:42:21 +01005168
5169
5170
5171# Extract the first word of "hg", so it can be a program name with args.
5172set dummy hg; ac_word=$2
5173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5174$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005175if test "${ac_cv_prog_HAS_HG+set}" = set; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005176 $as_echo_n "(cached) " >&6
5177else
5178 if test -n "$HAS_HG"; then
5179 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5180else
5181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5182for as_dir in $PATH
5183do
5184 IFS=$as_save_IFS
5185 test -z "$as_dir" && as_dir=.
5186 for ac_exec_ext in '' $ac_executable_extensions; do
5187 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5188 ac_cv_prog_HAS_HG="found"
5189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5190 break 2
5191 fi
5192done
5193 done
5194IFS=$as_save_IFS
5195
5196 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5197fi
5198fi
5199HAS_HG=$ac_cv_prog_HAS_HG
5200if test -n "$HAS_HG"; then
5201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5202$as_echo "$HAS_HG" >&6; }
5203else
5204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5205$as_echo "no" >&6; }
5206fi
5207
5208
5209if test $HAS_HG = found
5210then
5211 HGVERSION="hg id -i \$(srcdir)"
5212 HGTAG="hg id -t \$(srcdir)"
5213 HGBRANCH="hg id -b \$(srcdir)"
5214else
5215 HGVERSION=""
5216 HGTAG=""
5217 HGBRANCH=""
5218fi
5219
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005220case $MACHDEP in
5221bsdos*|hp*|HP*)
5222 # install -d does not work on BSDI or HP-UX
5223 if test -z "$INSTALL"
5224 then
5225 INSTALL="${srcdir}/install-sh -c"
5226 fi
5227esac
5228ac_aux_dir=
5229for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005230 if test -f "$ac_dir/install-sh"; then
5231 ac_aux_dir=$ac_dir
5232 ac_install_sh="$ac_aux_dir/install-sh -c"
5233 break
5234 elif test -f "$ac_dir/install.sh"; then
5235 ac_aux_dir=$ac_dir
5236 ac_install_sh="$ac_aux_dir/install.sh -c"
5237 break
5238 elif test -f "$ac_dir/shtool"; then
5239 ac_aux_dir=$ac_dir
5240 ac_install_sh="$ac_aux_dir/shtool install -c"
5241 break
5242 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005243done
5244if test -z "$ac_aux_dir"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005245 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005246fi
5247
5248# These three variables are undocumented and unsupported,
5249# and are intended to be withdrawn in a future Autoconf release.
5250# They can cause serious problems if a builder's source tree is in a directory
5251# whose full name contains unusual characters.
5252ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5253ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5254ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5255
5256
5257# Find a good install program. We prefer a C program (faster),
5258# so one script is as good as another. But avoid the broken or
5259# incompatible versions:
5260# SysV /etc/install, /usr/sbin/install
5261# SunOS /usr/etc/install
5262# IRIX /sbin/install
5263# AIX /bin/install
5264# AmigaOS /C/install, which installs bootblocks on floppy discs
5265# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5266# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5267# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5268# OS/2's system install, which has a completely different semantic
5269# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005270# Reject install programs that cannot install multiple files.
5271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5272$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005273if test -z "$INSTALL"; then
Charles-François Natali97781b02011-07-22 23:43:42 +02005274if test "${ac_cv_path_install+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005275 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005276else
5277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5278for as_dir in $PATH
5279do
5280 IFS=$as_save_IFS
5281 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005282 # Account for people who put trailing slashes in PATH elements.
5283case $as_dir/ in #((
5284 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005285 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005286 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005287 /usr/ucb/* ) ;;
5288 *)
5289 # OSF1 and SCO ODT 3.0 have their own names for install.
5290 # Don't use installbsd from OSF since it installs stuff as root
5291 # by default.
5292 for ac_prog in ginstall scoinst install; do
5293 for ac_exec_ext in '' $ac_executable_extensions; do
5294 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5295 if test $ac_prog = install &&
5296 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5297 # AIX install. It has an incompatible calling convention.
5298 :
5299 elif test $ac_prog = install &&
5300 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5301 # program-specific install script used by HP pwplus--don't use.
5302 :
5303 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005304 rm -rf conftest.one conftest.two conftest.dir
5305 echo one > conftest.one
5306 echo two > conftest.two
5307 mkdir conftest.dir
5308 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5309 test -s conftest.one && test -s conftest.two &&
5310 test -s conftest.dir/conftest.one &&
5311 test -s conftest.dir/conftest.two
5312 then
5313 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5314 break 3
5315 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005316 fi
5317 fi
5318 done
5319 done
5320 ;;
5321esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005322
5323 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005324IFS=$as_save_IFS
5325
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005326rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005327
5328fi
5329 if test "${ac_cv_path_install+set}" = set; then
5330 INSTALL=$ac_cv_path_install
5331 else
5332 # As a last resort, use the slow shell script. Don't cache a
5333 # value for INSTALL within a source directory, because that will
5334 # break other packages using the cache if that directory is
5335 # removed, or if the value is a relative name.
5336 INSTALL=$ac_install_sh
5337 fi
5338fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5340$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005341
5342# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5343# It thinks the first close brace ends the variable substitution.
5344test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5345
5346test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5347
5348test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5349
5350
5351# Not every filesystem supports hard links
5352
5353if test -z "$LN" ; then
5354 case $ac_sys_system in
5355 BeOS*) LN="ln -s";;
5356 CYGWIN*) LN="ln -s";;
5357 atheos*) LN="ln -s";;
5358 *) LN=ln;;
5359 esac
5360fi
5361
5362# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5364$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005365
5366# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005367if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005368 withval=$with_pydebug;
5369if test "$withval" != no
5370then
5371
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005372$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005373
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5375$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005376 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005377else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5378$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005379fi
5380else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5382$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005383fi
5384
5385
5386# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5387# merged with this chunk of code?
5388
5389# Optimizer/debugger flags
5390# ------------------------
5391# (The following bit of code is complicated enough - please keep things
5392# indented properly. Just pretend you're editing Python code. ;-)
5393
5394# There are two parallel sets of case statements below, one that checks to
5395# see if OPT was set and one that does BASECFLAGS setting based upon
5396# compiler and platform. BASECFLAGS tweaks need to be made even if the
5397# user set OPT.
5398
5399# tweak OPT based on compiler and platform, only if the user didn't set
5400# it on the command line
5401
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005402if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005403then
5404 case $GCC in
5405 yes)
5406 if test "$CC" != 'g++' ; then
5407 STRICT_PROTO="-Wstrict-prototypes"
5408 fi
5409 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5410 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5411 WRAP="-fwrapv"
5412 fi
5413 case $ac_cv_prog_cc_g in
5414 yes)
5415 if test "$Py_DEBUG" = 'true' ; then
5416 # Optimization messes up debuggers, so turn it off for
5417 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005418 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005419 else
5420 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5421 fi
5422 ;;
5423 *)
5424 OPT="-O3 -Wall $STRICT_PROTO"
5425 ;;
5426 esac
5427 case $ac_sys_system in
5428 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5429 ;;
5430 esac
5431 ;;
5432
5433 *)
5434 OPT="-O"
5435 ;;
5436 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005437fi
5438
5439
5440
5441# The -arch flags for universal builds on OSX
5442UNIVERSAL_ARCH_FLAGS=
5443
5444
5445# tweak BASECFLAGS based on compiler and platform
5446case $GCC in
5447yes)
5448 # Python violates C99 rules, by casting between incompatible
5449 # pointer types. GCC may generate bad code as a result of that,
5450 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5452$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005453 ac_save_cc="$CC"
5454 CC="$CC -fno-strict-aliasing"
Charles-François Natali97781b02011-07-22 23:43:42 +02005455 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005456 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005457else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005459/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005460
5461int
5462main ()
5463{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005464
Gregory P. Smith373469a2009-11-01 21:03:38 +00005465 ;
5466 return 0;
5467}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005468_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005469if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005470 ac_cv_no_strict_aliasing_ok=yes
5471else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005472 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005473fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005475fi
5476
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005477 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5479$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005480 if test $ac_cv_no_strict_aliasing_ok = yes
5481 then
5482 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5483 fi
5484
5485 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5486 # support. Without this, treatment of subnormals doesn't follow
5487 # the standard.
5488 case $ac_sys_machine in
5489 alpha*)
5490 BASECFLAGS="$BASECFLAGS -mieee"
5491 ;;
5492 esac
5493
5494 case $ac_sys_system in
5495 SCO_SV*)
5496 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5497 ;;
5498 # is there any other compiler on Darwin besides gcc?
5499 Darwin*)
5500 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5501 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005502 if test "${CC}" = gcc
5503 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5505$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005506 case "${UNIVERSALSDK}" in
5507 */MacOSX10.4u.sdk)
5508 # Build using 10.4 SDK, force usage of gcc when the
5509 # compiler is gcc, otherwise the user will get very
5510 # confusing error messages when building on OSX 10.6
5511 CC=gcc-4.0
5512 CPP=cpp-4.0
5513 ;;
5514 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5516$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005517 fi
5518
5519 # Calculate the right deployment target for this build.
5520 #
5521 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5522 if test ${cur_target} '>' 10.2; then
5523 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00005524 if test ${enable_universalsdk}; then
5525 if test "${UNIVERSAL_ARCHS}" = "all"; then
5526 # Ensure that the default platform for a
5527 # 4-way universal build is OSX 10.5,
5528 # that's the first OS release where
5529 # 4-way builds make sense.
5530 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00005531
5532 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5533 cur_target='10.5'
5534
5535 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5536 cur_target='10.5'
5537
5538 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5539 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00005540 fi
5541 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00005542 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00005543 # On Intel macs default to a deployment
5544 # target of 10.4, that's the first OSX
5545 # release with Intel support.
5546 cur_target="10.4"
5547 fi
5548 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005549 fi
5550 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5551
5552 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5553 # environment with a value that is the same as what we'll use
5554 # in the Makefile to ensure that we'll get the same compiler
5555 # environment during configure and build time.
5556 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5557 export MACOSX_DEPLOYMENT_TARGET
5558 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5559
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005560 if test "${enable_universalsdk}"; then
5561 UNIVERSAL_ARCH_FLAGS=""
5562 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5563 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5564 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00005565 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005566
5567 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5568 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5569 LIPO_32BIT_FLAGS=""
5570 ARCH_RUN_32BIT="true"
5571
5572 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5573 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5574 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005575 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005576
5577 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5578 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5579 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005580 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005581
5582 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5583 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5584 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00005585 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005586
5587 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005588 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 +00005589
5590 fi
5591
5592
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00005593 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5594 if test "${UNIVERSALSDK}" != "/"
5595 then
5596 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5597 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5598 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005599 fi
5600
5601 fi
5602
5603
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005604 ;;
5605 OSF*)
5606 BASECFLAGS="$BASECFLAGS -mieee"
5607 ;;
5608 esac
5609 ;;
5610
5611*)
5612 case $ac_sys_system in
5613 OpenUNIX*|UnixWare*)
5614 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5615 ;;
5616 OSF*)
5617 BASECFLAGS="$BASECFLAGS -ieee -std"
5618 ;;
5619 SCO_SV*)
5620 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5621 ;;
5622 esac
5623 ;;
5624esac
5625
5626if test "$Py_DEBUG" = 'true'; then
5627 :
5628else
5629 OPT="-DNDEBUG $OPT"
5630fi
5631
5632if test "$ac_arch_flags"
5633then
5634 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5635fi
5636
5637# disable check for icc since it seems to pass, but generates a warning
5638if test "$CC" = icc
5639then
5640 ac_cv_opt_olimit_ok=no
5641fi
5642
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5644$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005645if test "${ac_cv_opt_olimit_ok+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005646 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005647else
5648 ac_save_cc="$CC"
5649CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005651/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005652
5653int
5654main ()
5655{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005656
Gregory P. Smith373469a2009-11-01 21:03:38 +00005657 ;
5658 return 0;
5659}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005660_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005661if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005662 ac_cv_opt_olimit_ok=yes
5663else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005664 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005665
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005666fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005668CC="$ac_save_cc"
5669fi
5670
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5672$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005673if test $ac_cv_opt_olimit_ok = yes; then
5674 case $ac_sys_system in
5675 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5676 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5677 # environment?
5678 Darwin*)
5679 ;;
5680 *)
5681 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5682 ;;
5683 esac
5684else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5686$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005687 if test "${ac_cv_olimit_ok+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005688 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005689else
5690 ac_save_cc="$CC"
5691 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005693/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005694
5695int
5696main ()
5697{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005698
Gregory P. Smith373469a2009-11-01 21:03:38 +00005699 ;
5700 return 0;
5701}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005702_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005703if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005704 ac_cv_olimit_ok=yes
5705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005706 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005707
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005708fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005710 CC="$ac_save_cc"
5711fi
5712
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5714$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005715 if test $ac_cv_olimit_ok = yes; then
5716 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5717 fi
5718fi
5719
5720# Check whether GCC supports PyArg_ParseTuple format
5721if test "$GCC" = "yes"
5722then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5724$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005725 save_CFLAGS=$CFLAGS
5726 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005728/* end confdefs.h. */
5729
5730 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005731int
5732main ()
5733{
5734
5735 ;
5736 return 0;
5737}
Matthias Klosec511b472010-05-08 11:01:39 +00005738
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005739_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005740if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005741
Matthias Klosec511b472010-05-08 11:01:39 +00005742
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005743$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005744
Matthias Klosec511b472010-05-08 11:01:39 +00005745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005746$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00005747
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005748else
Matthias Klosec511b472010-05-08 11:01:39 +00005749
5750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005751$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005752
5753fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5755 CFLAGS=$save_CFLAGS
5756fi
5757
5758# On some compilers, pthreads are available without further options
5759# (e.g. MacOS X). On some of these systems, the compiler will not
5760# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5761# So we have to see first whether pthreads are available without
5762# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5764$as_echo_n "checking whether pthreads are available without options... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005765if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005766 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005767else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005768 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005769 ac_cv_pthread_is_default=no
5770else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005772/* end confdefs.h. */
5773
5774#include <pthread.h>
5775
5776void* routine(void* p){return NULL;}
5777
5778int main(){
5779 pthread_t p;
5780 if(pthread_create(&p,NULL,routine,NULL)!=0)
5781 return 1;
5782 (void)pthread_detach(p);
5783 return 0;
5784}
5785
5786_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005787if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005788
5789 ac_cv_pthread_is_default=yes
5790 ac_cv_kthread=no
5791 ac_cv_pthread=no
5792
5793else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005794 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005795fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5797 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005798fi
5799
5800
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005801fi
5802
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5804$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005805
5806
5807if test $ac_cv_pthread_is_default = yes
5808then
5809 ac_cv_kpthread=no
5810else
5811# -Kpthread, if available, provides the right #defines
5812# and linker options to make pthread_create available
5813# Some compilers won't report that they do not support -Kpthread,
5814# so we need to run a program to see whether it really made the
5815# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5817$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005818if test "${ac_cv_kpthread+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005819 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005820else
5821 ac_save_cc="$CC"
5822CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005823if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005824 ac_cv_kpthread=no
5825else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005827/* end confdefs.h. */
5828
5829#include <pthread.h>
5830
5831void* routine(void* p){return NULL;}
5832
5833int main(){
5834 pthread_t p;
5835 if(pthread_create(&p,NULL,routine,NULL)!=0)
5836 return 1;
5837 (void)pthread_detach(p);
5838 return 0;
5839}
5840
5841_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005842if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005843 ac_cv_kpthread=yes
5844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005845 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005846fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5848 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005849fi
5850
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005851CC="$ac_save_cc"
5852fi
5853
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5855$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005856fi
5857
5858if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5859then
5860# -Kthread, if available, provides the right #defines
5861# and linker options to make pthread_create available
5862# Some compilers won't report that they do not support -Kthread,
5863# so we need to run a program to see whether it really made the
5864# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5866$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005867if test "${ac_cv_kthread+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005868 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005869else
5870 ac_save_cc="$CC"
5871CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005872if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005873 ac_cv_kthread=no
5874else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005876/* end confdefs.h. */
5877
5878#include <pthread.h>
5879
5880void* routine(void* p){return NULL;}
5881
5882int main(){
5883 pthread_t p;
5884 if(pthread_create(&p,NULL,routine,NULL)!=0)
5885 return 1;
5886 (void)pthread_detach(p);
5887 return 0;
5888}
5889
5890_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005891if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005892 ac_cv_kthread=yes
5893else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005894 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005895fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5897 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005898fi
5899
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005900CC="$ac_save_cc"
5901fi
5902
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5904$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005905fi
5906
5907if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5908then
5909# -pthread, if available, provides the right #defines
5910# and linker options to make pthread_create available
5911# Some compilers won't report that they do not support -pthread,
5912# so we need to run a program to see whether it really made the
5913# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5915$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005916if test "${ac_cv_thread+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005917 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005918else
5919 ac_save_cc="$CC"
5920CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005921if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005922 ac_cv_pthread=no
5923else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005925/* end confdefs.h. */
5926
5927#include <pthread.h>
5928
5929void* routine(void* p){return NULL;}
5930
5931int main(){
5932 pthread_t p;
5933 if(pthread_create(&p,NULL,routine,NULL)!=0)
5934 return 1;
5935 (void)pthread_detach(p);
5936 return 0;
5937}
5938
5939_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005940if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005941 ac_cv_pthread=yes
5942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005943 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005944fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5946 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005947fi
5948
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005949CC="$ac_save_cc"
5950fi
5951
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5953$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005954fi
5955
5956# If we have set a CC compiler flag for thread support then
5957# check if it works for CXX, too.
5958ac_cv_cxx_thread=no
5959if test ! -z "$CXX"
5960then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5962$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005963ac_save_cxx="$CXX"
5964
5965if test "$ac_cv_kpthread" = "yes"
5966then
5967 CXX="$CXX -Kpthread"
5968 ac_cv_cxx_thread=yes
5969elif test "$ac_cv_kthread" = "yes"
5970then
5971 CXX="$CXX -Kthread"
5972 ac_cv_cxx_thread=yes
5973elif test "$ac_cv_pthread" = "yes"
5974then
5975 CXX="$CXX -pthread"
5976 ac_cv_cxx_thread=yes
5977fi
5978
5979if test $ac_cv_cxx_thread = yes
5980then
5981 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5982 $CXX -c conftest.$ac_ext 2>&5
5983 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5984 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5985 then
5986 ac_cv_cxx_thread=yes
5987 else
5988 ac_cv_cxx_thread=no
5989 fi
5990 rm -fr conftest*
5991fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5993$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005994fi
5995CXX="$ac_save_cxx"
5996
5997
5998# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6000$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006001if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006002 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006005/* end confdefs.h. */
6006#include <stdlib.h>
6007#include <stdarg.h>
6008#include <string.h>
6009#include <float.h>
6010
6011int
6012main ()
6013{
6014
6015 ;
6016 return 0;
6017}
6018_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006019if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006020 ac_cv_header_stdc=yes
6021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006022 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006023fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6025
6026if test $ac_cv_header_stdc = yes; then
6027 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006029/* end confdefs.h. */
6030#include <string.h>
6031
6032_ACEOF
6033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006034 $EGREP "memchr" >/dev/null 2>&1; then :
6035
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006036else
6037 ac_cv_header_stdc=no
6038fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006039rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006040
6041fi
6042
6043if test $ac_cv_header_stdc = yes; then
6044 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006046/* end confdefs.h. */
6047#include <stdlib.h>
6048
6049_ACEOF
6050if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006051 $EGREP "free" >/dev/null 2>&1; then :
6052
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006053else
6054 ac_cv_header_stdc=no
6055fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006056rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006057
6058fi
6059
6060if test $ac_cv_header_stdc = yes; then
6061 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006062 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006063 :
6064else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006066/* end confdefs.h. */
6067#include <ctype.h>
6068#include <stdlib.h>
6069#if ((' ' & 0x0FF) == 0x020)
6070# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6071# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6072#else
6073# define ISLOWER(c) \
6074 (('a' <= (c) && (c) <= 'i') \
6075 || ('j' <= (c) && (c) <= 'r') \
6076 || ('s' <= (c) && (c) <= 'z'))
6077# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6078#endif
6079
6080#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6081int
6082main ()
6083{
6084 int i;
6085 for (i = 0; i < 256; i++)
6086 if (XOR (islower (i), ISLOWER (i))
6087 || toupper (i) != TOUPPER (i))
6088 return 2;
6089 return 0;
6090}
6091_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006092if ac_fn_c_try_run "$LINENO"; then :
6093
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006095 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006096fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6098 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006099fi
6100
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006101fi
6102fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6104$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006105if test $ac_cv_header_stdc = yes; then
6106
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006107$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006108
6109fi
6110
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006111for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6112fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006113ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006114shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006115unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006116sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6117sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006118sys/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 +00006119sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006120sys/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 +00006121sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006122bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006123do :
6124 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6125ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006126if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006127 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006128#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006129_ACEOF
6130
6131fi
6132
Guido van Rossum627b2d71993-12-24 10:39:16 +00006133done
6134
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006135ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006136for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006137 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6139$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006140if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006141 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006142else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006144/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006145#include <sys/types.h>
6146#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006147
Martin v. Löwis11437992002-04-12 09:54:03 +00006148int
6149main ()
6150{
6151if ((DIR *) 0)
6152return 0;
6153 ;
6154 return 0;
6155}
6156_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006157if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006158 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006159else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006160 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006163fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006164eval ac_res=\$$as_ac_Header
6165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6166$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006167if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006168 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006169#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006170_ACEOF
6171
6172ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006173fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006174
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006175done
6176# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6177if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6179$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006180if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006181 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006182else
Martin v. Löwis11437992002-04-12 09:54:03 +00006183 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006186
Martin v. Löwiseba40652007-08-30 20:10:57 +00006187/* Override any GCC internal prototype to avoid an error.
6188 Use char because int might match the return type of a GCC
6189 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006190#ifdef __cplusplus
6191extern "C"
6192#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006193char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006194int
6195main ()
6196{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006197return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006198 ;
6199 return 0;
6200}
6201_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006202for ac_lib in '' dir; do
6203 if test -z "$ac_lib"; then
6204 ac_res="none required"
6205 else
6206 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006207 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006208 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006209 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006210 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006211fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006212rm -f core conftest.err conftest.$ac_objext \
6213 conftest$ac_exeext
Charles-François Natali97781b02011-07-22 23:43:42 +02006214 if test "${ac_cv_search_opendir+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006215 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006217done
Charles-François Natali97781b02011-07-22 23:43:42 +02006218if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006219
Martin v. Löwiseba40652007-08-30 20:10:57 +00006220else
6221 ac_cv_search_opendir=no
6222fi
6223rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006224LIBS=$ac_func_search_save_LIBS
6225fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6227$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006228ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006229if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006230 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006231
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006232fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006233
Michael W. Hudson54241132001-12-07 15:38:26 +00006234else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6236$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006237if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006238 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006239else
6240 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006243
Martin v. Löwiseba40652007-08-30 20:10:57 +00006244/* Override any GCC internal prototype to avoid an error.
6245 Use char because int might match the return type of a GCC
6246 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006247#ifdef __cplusplus
6248extern "C"
6249#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006250char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006251int
6252main ()
6253{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006254return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006255 ;
6256 return 0;
6257}
6258_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006259for ac_lib in '' x; do
6260 if test -z "$ac_lib"; then
6261 ac_res="none required"
6262 else
6263 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006264 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006265 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006266 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006268fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006269rm -f core conftest.err conftest.$ac_objext \
6270 conftest$ac_exeext
Charles-François Natali97781b02011-07-22 23:43:42 +02006271 if test "${ac_cv_search_opendir+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006272 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006274done
Charles-François Natali97781b02011-07-22 23:43:42 +02006275if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006276
Martin v. Löwiseba40652007-08-30 20:10:57 +00006277else
6278 ac_cv_search_opendir=no
6279fi
6280rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006281LIBS=$ac_func_search_save_LIBS
6282fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6284$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006285ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006286if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006287 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006288
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006289fi
6290
6291fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006292
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6294$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006295if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006296 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006297else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006299/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006300#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301int
6302main ()
6303{
6304return makedev(0, 0);
6305 ;
6306 return 0;
6307}
6308_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006309if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006310 ac_cv_header_sys_types_h_makedev=yes
6311else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006312 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006313fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006314rm -f core conftest.err conftest.$ac_objext \
6315 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006316
6317fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6319$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006320
6321if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006322ac_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 +02006323if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006324
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006325$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006326
6327fi
6328
6329
6330
6331 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006332 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 +02006333if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006334
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006335$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006336
6337fi
6338
6339
6340 fi
6341fi
6342
Michael W. Hudson54241132001-12-07 15:38:26 +00006343
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006344# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006345for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006346do :
6347 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006348#ifdef HAVE_CURSES_H
6349#include <curses.h>
6350#endif
6351
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006352"
Charles-François Natali97781b02011-07-22 23:43:42 +02006353if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006354 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006355#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006356_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006357
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006358fi
6359
6360done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006361
6362
Martin v. Löwis11017b12006-01-14 18:12:57 +00006363# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006364for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006365do :
6366 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 +00006367#ifdef HAVE_ASM_TYPES_H
6368#include <asm/types.h>
6369#endif
6370#ifdef HAVE_SYS_SOCKET_H
6371#include <sys/socket.h>
6372#endif
6373
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006374"
Charles-François Natali97781b02011-07-22 23:43:42 +02006375if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006376 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006377#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006378_ACEOF
6379
6380fi
6381
6382done
6383
6384
Guido van Rossum627b2d71993-12-24 10:39:16 +00006385# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006386was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6388$as_echo_n "checking for clock_t in time.h... " >&6; }
6389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006390/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006391#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006392
6393_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006394if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006395 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006396 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006397else
Martin v. Löwis11437992002-04-12 09:54:03 +00006398
6399
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006400$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006401
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006402
Guido van Rossum627b2d71993-12-24 10:39:16 +00006403fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006404rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006405
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6407$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006408
Neal Norwitz11690112002-07-30 01:08:28 +00006409# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6411$as_echo_n "checking for makedev... " >&6; }
6412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006413/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006414
6415#if defined(MAJOR_IN_MKDEV)
6416#include <sys/mkdev.h>
6417#elif defined(MAJOR_IN_SYSMACROS)
6418#include <sys/sysmacros.h>
6419#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006420#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006421#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006422int
6423main ()
6424{
6425 makedev(0, 0)
6426 ;
6427 return 0;
6428}
6429_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006430if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006431 ac_cv_has_makedev=yes
6432else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006433 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006434fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006435rm -f core conftest.err conftest.$ac_objext \
6436 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006437if test "$ac_cv_has_makedev" = "no"; then
6438 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006440/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006441
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006442#define _OSF_SOURCE 1
6443#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006444
Neal Norwitz11690112002-07-30 01:08:28 +00006445int
6446main ()
6447{
6448 makedev(0, 0)
6449 ;
6450 return 0;
6451}
6452_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006453if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006454 ac_cv_has_makedev=yes
6455else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006456 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006457fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006458rm -f core conftest.err conftest.$ac_objext \
6459 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006460 if test "$ac_cv_has_makedev" = "yes"; then
6461
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006462$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006463
6464 fi
6465fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6467$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006468if test "$ac_cv_has_makedev" = "yes"; then
6469
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006470$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006471
6472fi
6473
Martin v. Löwis399a6892002-10-04 10:22:02 +00006474# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6475# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6476# defined, but the compiler does not support pragma redefine_extname,
6477# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6478# structures (such as rlimit64) without declaring them. As a
6479# work-around, disable LFS on such configurations
6480
6481use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6483$as_echo_n "checking Solaris LFS bug... " >&6; }
6484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006485/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006486
6487#define _LARGEFILE_SOURCE 1
6488#define _FILE_OFFSET_BITS 64
6489#include <sys/resource.h>
6490
Martin v. Löwis399a6892002-10-04 10:22:02 +00006491int
6492main ()
6493{
6494struct rlimit foo;
6495 ;
6496 return 0;
6497}
6498_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006499if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006500 sol_lfs_bug=no
6501else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006502 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6506$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006507if test "$sol_lfs_bug" = "yes"; then
6508 use_lfs=no
6509fi
6510
6511if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006512# Two defines needed to enable largefile support on various platforms
6513# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00006514case $ac_sys_system/$ac_sys_release in
6515AIX*)
6516
6517$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6518
6519 ;;
6520esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006521
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006522$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006523
6524
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006525$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006526
Martin v. Löwis399a6892002-10-04 10:22:02 +00006527fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006528
Guido van Rossum84e7b241996-08-19 21:59:00 +00006529# Add some code to confdefs.h so that the test for off_t works on SCO
6530cat >> confdefs.h <<\EOF
6531#if defined(SCO_DS)
6532#undef _OFF_T
6533#endif
6534EOF
6535
Guido van Rossumef2255b2000-03-10 22:30:29 +00006536# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006537ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006538if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006539
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006540else
Martin v. Löwis11437992002-04-12 09:54:03 +00006541
6542cat >>confdefs.h <<_ACEOF
6543#define mode_t int
6544_ACEOF
6545
6546fi
6547
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006548ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006549if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006550
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006551else
Martin v. Löwis11437992002-04-12 09:54:03 +00006552
6553cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006554#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006555_ACEOF
6556
6557fi
6558
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006559ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006560if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006561
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006562else
Martin v. Löwis11437992002-04-12 09:54:03 +00006563
6564cat >>confdefs.h <<_ACEOF
6565#define pid_t int
6566_ACEOF
6567
6568fi
6569
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006570
Martin v. Löwis11437992002-04-12 09:54:03 +00006571cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00006572#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006573_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006574
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006575ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006576if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006577
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006578else
Martin v. Löwis11437992002-04-12 09:54:03 +00006579
6580cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006581#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006582_ACEOF
6583
6584fi
6585
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6587$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006588if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006589 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006590else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006592/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006593#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006594
6595_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006596if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006597 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006598 ac_cv_type_uid_t=yes
6599else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006600 ac_cv_type_uid_t=no
6601fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006602rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006603
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006604fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6606$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006607if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006608
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006609$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006610
6611
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006612$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006613
6614fi
6615
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006616ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6617case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006618 no|yes) ;; #(
6619 *)
6620
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006621$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006622
6623
6624cat >>confdefs.h <<_ACEOF
6625#define uint32_t $ac_cv_c_uint32_t
6626_ACEOF
6627;;
6628 esac
6629
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006630ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6631case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006632 no|yes) ;; #(
6633 *)
6634
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006635$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006636
6637
6638cat >>confdefs.h <<_ACEOF
6639#define uint64_t $ac_cv_c_uint64_t
6640_ACEOF
6641;;
6642 esac
6643
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006644ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6645case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006646 no|yes) ;; #(
6647 *)
6648
6649cat >>confdefs.h <<_ACEOF
6650#define int32_t $ac_cv_c_int32_t
6651_ACEOF
6652;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006653esac
6654
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006655ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6656case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006657 no|yes) ;; #(
6658 *)
6659
6660cat >>confdefs.h <<_ACEOF
6661#define int64_t $ac_cv_c_int64_t
6662_ACEOF
6663;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006664esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006665
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006666ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006667if test "x$ac_cv_type_ssize_t" = x""yes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006668
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006669$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006670
6671fi
6672
Jack Jansendd19cf82001-12-06 22:36:17 +00006673
Michael W. Hudson54241132001-12-07 15:38:26 +00006674# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006675# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006676# The cast to long int works around a bug in the HP C Compiler
6677# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6678# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6679# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6681$as_echo_n "checking size of int... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006682if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006683 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006684else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006685 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 +00006686
Martin v. Löwis11437992002-04-12 09:54:03 +00006687else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006688 if test "$ac_cv_type_int" = yes; then
6689 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006691as_fn_error 77 "cannot compute sizeof (int)
Charles-François Natali97781b02011-07-22 23:43:42 +02006692See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006693 else
6694 ac_cv_sizeof_int=0
6695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006696fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006697
Martin v. Löwis11437992002-04-12 09:54:03 +00006698fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6700$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006701
6702
6703
Martin v. Löwis11437992002-04-12 09:54:03 +00006704cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006705#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006706_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006707
6708
Martin v. Löwiseba40652007-08-30 20:10:57 +00006709# The cast to long int works around a bug in the HP C Compiler
6710# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6711# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6712# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6714$as_echo_n "checking size of long... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006715if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006716 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006717else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006718 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 +00006719
Martin v. Löwis11437992002-04-12 09:54:03 +00006720else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006721 if test "$ac_cv_type_long" = yes; then
6722 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6723$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006724as_fn_error 77 "cannot compute sizeof (long)
Charles-François Natali97781b02011-07-22 23:43:42 +02006725See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006726 else
6727 ac_cv_sizeof_long=0
6728 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006729fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006730
Martin v. Löwis11437992002-04-12 09:54:03 +00006731fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6733$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006734
6735
6736
Martin v. Löwis11437992002-04-12 09:54:03 +00006737cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006738#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006739_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006740
6741
Martin v. Löwiseba40652007-08-30 20:10:57 +00006742# The cast to long int works around a bug in the HP C Compiler
6743# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6744# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6745# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6747$as_echo_n "checking size of void *... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006748if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006749 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006750else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006751 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 +00006752
Martin v. Löwis11437992002-04-12 09:54:03 +00006753else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006754 if test "$ac_cv_type_void_p" = yes; then
6755 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6756$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006757as_fn_error 77 "cannot compute sizeof (void *)
Charles-François Natali97781b02011-07-22 23:43:42 +02006758See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006759 else
6760 ac_cv_sizeof_void_p=0
6761 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006762fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006763
Martin v. Löwis11437992002-04-12 09:54:03 +00006764fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6766$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006767
6768
6769
Martin v. Löwis11437992002-04-12 09:54:03 +00006770cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006771#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006772_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006773
6774
Martin v. Löwiseba40652007-08-30 20:10:57 +00006775# The cast to long int works around a bug in the HP C Compiler
6776# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6777# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6778# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6780$as_echo_n "checking size of short... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006781if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006782 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006784 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 +00006785
Martin v. Löwis11437992002-04-12 09:54:03 +00006786else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006787 if test "$ac_cv_type_short" = yes; then
6788 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6789$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006790as_fn_error 77 "cannot compute sizeof (short)
Charles-François Natali97781b02011-07-22 23:43:42 +02006791See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006792 else
6793 ac_cv_sizeof_short=0
6794 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006795fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006796
Martin v. Löwis11437992002-04-12 09:54:03 +00006797fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6799$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006800
6801
6802
Martin v. Löwis11437992002-04-12 09:54:03 +00006803cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006804#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006805_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006806
6807
Martin v. Löwiseba40652007-08-30 20:10:57 +00006808# The cast to long int works around a bug in the HP C Compiler
6809# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6810# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6811# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6813$as_echo_n "checking size of float... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006814if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006815 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006816else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006817 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 +00006818
Martin v. Löwis11437992002-04-12 09:54:03 +00006819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006820 if test "$ac_cv_type_float" = yes; then
6821 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6822$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006823as_fn_error 77 "cannot compute sizeof (float)
Charles-François Natali97781b02011-07-22 23:43:42 +02006824See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006825 else
6826 ac_cv_sizeof_float=0
6827 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006828fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006829
Martin v. Löwis11437992002-04-12 09:54:03 +00006830fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6832$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006833
6834
6835
Martin v. Löwis11437992002-04-12 09:54:03 +00006836cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006837#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006838_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006839
6840
Martin v. Löwiseba40652007-08-30 20:10:57 +00006841# The cast to long int works around a bug in the HP C Compiler
6842# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6843# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6844# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6846$as_echo_n "checking size of double... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006847if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006848 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006849else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006850 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 +00006851
Martin v. Löwis11437992002-04-12 09:54:03 +00006852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006853 if test "$ac_cv_type_double" = yes; then
6854 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6855$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006856as_fn_error 77 "cannot compute sizeof (double)
Charles-François Natali97781b02011-07-22 23:43:42 +02006857See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006858 else
6859 ac_cv_sizeof_double=0
6860 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006861fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006862
Martin v. Löwis11437992002-04-12 09:54:03 +00006863fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6865$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006866
6867
6868
Martin v. Löwis11437992002-04-12 09:54:03 +00006869cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006870#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006871_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006872
6873
Martin v. Löwiseba40652007-08-30 20:10:57 +00006874# The cast to long int works around a bug in the HP C Compiler
6875# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6876# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6877# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6879$as_echo_n "checking size of fpos_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006880if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006881 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006883 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 +00006884
Martin v. Löwis11437992002-04-12 09:54:03 +00006885else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006886 if test "$ac_cv_type_fpos_t" = yes; then
6887 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6888$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006889as_fn_error 77 "cannot compute sizeof (fpos_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02006890See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006891 else
6892 ac_cv_sizeof_fpos_t=0
6893 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006894fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006895
Martin v. Löwis11437992002-04-12 09:54:03 +00006896fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6898$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006899
6900
6901
Martin v. Löwis11437992002-04-12 09:54:03 +00006902cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006903#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006904_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006905
Michael W. Hudson54241132001-12-07 15:38:26 +00006906
Martin v. Löwiseba40652007-08-30 20:10:57 +00006907# The cast to long int works around a bug in the HP C Compiler
6908# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6909# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6910# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6912$as_echo_n "checking size of size_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006913if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006914 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006916 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 +00006917
Martin v. Löwis18e16552006-02-15 17:27:45 +00006918else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006919 if test "$ac_cv_type_size_t" = yes; then
6920 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6921$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006922as_fn_error 77 "cannot compute sizeof (size_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02006923See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006924 else
6925 ac_cv_sizeof_size_t=0
6926 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006927fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006928
Martin v. Löwis18e16552006-02-15 17:27:45 +00006929fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6931$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006932
6933
6934
Martin v. Löwis18e16552006-02-15 17:27:45 +00006935cat >>confdefs.h <<_ACEOF
6936#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6937_ACEOF
6938
6939
Christian Heimes951cc0f2008-01-31 23:08:23 +00006940# The cast to long int works around a bug in the HP C Compiler
6941# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6942# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6943# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6945$as_echo_n "checking size of pid_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006946if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006947 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00006948else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006949 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 +00006950
Christian Heimes951cc0f2008-01-31 23:08:23 +00006951else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006952 if test "$ac_cv_type_pid_t" = yes; then
6953 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006955as_fn_error 77 "cannot compute sizeof (pid_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02006956See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006957 else
6958 ac_cv_sizeof_pid_t=0
6959 fi
6960fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006961
Christian Heimes951cc0f2008-01-31 23:08:23 +00006962fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6964$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006965
6966
6967
6968cat >>confdefs.h <<_ACEOF
6969#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6970_ACEOF
6971
6972
Michael W. Hudson54241132001-12-07 15:38:26 +00006973
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6975$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006976have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006978/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006979
Martin v. Löwis11437992002-04-12 09:54:03 +00006980int
6981main ()
6982{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006983long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006984 ;
6985 return 0;
6986}
6987_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006988if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006989
6990
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006991$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006992
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006993 have_long_long=yes
6994
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006995fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6998$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006999if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007000# The cast to long int works around a bug in the HP C Compiler
7001# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7002# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7003# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7005$as_echo_n "checking size of long long... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007006if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007007 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007008else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007009 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 +00007010
Martin v. Löwis11437992002-04-12 09:54:03 +00007011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007012 if test "$ac_cv_type_long_long" = yes; then
7013 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7014$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007015as_fn_error 77 "cannot compute sizeof (long long)
Charles-François Natali97781b02011-07-22 23:43:42 +02007016See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007017 else
7018 ac_cv_sizeof_long_long=0
7019 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007020fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007021
Martin v. Löwis11437992002-04-12 09:54:03 +00007022fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7024$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007025
7026
7027
Martin v. Löwis11437992002-04-12 09:54:03 +00007028cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007029#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007030_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007031
Michael W. Hudson54241132001-12-07 15:38:26 +00007032
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007033fi
7034
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7036$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007037have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007039/* end confdefs.h. */
7040
7041int
7042main ()
7043{
Matthias Klosec511b472010-05-08 11:01:39 +00007044long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007045 ;
7046 return 0;
7047}
7048_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007049if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007050
7051
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007052$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007053
7054 have_long_double=yes
7055
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007056fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7059$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007060if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007061# The cast to long int works around a bug in the HP C Compiler
7062# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7063# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7064# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7066$as_echo_n "checking size of long double... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007067if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007068 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007069else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007070 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 +00007071
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007072else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007073 if test "$ac_cv_type_long_double" = yes; then
7074 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7075$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007076as_fn_error 77 "cannot compute sizeof (long double)
Charles-François Natali97781b02011-07-22 23:43:42 +02007077See \`config.log' for more details" "$LINENO" 5 ; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007078 else
7079 ac_cv_sizeof_long_double=0
7080 fi
7081fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007082
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007083fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7085$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007086
7087
7088
7089cat >>confdefs.h <<_ACEOF
7090#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7091_ACEOF
7092
7093
7094fi
7095
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7097$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007098have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007100/* end confdefs.h. */
7101
7102int
7103main ()
7104{
7105_Bool x; x = (_Bool)0;
7106 ;
7107 return 0;
7108}
7109_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007110if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007111
7112
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007113$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007114
7115 have_c99_bool=yes
7116
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7120$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007121if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007122# The cast to long int works around a bug in the HP C Compiler
7123# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7124# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7125# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7127$as_echo_n "checking size of _Bool... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007128if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007129 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007130else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007131 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 +00007132
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007133else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007134 if test "$ac_cv_type__Bool" = yes; then
7135 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007137as_fn_error 77 "cannot compute sizeof (_Bool)
Charles-François Natali97781b02011-07-22 23:43:42 +02007138See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007139 else
7140 ac_cv_sizeof__Bool=0
7141 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007142fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007143
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007144fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7146$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007147
7148
7149
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007150cat >>confdefs.h <<_ACEOF
7151#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7152_ACEOF
7153
7154
7155fi
7156
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007157ac_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 +00007158 #include <stdint.h>
7159 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007160 #ifdef HAVE_INTTYPES_H
7161 #include <inttypes.h>
7162 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007163"
Charles-François Natali97781b02011-07-22 23:43:42 +02007164if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007165
7166cat >>confdefs.h <<_ACEOF
7167#define HAVE_UINTPTR_T 1
7168_ACEOF
7169
Martin v. Löwiseba40652007-08-30 20:10:57 +00007170# The cast to long int works around a bug in the HP C Compiler
7171# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7172# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7173# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7175$as_echo_n "checking size of uintptr_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007176if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007177 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007178else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007179 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 +00007180
Martin v. Löwis11437992002-04-12 09:54:03 +00007181else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007182 if test "$ac_cv_type_uintptr_t" = yes; then
7183 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7184$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007185as_fn_error 77 "cannot compute sizeof (uintptr_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007186See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007187 else
7188 ac_cv_sizeof_uintptr_t=0
7189 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007190fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007191
Martin v. Löwis11437992002-04-12 09:54:03 +00007192fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7194$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007195
7196
7197
Martin v. Löwis11437992002-04-12 09:54:03 +00007198cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007199#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007200_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007201
Michael W. Hudson54241132001-12-07 15:38:26 +00007202
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007203fi
7204
Martin v. Löwisebe26702006-10-02 14:55:51 +00007205
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007206# The cast to long int works around a bug in the HP C Compiler
7207# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7208# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7209# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7211$as_echo_n "checking size of off_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007212if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007213 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007214else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007215 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007216#ifdef HAVE_SYS_TYPES_H
7217#include <sys/types.h>
7218#endif
7219
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007220"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007221
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007222else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007223 if test "$ac_cv_type_off_t" = yes; then
7224 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7225$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007226as_fn_error 77 "cannot compute sizeof (off_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007227See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007228 else
7229 ac_cv_sizeof_off_t=0
7230 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007231fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007232
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007233fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7235$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007236
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007237
7238
Martin v. Löwis11437992002-04-12 09:54:03 +00007239cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007240#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007241_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007242
Michael W. Hudson54241132001-12-07 15:38:26 +00007243
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007244
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7246$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007247if test "$have_long_long" = yes
7248then
7249if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007250 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007251
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007252$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007253
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7255$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007256else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7258$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007259fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007260else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7262$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007263fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007264
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007265# The cast to long int works around a bug in the HP C Compiler
7266# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7267# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7268# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7270$as_echo_n "checking size of time_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007271if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007272 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007273else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007274 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007275#ifdef HAVE_SYS_TYPES_H
7276#include <sys/types.h>
7277#endif
7278#ifdef HAVE_TIME_H
7279#include <time.h>
7280#endif
7281
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007282"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007283
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007284else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007285 if test "$ac_cv_type_time_t" = yes; then
7286 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7287$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007288as_fn_error 77 "cannot compute sizeof (time_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007289See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007290 else
7291 ac_cv_sizeof_time_t=0
7292 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007293fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007294
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007295fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7297$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007298
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007299
7300
Martin v. Löwis11437992002-04-12 09:54:03 +00007301cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007302#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007303_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007304
Michael W. Hudson54241132001-12-07 15:38:26 +00007305
7306
Trent Mick635f6fb2000-08-23 21:33:05 +00007307# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007308ac_save_cc="$CC"
7309if test "$ac_cv_kpthread" = "yes"
7310then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007311elif test "$ac_cv_kthread" = "yes"
7312then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007313elif test "$ac_cv_pthread" = "yes"
7314then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007315fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7317$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007318have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007320/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007321
7322 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007323int
7324main ()
7325{
Guido van Rossum12580492000-09-24 16:47:19 +00007326pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007327 ;
7328 return 0;
7329}
Matthias Klosec511b472010-05-08 11:01:39 +00007330
Martin v. Löwis11437992002-04-12 09:54:03 +00007331_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007332if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007333 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7337$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007338if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007339 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007340# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7341# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7342# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7344$as_echo_n "checking size of pthread_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007345if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007346 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007347else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007348 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007349#ifdef HAVE_PTHREAD_H
7350#include <pthread.h>
7351#endif
7352
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007353"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007354
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007355else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007356 if test "$ac_cv_type_pthread_t" = yes; then
7357 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7358$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007359as_fn_error 77 "cannot compute sizeof (pthread_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007360See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007361 else
7362 ac_cv_sizeof_pthread_t=0
7363 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007364fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007365
Trent Mick635f6fb2000-08-23 21:33:05 +00007366fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7368$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007369
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007370
7371
Martin v. Löwis11437992002-04-12 09:54:03 +00007372cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007373#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007374_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007375
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007376
Trent Mick635f6fb2000-08-23 21:33:05 +00007377fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007378CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007379
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7381$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007382# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007383if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007384 enableval=$enable_toolbox_glue;
7385fi
Jack Jansene578a632001-08-15 01:27:14 +00007386
7387
7388if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007389then
Jack Jansene578a632001-08-15 01:27:14 +00007390 case $ac_sys_system/$ac_sys_release in
7391 Darwin/*)
7392 enable_toolbox_glue="yes";;
7393 *)
7394 enable_toolbox_glue="no";;
7395 esac
7396fi
7397case "$enable_toolbox_glue" in
7398yes)
Jack Jansene578a632001-08-15 01:27:14 +00007399 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007400 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007401
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007402$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007403
7404 ;;
7405*)
Jack Jansene578a632001-08-15 01:27:14 +00007406 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007407 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007408 ;;
7409esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7411$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007412
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007413
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007414
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007415case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007416 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007417 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7418 ;;
7419 Darwin/*)
7420 OTHER_LIBTOOL_OPT=""
7421 ;;
7422esac
7423
7424
Ronald Oussoren25967582009-09-06 10:00:26 +00007425ARCH_RUN_32BIT=""
7426
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007427case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007428 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007429 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7430 if test "${enable_universalsdk}"; then
7431 :
7432 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007433 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007434 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007435 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007436 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007437 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007438 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007439 if test ${gcc_version} '<' 4.0
7440 then
7441 LIBTOOL_CRUFT="-lcc_dynamic"
7442 else
7443 LIBTOOL_CRUFT=""
7444 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007445 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00007446 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00007447else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007449/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00007450
Ronald Oussoren25967582009-09-06 10:00:26 +00007451 #include <unistd.h>
7452 int main(int argc, char*argv[])
7453 {
7454 if (sizeof(long) == 4) {
7455 return 0;
7456 } else {
7457 return 1;
7458 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00007459 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00007460
Ronald Oussoren25967582009-09-06 10:00:26 +00007461_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007462if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00007463 ac_osx_32bit=yes
7464else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007465 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00007466fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007467rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7468 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007469fi
7470
7471
Ronald Oussoren25967582009-09-06 10:00:26 +00007472 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007473 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007474 i386)
7475 MACOSX_DEFAULT_ARCH="i386"
7476 ;;
7477 ppc)
7478 MACOSX_DEFAULT_ARCH="ppc"
7479 ;;
7480 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007481 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007482 ;;
7483 esac
7484 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007485 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007486 i386)
7487 MACOSX_DEFAULT_ARCH="x86_64"
7488 ;;
7489 ppc)
7490 MACOSX_DEFAULT_ARCH="ppc64"
7491 ;;
7492 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007493 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007494 ;;
7495 esac
7496
7497 #ARCH_RUN_32BIT="true"
7498 fi
7499
7500 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007501 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007502 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007503esac
7504
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7506$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007507if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007508then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007509 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007510 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007511 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007512
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007513$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007514
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7516$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00007517 if test $enable_shared = "yes"
7518 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007519 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 +00007520 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007521else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7523$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007524fi
7525
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7527$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007528case $ac_sys_system/$ac_sys_release in
7529 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007530
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007531$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007532
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7534$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007535 ;;
7536 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7538$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007539 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007540esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007541
Guido van Rossum0a516c91994-09-12 10:58:40 +00007542# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007543
Michael W. Hudson54241132001-12-07 15:38:26 +00007544
7545
7546
7547
Ronald Oussoren75912852010-04-08 08:13:31 +00007548
Guido van Rossum0a516c91994-09-12 10:58:40 +00007549# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007550# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7552$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007553if test -z "$SO"
7554then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007555 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00007556 hp*|HP*)
7557 case `uname -m` in
7558 ia64) SO=.so;;
7559 *) SO=.sl;;
7560 esac
7561 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007562 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007563 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007564 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007565else
7566 # this might also be a termcap variable, see #610332
7567 echo
7568 echo '====================================================================='
7569 echo '+ +'
7570 echo '+ WARNING: You have set SO in your environment. +'
7571 echo '+ Do you really mean to change the extension for shared libraries? +'
7572 echo '+ Continuing in 10 seconds to let you to ponder. +'
7573 echo '+ +'
7574 echo '====================================================================='
7575 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007576fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7578$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00007579
Ronald Oussoren79f90492009-01-02 10:44:46 +00007580
Neal Norwitz58e28882006-05-19 07:00:58 +00007581cat >>confdefs.h <<_ACEOF
7582#define SHLIB_EXT "$SO"
7583_ACEOF
7584
Guido van Rossum0a516c91994-09-12 10:58:40 +00007585# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007586# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007587# (Shared libraries in this instance are shared modules to be loaded into
7588# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7590$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007591if test -z "$LDSHARED"
7592then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007593 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007594 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007595 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007596 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007597 ;;
7598 BeOS*)
7599 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00007600 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007601 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007602 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007603 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007604 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007605 if test "$GCC" = "yes" ; then
7606 LDSHARED='$(CC) -shared'
7607 LDCXXSHARED='$(CXX) -shared'
7608 else
7609 LDSHARED='$(CC) -G'
7610 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00007611 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00007612 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007613 if test "$GCC" = "yes" ; then
7614 LDSHARED='$(CC) -shared'
7615 LDCXXSHARED='$(CXX) -shared'
7616 else
7617 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00007618 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007619 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007620 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007621 LDSHARED='$(CC) -bundle'
7622 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007623 if test "$enable_framework" ; then
7624 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007625 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7626 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007627 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007628 else
7629 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007630 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00007631 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007632 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007633 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007634 LDSHARED='$(CC) -bundle'
7635 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007636 if test "$enable_framework" ; then
7637 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007638 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7639 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007640 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007641 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007642 # No framework, use the Python app as bundle-loader
7643 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007644 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007645 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007646 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007647 Darwin/*)
7648 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7649 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00007650
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007651 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007652 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00007653 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007654 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007655 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00007656 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7657 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007658 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007659 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007660 LDSHARED='$(CC) -bundle'
7661 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007662 if test "$enable_framework" ; then
7663 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007664 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7665 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007666 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007667 else
7668 # No framework, use the Python app as bundle-loader
7669 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7670 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007671 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007672 fi
7673 fi
7674 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007675 Linux*|GNU*|QNX*)
7676 LDSHARED='$(CC) -shared'
7677 LDCXXSHARED='$(CXX) -shared';;
7678 BSD/OS*/4*)
7679 LDSHARED="gcc -shared"
7680 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007681 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007682 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007683 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007684 LDSHARED='$(CC) -shared'
7685 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007686 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007687 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007688 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007689 OpenBSD*)
7690 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7691 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007692 LDSHARED='$(CC) -shared $(CCSHARED)'
7693 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007694 else
7695 case `uname -r` in
7696 [01].* | 2.[0-7] | 2.[0-7].*)
7697 LDSHARED="ld -Bshareable ${LDFLAGS}"
7698 ;;
7699 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007700 LDSHARED='$(CC) -shared $(CCSHARED)'
7701 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007702 ;;
7703 esac
7704 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007705 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00007706 LDSHARED='$(CC) -shared'
7707 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007708 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007709 if test "$GCC" = "yes" ; then
7710 LDSHARED='$(CC) -shared'
7711 LDCXXSHARED='$(CXX) -shared'
7712 else
7713 LDSHARED='$(CC) -G'
7714 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007715 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007716 SCO_SV*)
7717 LDSHARED='$(CC) -Wl,-G,-Bexport'
7718 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7719 CYGWIN*)
7720 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7721 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7722 atheos*)
7723 LDSHARED="gcc -shared"
7724 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007725 *) LDSHARED="ld";;
7726 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007727fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7729$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00007730LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007731BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007732# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007733# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7735$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007736if test -z "$CCSHARED"
7737then
Guido van Rossum07397971997-04-29 21:49:50 +00007738 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007739 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00007740 then CCSHARED="-fPIC";
7741 elif test `uname -p` = sparc;
7742 then CCSHARED="-xcode=pic32";
7743 else CCSHARED="-Kpic";
7744 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007745 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007746 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007747 else CCSHARED="+z";
7748 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007749 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007750 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007751 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007752 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007753 if test "$GCC" = "yes"
7754 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007755 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007756 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007757 SCO_SV*)
7758 if test "$GCC" = "yes"
7759 then CCSHARED="-fPIC"
7760 else CCSHARED="-Kpic -belf"
7761 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007762 IRIX*/6*) case $CC in
7763 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007764 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007765 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007766 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007767 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007768fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7770$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007771# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007772# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7774$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007775if test -z "$LINKFORSHARED"
7776then
Guido van Rossum07397971997-04-29 21:49:50 +00007777 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007778 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007779 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007780 LINKFORSHARED="-Wl,-E -Wl,+s";;
7781# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007782 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007783 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007784 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007785 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007786 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7787 # which is
Jack Jansene578a632001-08-15 01:27:14 +00007788 # not used by the core itself but which needs to be in the core so
7789 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00007790 # -prebind is no longer used, because it actually seems to give a
7791 # slowdown in stead of a speedup, maybe due to the large number of
7792 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007793
7794 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00007795 if test "$enable_framework"
7796 then
Jack Jansenda49e192005-01-07 13:08:22 +00007797 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007798 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007799 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007800 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007801 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007802 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007803 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007804 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7805 then
7806 LINKFORSHARED="-Wl,--export-dynamic"
7807 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007808 SunOS/5*) case $CC in
7809 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007810 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007811 then
7812 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007813 fi;;
7814 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007815 CYGWIN*)
7816 if test $enable_shared = "no"
7817 then
7818 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7819 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007820 QNX*)
7821 # -Wl,-E causes the symbols to be added to the dynamic
7822 # symbol table so that they can be found when a module
7823 # is loaded. -N 2048K causes the stack size to be set
7824 # to 2048 kilobytes so that the stack doesn't overflow
7825 # when running test_compile.py.
7826 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007827 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007828fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7830$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007831
Michael W. Hudson54241132001-12-07 15:38:26 +00007832
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007833
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7835$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007836if test ! "$LIBRARY" = "$LDLIBRARY"
7837then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007838 case $ac_sys_system in
7839 CYGWIN*)
7840 # Cygwin needs CCSHARED when building extension DLLs
7841 # but not when building the interpreter DLL.
7842 CFLAGSFORSHARED='';;
7843 *)
7844 CFLAGSFORSHARED='$(CCSHARED)'
7845 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007846fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7848$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007849
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007850# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7851# library (with --enable-shared).
7852# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007853# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7854# if it is not required, since it creates a dependency of the shared library
7855# to LIBS. This, in turn, means that applications linking the shared libpython
7856# don't need to link LIBS explicitly. The default should be only changed
7857# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007858
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7860$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007861case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007862 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007863 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007864esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7866$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007867
7868
Guido van Rossum627b2d71993-12-24 10:39:16 +00007869# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7871$as_echo_n "checking for dlopen in -ldl... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007872if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007873 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007874else
Martin v. Löwis11437992002-04-12 09:54:03 +00007875 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007876LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007879
Martin v. Löwiseba40652007-08-30 20:10:57 +00007880/* Override any GCC internal prototype to avoid an error.
7881 Use char because int might match the return type of a GCC
7882 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007883#ifdef __cplusplus
7884extern "C"
7885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007886char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007887int
7888main ()
7889{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007890return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 ;
7892 return 0;
7893}
7894_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007895if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007896 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007897else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007898 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007899fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007900rm -f core conftest.err conftest.$ac_objext \
7901 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007902LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007903fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7905$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007906if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007907 cat >>confdefs.h <<_ACEOF
7908#define HAVE_LIBDL 1
7909_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007910
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007911 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007912
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007913fi
7914 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7916$as_echo_n "checking for shl_load in -ldld... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007917if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007918 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007919else
Martin v. Löwis11437992002-04-12 09:54:03 +00007920 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007921LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007923/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007924
Martin v. Löwiseba40652007-08-30 20:10:57 +00007925/* Override any GCC internal prototype to avoid an error.
7926 Use char because int might match the return type of a GCC
7927 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007928#ifdef __cplusplus
7929extern "C"
7930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007931char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007932int
7933main ()
7934{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007935return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007936 ;
7937 return 0;
7938}
7939_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007940if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007941 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007943 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007944fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007945rm -f core conftest.err conftest.$ac_objext \
7946 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007947LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007948fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7950$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007951if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007952 cat >>confdefs.h <<_ACEOF
7953#define HAVE_LIBDLD 1
7954_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007955
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007956 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007957
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007958fi
7959 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007960
Ronald Oussoren79f90492009-01-02 10:44:46 +00007961# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007962if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7964$as_echo_n "checking for library containing sem_init... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007965if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007966 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007967else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007968 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007971
Martin v. Löwiseba40652007-08-30 20:10:57 +00007972/* Override any GCC internal prototype to avoid an error.
7973 Use char because int might match the return type of a GCC
7974 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007975#ifdef __cplusplus
7976extern "C"
7977#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007978char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007979int
7980main ()
7981{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007982return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007983 ;
7984 return 0;
7985}
7986_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007987for ac_lib in '' pthread rt posix4; do
7988 if test -z "$ac_lib"; then
7989 ac_res="none required"
7990 else
7991 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007992 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007993 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007994 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007995 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007996fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007997rm -f core conftest.err conftest.$ac_objext \
7998 conftest$ac_exeext
Charles-François Natali97781b02011-07-22 23:43:42 +02007999 if test "${ac_cv_search_sem_init+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008000 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008002done
Charles-François Natali97781b02011-07-22 23:43:42 +02008003if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008004
Martin v. Löwiseba40652007-08-30 20:10:57 +00008005else
8006 ac_cv_search_sem_init=no
8007fi
8008rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008009LIBS=$ac_func_search_save_LIBS
8010fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8012$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008013ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008014if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008015 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008016
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008017fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008018 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008019 # posix4 on Solaris 2.6
8020 # pthread (first!) on Linux
8021fi
8022
Martin v. Löwis19d17342003-06-14 21:03:05 +00008023# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8025$as_echo_n "checking for textdomain in -lintl... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008026if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008027 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008028else
8029 ac_check_lib_save_LIBS=$LIBS
8030LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008032/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008033
Martin v. Löwiseba40652007-08-30 20:10:57 +00008034/* Override any GCC internal prototype to avoid an error.
8035 Use char because int might match the return type of a GCC
8036 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008037#ifdef __cplusplus
8038extern "C"
8039#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008040char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008041int
8042main ()
8043{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008044return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008045 ;
8046 return 0;
8047}
8048_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008049if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008050 ac_cv_lib_intl_textdomain=yes
8051else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008052 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008053fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008054rm -f core conftest.err conftest.$ac_objext \
8055 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008056LIBS=$ac_check_lib_save_LIBS
8057fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8059$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008060if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008061
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008062$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008063
8064fi
8065
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008066
8067# checks for system dependent C++ extensions support
8068case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008069 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8070$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008072/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008073
Georg Brandl94800df2011-02-25 11:09:02 +00008074 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008075int
8076main ()
8077{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008078loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008079 ;
8080 return 0;
8081}
Matthias Klosec511b472010-05-08 11:01:39 +00008082
Martin v. Löwis11437992002-04-12 09:54:03 +00008083_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008084if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008085
Matthias Klosec511b472010-05-08 11:01:39 +00008086
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008087$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008088
Matthias Klosec511b472010-05-08 11:01:39 +00008089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008090$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008091
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008092else
Matthias Klosec511b472010-05-08 11:01:39 +00008093
8094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008095$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008096
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008097fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008098rm -f core conftest.err conftest.$ac_objext \
8099 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008100 *) ;;
8101esac
8102
Guido van Rossum70c7f481998-03-26 18:44:10 +00008103# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008104# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8106$as_echo_n "checking for t_open in -lnsl... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008107if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008108 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008109else
Martin v. Löwis11437992002-04-12 09:54:03 +00008110 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008111LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008114
Martin v. Löwiseba40652007-08-30 20:10:57 +00008115/* Override any GCC internal prototype to avoid an error.
8116 Use char because int might match the return type of a GCC
8117 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008118#ifdef __cplusplus
8119extern "C"
8120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008121char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008122int
8123main ()
8124{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008125return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008126 ;
8127 return 0;
8128}
8129_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008130if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008131 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008132else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008133 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008134fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008135rm -f core conftest.err conftest.$ac_objext \
8136 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008137LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008138fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8140$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008141if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008142 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008143fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008144 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8146$as_echo_n "checking for socket in -lsocket... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008147if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008148 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008149else
Martin v. Löwis11437992002-04-12 09:54:03 +00008150 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008151LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008154
Martin v. Löwiseba40652007-08-30 20:10:57 +00008155/* Override any GCC internal prototype to avoid an error.
8156 Use char because int might match the return type of a GCC
8157 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008158#ifdef __cplusplus
8159extern "C"
8160#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008161char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008162int
8163main ()
8164{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008165return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008166 ;
8167 return 0;
8168}
8169_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008170if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008171 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008172else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008173 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008174fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008175rm -f core conftest.err conftest.$ac_objext \
8176 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008177LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008178fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8180$as_echo "$ac_cv_lib_socket_socket" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008181if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008182 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008183fi
8184 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008185
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008186case "$ac_sys_system" in
8187BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8189$as_echo_n "checking for socket in -lnet... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008190if test "${ac_cv_lib_net_socket+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008191 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008192else
Martin v. Löwis11437992002-04-12 09:54:03 +00008193 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008194LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008197
Martin v. Löwiseba40652007-08-30 20:10:57 +00008198/* Override any GCC internal prototype to avoid an error.
8199 Use char because int might match the return type of a GCC
8200 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008201#ifdef __cplusplus
8202extern "C"
8203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008204char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008205int
8206main ()
8207{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008208return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008209 ;
8210 return 0;
8211}
8212_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008213if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008214 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008215else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008216 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008217fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008218rm -f core conftest.err conftest.$ac_objext \
8219 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008220LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008221fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8223$as_echo "$ac_cv_lib_net_socket" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008224if test "x$ac_cv_lib_net_socket" = x""yes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008225 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008226fi
8227 # BeOS
8228;;
8229esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008230
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8232$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008233
Martin v. Löwiseba40652007-08-30 20:10:57 +00008234# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008235if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008236 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8238$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008239LIBS="$withval $LIBS"
8240
8241else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8243$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008244fi
8245
Guido van Rossum7f43da71994-08-01 12:15:30 +00008246
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008247if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008248 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8249set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8251$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008252if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008253 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008254else
8255 case $PKG_CONFIG in
8256 [\\/]* | ?:[\\/]*)
8257 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8258 ;;
8259 *)
8260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8261for as_dir in $PATH
8262do
8263 IFS=$as_save_IFS
8264 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008265 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008266 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8267 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008268 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008269 break 2
8270 fi
8271done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008272 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008273IFS=$as_save_IFS
8274
8275 ;;
8276esac
8277fi
8278PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8279if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8281$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008282else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8284$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008285fi
8286
8287
8288fi
8289if test -z "$ac_cv_path_PKG_CONFIG"; then
8290 ac_pt_PKG_CONFIG=$PKG_CONFIG
8291 # Extract the first word of "pkg-config", so it can be a program name with args.
8292set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8294$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008295if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008296 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008297else
8298 case $ac_pt_PKG_CONFIG in
8299 [\\/]* | ?:[\\/]*)
8300 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8301 ;;
8302 *)
8303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8304for as_dir in $PATH
8305do
8306 IFS=$as_save_IFS
8307 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008308 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008309 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8310 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008311 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008312 break 2
8313 fi
8314done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008315 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008316IFS=$as_save_IFS
8317
8318 ;;
8319esac
8320fi
8321ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8322if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8324$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008325else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8327$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008328fi
8329
8330 if test "x$ac_pt_PKG_CONFIG" = x; then
8331 PKG_CONFIG=""
8332 else
8333 case $cross_compiling:$ac_tool_warned in
8334yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008335{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8336$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008337ac_tool_warned=yes ;;
8338esac
8339 PKG_CONFIG=$ac_pt_PKG_CONFIG
8340 fi
8341else
8342 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8343fi
8344
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008345
8346# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8348$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008349
8350# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008351if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008352 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008353else
8354 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008355fi
8356
8357
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8359$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008360
8361# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8363$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008364
8365# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008366if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008367 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008368else
8369 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008370fi
8371
8372
8373if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008374 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8375else
8376 LIBFFI_INCLUDEDIR=""
8377fi
8378
8379
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8381$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008382
Benjamin Peterson867475c2009-04-29 20:36:25 +00008383# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8385$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008386
8387# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008388if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008389 withval=$with_dbmliborder;
8390if test x$with_dbmliborder = xyes
8391then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008392as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008393else
8394 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8395 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8396 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008397 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008398 fi
8399 done
8400fi
8401fi
8402
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8404$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008405
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008406# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008407
8408
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8410$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008411
Martin v. Löwiseba40652007-08-30 20:10:57 +00008412# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008413if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008414 withval=$with_signal_module;
8415fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008416
8417
8418if test -z "$with_signal_module"
8419then with_signal_module="yes"
8420fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8422$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008423
8424if test "${with_signal_module}" = "yes"; then
8425 USE_SIGNAL_MODULE=""
8426 SIGNAL_OBJS=""
8427else
8428 USE_SIGNAL_MODULE="#"
8429 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8430fi
8431
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008432# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008433
Barry Warsawc0d24d82000-06-29 16:12:00 +00008434USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008435
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8437$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008438
Guido van Rossumec2f0731997-01-22 20:54:01 +00008439
Martin v. Löwiseba40652007-08-30 20:10:57 +00008440# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008441if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008442 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8444$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008445LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008446if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008447 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008448fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008449else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8451$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008452fi
8453
Martin v. Löwis11437992002-04-12 09:54:03 +00008454
8455# Templates for things AC_DEFINEd more than once.
8456# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008457
8458
Martin v. Löwis11437992002-04-12 09:54:03 +00008459
8460
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8462$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008463
Martin v. Löwiseba40652007-08-30 20:10:57 +00008464# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008465if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008466 withval=$with_threads;
8467fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008468
8469
Barry Warsawc0d24d82000-06-29 16:12:00 +00008470# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008471
Martin v. Löwiseba40652007-08-30 20:10:57 +00008472# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008473if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008474 withval=$with_thread; with_threads=$with_thread
8475fi
8476
Barry Warsawc0d24d82000-06-29 16:12:00 +00008477
8478if test -z "$with_threads"
8479then with_threads="yes"
8480fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8482$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00008483
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008484
Barry Warsawc0d24d82000-06-29 16:12:00 +00008485if test "$with_threads" = "no"
8486then
8487 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008488elif test "$ac_cv_pthread_is_default" = yes
8489then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008490 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008491
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008492 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008493 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008494
8495 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008496 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008497elif test "$ac_cv_kpthread" = "yes"
8498then
8499 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008500 if test "$ac_cv_cxx_thread" = "yes"; then
8501 CXX="$CXX -Kpthread"
8502 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008503 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008504
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008505 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008506 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008507elif test "$ac_cv_kthread" = "yes"
8508then
8509 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008510 if test "$ac_cv_cxx_thread" = "yes"; then
8511 CXX="$CXX -Kthread"
8512 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008513 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008514
8515 posix_threads=yes
8516 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008517elif test "$ac_cv_pthread" = "yes"
8518then
8519 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008520 if test "$ac_cv_cxx_thread" = "yes"; then
8521 CXX="$CXX -pthread"
8522 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008523 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008524
8525 posix_threads=yes
8526 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008527else
8528 if test ! -z "$with_threads" -a -d "$with_threads"
8529 then LDFLAGS="$LDFLAGS -L$with_threads"
8530 fi
8531 if test ! -z "$withval" -a -d "$withval"
8532 then LDFLAGS="$LDFLAGS -L$withval"
8533 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008534
8535 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008536 # define _POSIX_THREADS in unistd.h. Some apparently don't
8537 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8539$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008541/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008542
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008543#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008544#ifdef _POSIX_THREADS
8545yes
8546#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008547
8548_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008549if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008550 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008551 unistd_defines_pthreads=yes
8552else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008553 unistd_defines_pthreads=no
8554fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00008555rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008556
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8558$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008559
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008560 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008561
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008562 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 +02008563if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008564 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008565
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008566 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008567
Martin v. Löwis11437992002-04-12 09:54:03 +00008568
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008569$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008570
8571 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008572 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008573else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008574
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008575 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 +02008576if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008577 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008578
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008579 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008580
Martin v. Löwis11437992002-04-12 09:54:03 +00008581
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008582$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008583
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008584 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008585else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008586
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8588$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008589
Martin v. Löwiseba40652007-08-30 20:10:57 +00008590# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008591if test "${with_pth+set}" = set; then :
8592 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8593$as_echo "$withval" >&6; }
8594 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008595
8596
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008597$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008598
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008599 LIBS="-lpth $LIBS"
8600 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008601else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8603$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008604
8605 # Just looking for pthread_create in libpthread is not enough:
8606 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8607 # So we really have to include pthread.h, and then link.
8608 _libs=$LIBS
8609 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8611$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008613/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008614#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008615
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008616void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008617int
8618main ()
8619{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008620
8621pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008622 ;
8623 return 0;
8624}
8625_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008626if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008627
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8629$as_echo "yes" >&6; }
8630 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008631
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008632 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008633 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008634else
Martin v. Löwis11437992002-04-12 09:54:03 +00008635
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008636 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008637 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Charles-François Natali97781b02011-07-22 23:43:42 +02008638if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008639 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008640
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008641 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008642 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008643else
Guido van Rossumad678af1998-10-02 14:42:15 +00008644
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008645 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 +02008646if test "x$ac_cv_header_atheos_threads_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008647 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008648
8649
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008650$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008651
8652 THREADOBJ="Python/thread.o"
8653else
8654
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008655 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 +02008656if test "x$ac_cv_header_kernel_OS_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008657 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008658
8659
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008660$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008661
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008662 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008663else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008664
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8666$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008667if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008668 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008669else
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008671LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008674
Martin v. Löwiseba40652007-08-30 20:10:57 +00008675/* Override any GCC internal prototype to avoid an error.
8676 Use char because int might match the return type of a GCC
8677 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008678#ifdef __cplusplus
8679extern "C"
8680#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008681char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008682int
8683main ()
8684{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008685return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 ;
8687 return 0;
8688}
8689_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008690if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008692else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008693 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008694fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008695rm -f core conftest.err conftest.$ac_objext \
8696 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008697LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008698fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8700$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008701if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008702 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008703
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008704 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008705 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008706 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008707else
Greg Steinadf63d62000-07-05 10:38:09 +00008708
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8710$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008711if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008712 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008713else
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008715LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008718
Martin v. Löwiseba40652007-08-30 20:10:57 +00008719/* Override any GCC internal prototype to avoid an error.
8720 Use char because int might match the return type of a GCC
8721 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008722#ifdef __cplusplus
8723extern "C"
8724#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008725char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008726int
8727main ()
8728{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008729return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 ;
8731 return 0;
8732}
8733_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008734if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008735 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008736else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008737 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008738fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008739rm -f core conftest.err conftest.$ac_objext \
8740 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008741LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008742fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8744$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008745if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008746 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008747
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008748 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008749 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008750 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008751else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008752
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8754$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008755if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008756 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008757else
Martin v. Löwis11437992002-04-12 09:54:03 +00008758 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008759LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008762
Martin v. Löwiseba40652007-08-30 20:10:57 +00008763/* Override any GCC internal prototype to avoid an error.
8764 Use char because int might match the return type of a GCC
8765 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008766#ifdef __cplusplus
8767extern "C"
8768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008769char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008770int
8771main ()
8772{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008773return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008774 ;
8775 return 0;
8776}
8777_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008778if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008779 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008780else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008781 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008783rm -f core conftest.err conftest.$ac_objext \
8784 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008785LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008786fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8788$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008789if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008790 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008791
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008792 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008793 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008794 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008795else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008796
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8798$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008799if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008800 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008801else
Martin v. Löwis11437992002-04-12 09:54:03 +00008802 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008803LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008806
Martin v. Löwiseba40652007-08-30 20:10:57 +00008807/* Override any GCC internal prototype to avoid an error.
8808 Use char because int might match the return type of a GCC
8809 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008810#ifdef __cplusplus
8811extern "C"
8812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008813char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008814int
8815main ()
8816{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008817return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008818 ;
8819 return 0;
8820}
8821_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008822if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008823 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008825 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008826fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008827rm -f core conftest.err conftest.$ac_objext \
8828 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008829LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008830fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8832$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008833if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008834 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008835
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008836 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008837 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008838 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008839else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008840
Martin v. Löwis130fb172001-07-19 11:00:41 +00008841 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008842fi
8843
Guido van Rossum627b2d71993-12-24 10:39:16 +00008844
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008845fi
8846
Guido van Rossum0be3e491997-05-22 20:33:33 +00008847fi
8848
Guido van Rossum49545951997-12-02 19:28:29 +00008849fi
8850
Guido van Rossumb93a8621998-05-07 13:27:32 +00008851fi
8852
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008853
Michael W. Hudson54241132001-12-07 15:38:26 +00008854fi
8855
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008856
8857fi
8858
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008859fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008860rm -f core conftest.err conftest.$ac_objext \
8861 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008862fi
8863
Martin v. Löwis11437992002-04-12 09:54:03 +00008864fi
8865
8866
8867fi
8868
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008869
Michael W. Hudson54241132001-12-07 15:38:26 +00008870
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8872$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008873if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008874 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008875else
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008877LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008880
Martin v. Löwiseba40652007-08-30 20:10:57 +00008881/* Override any GCC internal prototype to avoid an error.
8882 Use char because int might match the return type of a GCC
8883 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008884#ifdef __cplusplus
8885extern "C"
8886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008887char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008888int
8889main ()
8890{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008891return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ;
8893 return 0;
8894}
8895_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008896if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008897 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008898else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008899 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008900fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008901rm -f core conftest.err conftest.$ac_objext \
8902 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008903LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008904fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8906$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008907if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008908 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008909
Martin v. Löwis130fb172001-07-19 11:00:41 +00008910 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008911 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008912 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008913fi
8914
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008915
Neal Norwitza978ab02002-11-02 16:58:05 +00008916 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8918$as_echo_n "checking for thr_create in -lthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008919if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008920 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008921else
Martin v. Löwis11437992002-04-12 09:54:03 +00008922 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008923LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008926
Martin v. Löwiseba40652007-08-30 20:10:57 +00008927/* Override any GCC internal prototype to avoid an error.
8928 Use char because int might match the return type of a GCC
8929 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008930#ifdef __cplusplus
8931extern "C"
8932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008933char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008934int
8935main ()
8936{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008937return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008938 ;
8939 return 0;
8940}
8941_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008942if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008943 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008944else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008945 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008946fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008947rm -f core conftest.err conftest.$ac_objext \
8948 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008949LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008950fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8952$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008953if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008954 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008955
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008956 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008957 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008958 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008959fi
8960
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008961 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008962
Martin v. Löwis130fb172001-07-19 11:00:41 +00008963 if test "$USE_THREAD_MODULE" != "#"
8964 then
8965 # If the above checks didn't disable threads, (at least) OSF1
8966 # needs this '-threads' argument during linking.
8967 case $ac_sys_system in
8968 OSF1) LDLAST=-threads;;
8969 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008970 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008971fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008972
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008973if test "$posix_threads" = "yes"; then
8974 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008975
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008976$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008977
8978 fi
8979
8980 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8981 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02008982 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008983$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008984
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008985 ;;
8986 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008987$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008988
8989 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02008990 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008991$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00008992
8993 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008994 esac
8995
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8997$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008998 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008999 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009000else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009001 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009002 ac_cv_pthread_system_supported=no
9003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009005/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009006#include <pthread.h>
9007 void *foo(void *parm) {
9008 return NULL;
9009 }
9010 main() {
9011 pthread_attr_t attr;
9012 pthread_t id;
9013 if (pthread_attr_init(&attr)) exit(-1);
9014 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9015 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9016 exit(0);
9017 }
9018_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009019if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009020 ac_cv_pthread_system_supported=yes
9021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009022 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009023fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9025 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009026fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009027
Martin v. Löwiseba40652007-08-30 20:10:57 +00009028
Guido van Rossum627b2d71993-12-24 10:39:16 +00009029fi
9030
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9032$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009033 if test "$ac_cv_pthread_system_supported" = "yes"; then
9034
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009035$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009036
9037 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009038 for ac_func in pthread_sigmask
9039do :
9040 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Charles-François Natali97781b02011-07-22 23:43:42 +02009041if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009042 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009043#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009044_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009045 case $ac_sys_system in
9046 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009047
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009048$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009049
9050 ;;
9051 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009052fi
9053done
9054
9055fi
9056
9057
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009058# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009059
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9061$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009062# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009063if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009064 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009065 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9067$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068 ipv6=no
9069 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009070 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9071$as_echo "yes" >&6; }
9072 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009073
9074 ipv6=yes
9075 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009076 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009077else
Martin v. Löwis11437992002-04-12 09:54:03 +00009078
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009079 if test "$cross_compiling" = yes; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009080
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9082$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009083 ipv6=no
9084
9085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009087/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009088 /* AF_INET6 available check */
9089#include <sys/types.h>
9090#include <sys/socket.h>
9091main()
9092{
9093 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9094 exit(1);
9095 else
9096 exit(0);
9097}
9098
Martin v. Löwis11437992002-04-12 09:54:03 +00009099_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009100if ac_fn_c_try_run "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009101
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9103$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009104 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009105
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009106else
Matthias Klosec511b472010-05-08 11:01:39 +00009107
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9109$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009110 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009111
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009112fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009113rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9114 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009115fi
9116
Martin v. Löwiseba40652007-08-30 20:10:57 +00009117
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009118if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9120$as_echo_n "checking if RFC2553 API is available... " >&6; }
9121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009122/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009123
9124 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009125#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009126int
9127main ()
9128{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009129struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009130 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009131 ;
9132 return 0;
9133}
Matthias Klosec511b472010-05-08 11:01:39 +00009134
Martin v. Löwis11437992002-04-12 09:54:03 +00009135_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009136if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009137
9138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009139$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009140 ipv6=yes
9141
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009142else
Matthias Klosec511b472010-05-08 11:01:39 +00009143
9144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009145$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009146 ipv6=no
9147
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009150fi
9151
9152if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009153 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009154
9155fi
9156
Martin v. Löwiseba40652007-08-30 20:10:57 +00009157fi
9158
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009159
9160ipv6type=unknown
9161ipv6lib=none
9162ipv6trylibc=no
9163
9164if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9166$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009167 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9168 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009169 case $i in
9170 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009172/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009173
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009174#include <netinet/in.h>
9175#ifdef IPV6_INRIA_VERSION
9176yes
9177#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009178_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009179if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009180 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009181 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009182fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009183rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009184
9185 ;;
9186 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009188/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009189
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009190#include <netinet/in.h>
9191#ifdef __KAME__
9192yes
9193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009194_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009195if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009196 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009197 ipv6type=$i;
9198 ipv6lib=inet6
9199 ipv6libdir=/usr/local/v6/lib
9200 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009201fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009202rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009203
9204 ;;
9205 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009207/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009208
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009209#include <features.h>
9210#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9211yes
9212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009213_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009214if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009215 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009216 ipv6type=$i;
9217 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009218fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009219rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009220
9221 ;;
9222 linux-inet6)
9223 if test -d /usr/inet6; then
9224 ipv6type=$i
9225 ipv6lib=inet6
9226 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009227 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009228 fi
9229 ;;
9230 solaris)
9231 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009232 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009233 ipv6type=$i
9234 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009235 fi
9236 fi
9237 ;;
9238 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009240/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009241
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009242#include <sys/param.h>
9243#ifdef _TOSHIBA_INET6
9244yes
9245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009246_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009248 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009249 ipv6type=$i;
9250 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009251 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009252fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009253rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009254
9255 ;;
9256 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009258/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009259
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009260#include </usr/local/v6/include/sys/v6config.h>
9261#ifdef __V6D__
9262yes
9263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009264_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009265if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009266 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009267 ipv6type=$i;
9268 ipv6lib=v6;
9269 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009270 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009271fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009272rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009273
9274 ;;
9275 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009277/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009278
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009279#include <sys/param.h>
9280#ifdef _ZETA_MINAMI_INET6
9281yes
9282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009283_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009284if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009285 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009286 ipv6type=$i;
9287 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009288 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009289fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009290rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009291
9292 ;;
9293 esac
9294 if test "$ipv6type" != "unknown"; then
9295 break
9296 fi
9297 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9299$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009300fi
9301
9302if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9303 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9304 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9305 echo "using lib$ipv6lib"
9306 else
9307 if test $ipv6trylibc = "yes"; then
9308 echo "using libc"
9309 else
9310 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9311 echo "You need to fetch lib$ipv6lib.a from appropriate"
9312 echo 'ipv6 kit and compile beforehand.'
9313 exit 1
9314 fi
9315 fi
9316fi
9317
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9319$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009321/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009322
9323 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009324int
9325main ()
9326{
9327FSIORefNum fRef = 0
9328 ;
9329 return 0;
9330}
Mark Dickinson0712b562010-05-08 19:13:21 +00009331
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009332_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009333if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009334
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009335
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009336$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009337
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9339$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009340
Mark Dickinson0712b562010-05-08 19:13:21 +00009341else
9342
9343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9344$as_echo "no" >&6; }
9345
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009346fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9348
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009349# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9351$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009352
Martin v. Löwiseba40652007-08-30 20:10:57 +00009353# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009354if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009355 withval=$with_doc_strings;
9356fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009357
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009358
9359if test -z "$with_doc_strings"
9360then with_doc_strings="yes"
9361fi
9362if test "$with_doc_strings" != "no"
9363then
9364
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009365$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009366
9367fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9369$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009370
Neil Schemenauera35c6882001-02-27 04:45:05 +00009371# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9373$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009374
Martin v. Löwiseba40652007-08-30 20:10:57 +00009375# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009376if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009377 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009378if test "$withval" != no
9379then
9380
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009381$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009382
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9384$as_echo "yes" >&6; }
9385else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9386$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009387fi
9388else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9390$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009391fi
9392
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009393
9394# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9396$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009397
Martin v. Löwiseba40652007-08-30 20:10:57 +00009398# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009399if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009400 withval=$with_pymalloc;
9401fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009402
Neil Schemenauera35c6882001-02-27 04:45:05 +00009403
Neil Schemenauer16c22972002-03-22 15:34:49 +00009404if test -z "$with_pymalloc"
9405then with_pymalloc="yes"
9406fi
9407if test "$with_pymalloc" != "no"
9408then
Martin v. Löwis11437992002-04-12 09:54:03 +00009409
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009410$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009411
9412fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9414$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009415
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009416# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9418$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009419
9420# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009421if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009422 withval=$with_valgrind;
9423else
9424 with_valgrind=no
9425fi
9426
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9428$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009429if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009430 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 +02009431if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009432
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009433$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009434
9435else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009436 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009437
9438fi
9439
9440
9441fi
9442
Barry Warsawef82cd72000-06-30 16:21:01 +00009443# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9445$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009446
Martin v. Löwiseba40652007-08-30 20:10:57 +00009447# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009448if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009449 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009450if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009451then
9452
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009453$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009454
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9456$as_echo "yes" >&6; }
9457else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9458$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009459fi
9460else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9462$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009463fi
9464
Barry Warsawef82cd72000-06-30 16:21:01 +00009465
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009466# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009467
Guido van Rossum98935bf2001-09-05 19:13:16 +00009468DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009469
Guido van Rossume97ee181999-12-20 21:27:22 +00009470# the dlopen() function means we might want to use dynload_shlib.o. some
9471# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009472for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009473do :
9474 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Charles-François Natali97781b02011-07-22 23:43:42 +02009475if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009477#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009478_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009479
Guido van Rossume97ee181999-12-20 21:27:22 +00009480fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009481done
Guido van Rossume97ee181999-12-20 21:27:22 +00009482
Michael W. Hudson54241132001-12-07 15:38:26 +00009483
Guido van Rossume97ee181999-12-20 21:27:22 +00009484# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9485# loading of modules.
9486
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9488$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009489if test -z "$DYNLOADFILE"
9490then
9491 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009492 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9493 if test "$ac_cv_func_dlopen" = yes
9494 then DYNLOADFILE="dynload_shlib.o"
9495 else DYNLOADFILE="dynload_aix.o"
9496 fi
9497 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009498 BeOS*) DYNLOADFILE="dynload_beos.o";;
9499 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009500 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9501 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009502 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009503 *)
9504 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9505 # out any dynamic loading
9506 if test "$ac_cv_func_dlopen" = yes
9507 then DYNLOADFILE="dynload_shlib.o"
9508 else DYNLOADFILE="dynload_stub.o"
9509 fi
9510 ;;
9511 esac
9512fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9514$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009515if test "$DYNLOADFILE" != "dynload_stub.o"
9516then
Martin v. Löwis11437992002-04-12 09:54:03 +00009517
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009518$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009519
9520fi
9521
Neil Schemenauer4e425612001-06-19 15:44:15 +00009522# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9523
Michael W. Hudson54241132001-12-07 15:38:26 +00009524
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9526$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009527if test -z "$MACHDEP_OBJS"
9528then
Jack Jansene578a632001-08-15 01:27:14 +00009529 MACHDEP_OBJS=$extra_machdep_objs
9530else
9531 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009532fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9534$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009535
Guido van Rossum627b2d71993-12-24 10:39:16 +00009536# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009537for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9538 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009539 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009540 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009541 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009542 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009543 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009544 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9545 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009546 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009547 setlocale setregid setreuid setresuid setresgid \
9548 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009549 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009550 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009551 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009552do :
9553 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9554ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009555if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009556 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009557#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009558_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009559
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009560fi
9561done
9562
Michael W. Hudson54241132001-12-07 15:38:26 +00009563
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009564# For some functions, having a definition is not sufficient, since
9565# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9567$as_echo_n "checking for chroot... " >&6; }
9568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009569/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009570#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009571int
9572main ()
9573{
9574void *x=chroot
9575 ;
9576 return 0;
9577}
9578_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009579if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009580
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009581$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009582
Matthias Klosec511b472010-05-08 11:01:39 +00009583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009584$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009585else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9587$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009588
9589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9592$as_echo_n "checking for link... " >&6; }
9593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009594/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009595#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009596int
9597main ()
9598{
9599void *x=link
9600 ;
9601 return 0;
9602}
9603_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009604if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009605
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009606$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009607
Matthias Klosec511b472010-05-08 11:01:39 +00009608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009609$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009610else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9612$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009613
9614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9617$as_echo_n "checking for symlink... " >&6; }
9618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009619/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009620#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009621int
9622main ()
9623{
9624void *x=symlink
9625 ;
9626 return 0;
9627}
9628_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009629if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009630
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009631$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009632
Matthias Klosec511b472010-05-08 11:01:39 +00009633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009634$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009635else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9637$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009638
9639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9642$as_echo_n "checking for fchdir... " >&6; }
9643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009644/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009645#include <unistd.h>
9646int
9647main ()
9648{
9649void *x=fchdir
9650 ;
9651 return 0;
9652}
9653_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009654if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009655
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009656$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009657
Matthias Klosec511b472010-05-08 11:01:39 +00009658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009659$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009660else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9662$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009663
9664fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9667$as_echo_n "checking for fsync... " >&6; }
9668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009669/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009670#include <unistd.h>
9671int
9672main ()
9673{
9674void *x=fsync
9675 ;
9676 return 0;
9677}
9678_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009679if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009680
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009681$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009682
Matthias Klosec511b472010-05-08 11:01:39 +00009683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009684$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009685else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9687$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009688
9689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9692$as_echo_n "checking for fdatasync... " >&6; }
9693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009694/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009695#include <unistd.h>
9696int
9697main ()
9698{
9699void *x=fdatasync
9700 ;
9701 return 0;
9702}
9703_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009704if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009705
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009706$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009707
Matthias Klosec511b472010-05-08 11:01:39 +00009708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009709$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009710else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9712$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009713
9714fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9717$as_echo_n "checking for epoll... " >&6; }
9718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009719/* end confdefs.h. */
9720#include <sys/epoll.h>
9721int
9722main ()
9723{
9724void *x=epoll_create
9725 ;
9726 return 0;
9727}
9728_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009729if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009730
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009731$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009732
Matthias Klosec511b472010-05-08 11:01:39 +00009733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009734$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009735else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9737$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009738
9739fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9742$as_echo_n "checking for kqueue... " >&6; }
9743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009744/* end confdefs.h. */
9745
9746#include <sys/types.h>
9747#include <sys/event.h>
9748
9749int
9750main ()
9751{
9752int x=kqueue()
9753 ;
9754 return 0;
9755}
9756_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009757if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009758
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009759$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009760
Matthias Klosec511b472010-05-08 11:01:39 +00009761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009762$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009763else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9765$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009766
9767fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009769# On some systems (eg. FreeBSD 5), we would find a definition of the
9770# functions ctermid_r, setgroups in the library, but no prototype
9771# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9772# address to avoid compiler warnings and potential miscompilations
9773# because of the missing prototypes.
9774
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9776$as_echo_n "checking for ctermid_r... " >&6; }
9777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009778/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009779
Martin v. Löwisd5843682002-11-21 20:41:28 +00009780#include <stdio.h>
9781
Martin v. Löwisd5843682002-11-21 20:41:28 +00009782int
9783main ()
9784{
9785void* p = ctermid_r
9786 ;
9787 return 0;
9788}
9789_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009790if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009791
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009792$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009793
Matthias Klosec511b472010-05-08 11:01:39 +00009794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009795$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9798$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009799
9800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9802
Antoine Pitroub170f172010-09-10 18:47:36 +00009803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9804$as_echo_n "checking for flock declaration... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009805if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009806 $as_echo_n "(cached) " >&6
9807else
9808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009809/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009810#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009811int
9812main ()
9813{
9814void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +00009815
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009816 ;
9817 return 0;
9818}
9819_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009820if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009821 ac_cv_flock_decl=yes
9822else
9823 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009824
9825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +00009827
Antoine Pitroub170f172010-09-10 18:47:36 +00009828fi
9829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9830$as_echo "$ac_cv_flock_decl" >&6; }
9831if test "x${ac_cv_flock_decl}" = xyes; then
9832 for ac_func in flock
9833do :
9834 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Charles-François Natali97781b02011-07-22 23:43:42 +02009835if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009836 cat >>confdefs.h <<_ACEOF
9837#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +00009838_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +00009839
Antoine Pitrou85729812010-09-07 14:55:24 +00009840else
Antoine Pitroub170f172010-09-10 18:47:36 +00009841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +00009842$as_echo_n "checking for flock in -lbsd... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009843if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitrou85729812010-09-07 14:55:24 +00009844 $as_echo_n "(cached) " >&6
9845else
9846 ac_check_lib_save_LIBS=$LIBS
9847LIBS="-lbsd $LIBS"
9848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9849/* end confdefs.h. */
9850
9851/* Override any GCC internal prototype to avoid an error.
9852 Use char because int might match the return type of a GCC
9853 builtin and then its argument prototype would still apply. */
9854#ifdef __cplusplus
9855extern "C"
9856#endif
9857char flock ();
9858int
9859main ()
9860{
9861return flock ();
9862 ;
9863 return 0;
9864}
9865_ACEOF
9866if ac_fn_c_try_link "$LINENO"; then :
9867 ac_cv_lib_bsd_flock=yes
9868else
9869 ac_cv_lib_bsd_flock=no
9870fi
9871rm -f core conftest.err conftest.$ac_objext \
9872 conftest$ac_exeext conftest.$ac_ext
9873LIBS=$ac_check_lib_save_LIBS
9874fi
9875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9876$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009877if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009878 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +00009879
9880
9881$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9882
9883
9884fi
9885
9886
9887fi
Antoine Pitroub170f172010-09-10 18:47:36 +00009888done
9889
Antoine Pitrou85729812010-09-07 14:55:24 +00009890fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009891
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9893$as_echo_n "checking for getpagesize... " >&6; }
9894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009895/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009896
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009897#include <unistd.h>
9898
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009899int
9900main ()
9901{
9902void* p = getpagesize
9903 ;
9904 return 0;
9905}
9906_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009907if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009908
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009909$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009910
Matthias Klosec511b472010-05-08 11:01:39 +00009911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009912$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009913else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9915$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009916
9917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009919
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009920for ac_prog in true
9921do
9922 # Extract the first word of "$ac_prog", so it can be a program name with args.
9923set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9925$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009926if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009927 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009928else
9929 if test -n "$TRUE"; then
9930 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9931else
9932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9933for as_dir in $PATH
9934do
9935 IFS=$as_save_IFS
9936 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009937 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00009938 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 +00009939 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009940 $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 +00009941 break 2
9942 fi
9943done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009944 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00009945IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009946
9947fi
9948fi
9949TRUE=$ac_cv_prog_TRUE
9950if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9952$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009953else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9955$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009956fi
9957
Martin v. Löwiseba40652007-08-30 20:10:57 +00009958
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009959 test -n "$TRUE" && break
9960done
9961test -n "$TRUE" || TRUE="/bin/true"
9962
9963
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9965$as_echo_n "checking for inet_aton in -lc... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009966if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009967 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009968else
9969 ac_check_lib_save_LIBS=$LIBS
9970LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009972/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009973
Martin v. Löwiseba40652007-08-30 20:10:57 +00009974/* Override any GCC internal prototype to avoid an error.
9975 Use char because int might match the return type of a GCC
9976 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009977#ifdef __cplusplus
9978extern "C"
9979#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009980char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009981int
9982main ()
9983{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009984return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009985 ;
9986 return 0;
9987}
9988_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009989if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009990 ac_cv_lib_c_inet_aton=yes
9991else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009992 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009993fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009994rm -f core conftest.err conftest.$ac_objext \
9995 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009996LIBS=$ac_check_lib_save_LIBS
9997fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9999$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010000if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010001 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010002else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10004$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010005if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010006 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010007else
10008 ac_check_lib_save_LIBS=$LIBS
10009LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010011/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010012
Martin v. Löwiseba40652007-08-30 20:10:57 +000010013/* Override any GCC internal prototype to avoid an error.
10014 Use char because int might match the return type of a GCC
10015 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010016#ifdef __cplusplus
10017extern "C"
10018#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010019char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010020int
10021main ()
10022{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010023return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010024 ;
10025 return 0;
10026}
10027_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010028if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010029 ac_cv_lib_resolv_inet_aton=yes
10030else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010031 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010032fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010033rm -f core conftest.err conftest.$ac_objext \
10034 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010035LIBS=$ac_check_lib_save_LIBS
10036fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10038$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010039if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010040 cat >>confdefs.h <<_ACEOF
10041#define HAVE_LIBRESOLV 1
10042_ACEOF
10043
10044 LIBS="-lresolv $LIBS"
10045
10046fi
10047
10048
10049fi
10050
10051
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010052# On Tru64, chflags seems to be present, but calling it will
10053# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10055$as_echo_n "checking for chflags... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010056if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010057 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010058else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010059 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010060 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010061else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010063/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010064
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010065#include <sys/stat.h>
10066#include <unistd.h>
10067int main(int argc, char*argv[])
10068{
10069 if(chflags(argv[0], 0) != 0)
10070 return 1;
10071 return 0;
10072}
Ned Deily43e10542011-06-27 23:41:53 -070010073
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010074_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010075if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010076 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010078 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010079fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10081 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010082fi
10083
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010084
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010085fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10087$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010088if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010089 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Charles-François Natali97781b02011-07-22 23:43:42 +020010090if test "x$ac_cv_func_chflags" = x""yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010091 ac_cv_have_chflags="yes"
10092else
10093 ac_cv_have_chflags="no"
10094fi
10095
10096fi
10097if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010098
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010099$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010100
10101fi
10102
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10104$as_echo_n "checking for lchflags... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010105if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010106 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010107else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010108 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010109 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010110else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010112/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010113
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010114#include <sys/stat.h>
10115#include <unistd.h>
10116int main(int argc, char*argv[])
10117{
10118 if(lchflags(argv[0], 0) != 0)
10119 return 1;
10120 return 0;
10121}
Ned Deily43e10542011-06-27 23:41:53 -070010122
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010123_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010124if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010125 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010126else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010127 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010129rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10130 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010131fi
10132
10133
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010134fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10136$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010137if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010138 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Charles-François Natali97781b02011-07-22 23:43:42 +020010139if test "x$ac_cv_func_lchflags" = x""yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010140 ac_cv_have_lchflags="yes"
10141else
10142 ac_cv_have_lchflags="no"
10143fi
10144
10145fi
10146if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010147
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010148$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010149
10150fi
10151
Ronald Oussorenf8752642006-07-06 10:13:35 +000010152case $ac_sys_system/$ac_sys_release in
10153Darwin/*)
10154 _CUR_CFLAGS="${CFLAGS}"
10155 _CUR_LDFLAGS="${LDFLAGS}"
10156 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10157 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10158 ;;
10159esac
10160
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10162$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010163if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010164 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010165else
10166 ac_check_lib_save_LIBS=$LIBS
10167LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010169/* end confdefs.h. */
10170
Martin v. Löwiseba40652007-08-30 20:10:57 +000010171/* Override any GCC internal prototype to avoid an error.
10172 Use char because int might match the return type of a GCC
10173 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010174#ifdef __cplusplus
10175extern "C"
10176#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010177char inflateCopy ();
10178int
10179main ()
10180{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010181return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010182 ;
10183 return 0;
10184}
10185_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010186if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010187 ac_cv_lib_z_inflateCopy=yes
10188else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010189 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010190fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010191rm -f core conftest.err conftest.$ac_objext \
10192 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010193LIBS=$ac_check_lib_save_LIBS
10194fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10196$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010197if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010198
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010199$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010200
10201fi
10202
10203
Ronald Oussorenf8752642006-07-06 10:13:35 +000010204case $ac_sys_system/$ac_sys_release in
10205Darwin/*)
10206 CFLAGS="${_CUR_CFLAGS}"
10207 LDFLAGS="${_CUR_LDFLAGS}"
10208 ;;
10209esac
10210
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10212$as_echo_n "checking for hstrerror... " >&6; }
10213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010214/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010215
Martin v. Löwise9416172003-05-03 10:12:45 +000010216#include <netdb.h>
10217
Martin v. Löwise9416172003-05-03 10:12:45 +000010218int
10219main ()
10220{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010221void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010222 ;
10223 return 0;
10224}
10225_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010226if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010227
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010228$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010229
Matthias Klosec511b472010-05-08 11:01:39 +000010230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010231$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010232else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10234$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010235
10236fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010237rm -f core conftest.err conftest.$ac_objext \
10238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010239
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10241$as_echo_n "checking for inet_aton... " >&6; }
10242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010243/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010244
Martin v. Löwis86d66262006-02-17 08:40:11 +000010245#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010246#include <sys/socket.h>
10247#include <netinet/in.h>
10248#include <arpa/inet.h>
10249
Martin v. Löwise9416172003-05-03 10:12:45 +000010250int
10251main ()
10252{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010253void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010254 ;
10255 return 0;
10256}
10257_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010258if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010259
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010260$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010261
Matthias Klosec511b472010-05-08 11:01:39 +000010262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010263$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010264else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10266$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010267
10268fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010269rm -f core conftest.err conftest.$ac_objext \
10270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010271
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10273$as_echo_n "checking for inet_pton... " >&6; }
10274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010275/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010276
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010277#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010278#include <sys/socket.h>
10279#include <netinet/in.h>
10280#include <arpa/inet.h>
10281
Martin v. Löwise9416172003-05-03 10:12:45 +000010282int
10283main ()
10284{
10285void* p = inet_pton
10286 ;
10287 return 0;
10288}
10289_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010290if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010291
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010292$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010293
Matthias Klosec511b472010-05-08 11:01:39 +000010294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010295$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010296else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010299
10300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010302
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010303# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10305$as_echo_n "checking for setgroups... " >&6; }
10306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010307/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010308
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010309#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010310#ifdef HAVE_GRP_H
10311#include <grp.h>
10312#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010313
Martin v. Löwisd5843682002-11-21 20:41:28 +000010314int
10315main ()
10316{
10317void* p = setgroups
10318 ;
10319 return 0;
10320}
10321_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010322if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010323
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010324$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010325
Matthias Klosec511b472010-05-08 11:01:39 +000010326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010327$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010328else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10330$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010331
10332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010334
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010335# check for openpty and forkpty
10336
10337for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010338do :
10339 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Charles-François Natali97781b02011-07-22 23:43:42 +020010340if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010341 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010342#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010343_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010344
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010345else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10347$as_echo_n "checking for openpty in -lutil... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010348if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010349 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010350else
Martin v. Löwis11437992002-04-12 09:54:03 +000010351 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010352LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010355
Martin v. Löwiseba40652007-08-30 20:10:57 +000010356/* Override any GCC internal prototype to avoid an error.
10357 Use char because int might match the return type of a GCC
10358 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010359#ifdef __cplusplus
10360extern "C"
10361#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010362char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010363int
10364main ()
10365{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010366return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010367 ;
10368 return 0;
10369}
10370_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010371if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010372 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010373else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010374 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010375fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010376rm -f core conftest.err conftest.$ac_objext \
10377 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010378LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010379fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10381$as_echo "$ac_cv_lib_util_openpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010382if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010383 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010384 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010385else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10387$as_echo_n "checking for openpty in -lbsd... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010388if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010389 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010390else
10391 ac_check_lib_save_LIBS=$LIBS
10392LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010394/* end confdefs.h. */
10395
Martin v. Löwiseba40652007-08-30 20:10:57 +000010396/* Override any GCC internal prototype to avoid an error.
10397 Use char because int might match the return type of a GCC
10398 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010399#ifdef __cplusplus
10400extern "C"
10401#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010402char openpty ();
10403int
10404main ()
10405{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010406return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010407 ;
10408 return 0;
10409}
10410_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010411if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010412 ac_cv_lib_bsd_openpty=yes
10413else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010414 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010415fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010416rm -f core conftest.err conftest.$ac_objext \
10417 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010418LIBS=$ac_check_lib_save_LIBS
10419fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10421$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010422if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010423 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010424 LIBS="$LIBS -lbsd"
10425fi
10426
10427
10428fi
10429
Fred Drake8cef4cf2000-06-28 16:40:38 +000010430
10431fi
10432done
10433
10434for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010435do :
10436 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Charles-François Natali97781b02011-07-22 23:43:42 +020010437if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010438 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010439#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010440_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010441
Fred Drake8cef4cf2000-06-28 16:40:38 +000010442else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10444$as_echo_n "checking for forkpty in -lutil... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010445if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010446 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010447else
Martin v. Löwis11437992002-04-12 09:54:03 +000010448 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010449LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010451/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010452
Martin v. Löwiseba40652007-08-30 20:10:57 +000010453/* Override any GCC internal prototype to avoid an error.
10454 Use char because int might match the return type of a GCC
10455 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010456#ifdef __cplusplus
10457extern "C"
10458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010459char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010460int
10461main ()
10462{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010463return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010464 ;
10465 return 0;
10466}
10467_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010468if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010469 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010470else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010471 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010472fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010473rm -f core conftest.err conftest.$ac_objext \
10474 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010475LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010476fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10478$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010479if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010480 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010481 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010482else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10484$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010485if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010486 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010487else
10488 ac_check_lib_save_LIBS=$LIBS
10489LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010491/* end confdefs.h. */
10492
Martin v. Löwiseba40652007-08-30 20:10:57 +000010493/* Override any GCC internal prototype to avoid an error.
10494 Use char because int might match the return type of a GCC
10495 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010496#ifdef __cplusplus
10497extern "C"
10498#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010499char forkpty ();
10500int
10501main ()
10502{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010503return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010504 ;
10505 return 0;
10506}
10507_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010508if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010509 ac_cv_lib_bsd_forkpty=yes
10510else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010511 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010512fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010513rm -f core conftest.err conftest.$ac_objext \
10514 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010515LIBS=$ac_check_lib_save_LIBS
10516fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10518$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010519if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010520 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010521 LIBS="$LIBS -lbsd"
10522fi
10523
10524
10525fi
10526
Fred Drake8cef4cf2000-06-28 16:40:38 +000010527
10528fi
10529done
10530
Jack Jansendd19cf82001-12-06 22:36:17 +000010531
Brett Cannonaa5778d2008-03-18 04:09:00 +000010532# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010533for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010534do :
10535 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Charles-François Natali97781b02011-07-22 23:43:42 +020010536if test "x$ac_cv_func_memmove" = x""yes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010537 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010538#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010539_ACEOF
10540
10541fi
10542done
10543
10544
Michael W. Hudson54241132001-12-07 15:38:26 +000010545# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010546for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010547do :
10548 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10549ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010550if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010551 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010552#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010553_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010554
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010555fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010556done
10557
Michael W. Hudson54241132001-12-07 15:38:26 +000010558
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010559ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Charles-François Natali97781b02011-07-22 23:43:42 +020010560if test "x$ac_cv_func_dup2" = x""yes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010561 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010562
Martin v. Löwis1142de32002-03-29 16:28:31 +000010563else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010564 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010565 *" dup2.$ac_objext "* ) ;;
10566 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000010567 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010568esac
10569
Martin v. Löwis1142de32002-03-29 16:28:31 +000010570fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010571
10572ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Charles-François Natali97781b02011-07-22 23:43:42 +020010573if test "x$ac_cv_func_getcwd" = x""yes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010574 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10575
10576else
10577 case " $LIBOBJS " in
10578 *" getcwd.$ac_objext "* ) ;;
10579 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10580 ;;
10581esac
10582
10583fi
10584
10585ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Charles-François Natali97781b02011-07-22 23:43:42 +020010586if test "x$ac_cv_func_strdup" = x""yes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010587 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10588
10589else
10590 case " $LIBOBJS " in
10591 *" strdup.$ac_objext "* ) ;;
10592 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10593 ;;
10594esac
10595
10596fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010597
10598
10599for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010600do :
10601 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Charles-François Natali97781b02011-07-22 23:43:42 +020010602if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010603 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010604#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010605_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010607/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010608#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010609int
10610main ()
10611{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010612getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010613 ;
10614 return 0;
10615}
10616_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010617if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010618
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010619$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010620
Guido van Rossum627b2d71993-12-24 10:39:16 +000010621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010623
Guido van Rossum627b2d71993-12-24 10:39:16 +000010624fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010625done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010626
Jack Jansen150753c2003-03-29 22:07:47 +000010627for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010628do :
10629 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Charles-François Natali97781b02011-07-22 23:43:42 +020010630if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010631 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010632#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010633_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010635/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010636#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010637int
10638main ()
10639{
10640setpgrp(0,0);
10641 ;
10642 return 0;
10643}
10644_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010645if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010646
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010647$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010648
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010649fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010651
10652fi
10653done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010654
Thomas Wouters3a584202000-08-05 23:28:51 +000010655for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010656do :
10657 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Charles-François Natali97781b02011-07-22 23:43:42 +020010658if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010659 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010660#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010661_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010663/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010664#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010665int
10666main ()
10667{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010668gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010669 ;
10670 return 0;
10671}
10672_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010673if ac_fn_c_try_compile "$LINENO"; then :
10674
Guido van Rossum627b2d71993-12-24 10:39:16 +000010675else
Skip Montanaro6dead952003-09-25 14:50:04 +000010676
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010677$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010678
Martin v. Löwis11437992002-04-12 09:54:03 +000010679
Guido van Rossum627b2d71993-12-24 10:39:16 +000010680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010682
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010683fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010684done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010685
Michael W. Hudson54241132001-12-07 15:38:26 +000010686
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10688$as_echo_n "checking for major... " >&6; }
10689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010690/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010691
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010692#if defined(MAJOR_IN_MKDEV)
10693#include <sys/mkdev.h>
10694#elif defined(MAJOR_IN_SYSMACROS)
10695#include <sys/sysmacros.h>
10696#else
10697#include <sys/types.h>
10698#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010699
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010700int
10701main ()
10702{
10703
10704 makedev(major(0),minor(0));
10705
10706 ;
10707 return 0;
10708}
10709_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010710if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010711
10712
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010713$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010714
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10716$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010717
10718else
Skip Montanaro6dead952003-09-25 14:50:04 +000010719
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10721$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010722
10723fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010724rm -f core conftest.err conftest.$ac_objext \
10725 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010726
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010727# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010728# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10730$as_echo_n "checking for getaddrinfo... " >&6; }
10731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010732/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010733
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010734#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010735#include <sys/socket.h>
10736#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010737#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010738
Martin v. Löwis11437992002-04-12 09:54:03 +000010739int
10740main ()
10741{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010742getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010743 ;
10744 return 0;
10745}
10746_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010747if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010748 have_getaddrinfo=yes
10749else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010750 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010751fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010752rm -f core conftest.err conftest.$ac_objext \
10753 conftest$ac_exeext conftest.$ac_ext
10754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10755$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010756if test $have_getaddrinfo = yes
10757then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10759$as_echo_n "checking getaddrinfo bug... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010760 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010761 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010762else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010763 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010764 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010765else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010767/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010768
10769#include <sys/types.h>
10770#include <netdb.h>
10771#include <string.h>
10772#include <sys/socket.h>
10773#include <netinet/in.h>
10774
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010775int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010776{
10777 int passive, gaierr, inet4 = 0, inet6 = 0;
10778 struct addrinfo hints, *ai, *aitop;
10779 char straddr[INET6_ADDRSTRLEN], strport[16];
10780
10781 for (passive = 0; passive <= 1; passive++) {
10782 memset(&hints, 0, sizeof(hints));
10783 hints.ai_family = AF_UNSPEC;
10784 hints.ai_flags = passive ? AI_PASSIVE : 0;
10785 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010786 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010787 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10788 (void)gai_strerror(gaierr);
10789 goto bad;
10790 }
10791 for (ai = aitop; ai; ai = ai->ai_next) {
10792 if (ai->ai_addr == NULL ||
10793 ai->ai_addrlen == 0 ||
10794 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10795 straddr, sizeof(straddr), strport, sizeof(strport),
10796 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10797 goto bad;
10798 }
10799 switch (ai->ai_family) {
10800 case AF_INET:
10801 if (strcmp(strport, "54321") != 0) {
10802 goto bad;
10803 }
10804 if (passive) {
10805 if (strcmp(straddr, "0.0.0.0") != 0) {
10806 goto bad;
10807 }
10808 } else {
10809 if (strcmp(straddr, "127.0.0.1") != 0) {
10810 goto bad;
10811 }
10812 }
10813 inet4++;
10814 break;
10815 case AF_INET6:
10816 if (strcmp(strport, "54321") != 0) {
10817 goto bad;
10818 }
10819 if (passive) {
10820 if (strcmp(straddr, "::") != 0) {
10821 goto bad;
10822 }
10823 } else {
10824 if (strcmp(straddr, "::1") != 0) {
10825 goto bad;
10826 }
10827 }
10828 inet6++;
10829 break;
10830 case AF_UNSPEC:
10831 goto bad;
10832 break;
10833 default:
10834 /* another family support? */
10835 break;
10836 }
10837 }
10838 }
10839
10840 if (!(inet4 == 0 || inet4 == 2))
10841 goto bad;
10842 if (!(inet6 == 0 || inet6 == 2))
10843 goto bad;
10844
10845 if (aitop)
10846 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010847 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010848
10849 bad:
10850 if (aitop)
10851 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010852 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010853}
10854
Martin v. Löwis11437992002-04-12 09:54:03 +000010855_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010856if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010857 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010858else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010859 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010860fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010861rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10862 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010864
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010865fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010866
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010868
Benjamin Peterson75fed812010-11-01 01:47:19 +000010869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10870$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10871
Mark Dickinson0ef0b912009-12-31 21:11:48 +000010872if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010873then
10874 if test $ipv6 = yes
10875 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010876 echo 'Fatal: You must get working getaddrinfo() function.'
10877 echo ' or you can specify "--disable-ipv6"'.
10878 exit 1
10879 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010880else
Martin v. Löwis11437992002-04-12 09:54:03 +000010881
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010882$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010883
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010884fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000010885
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010886for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010887do :
10888 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Charles-François Natali97781b02011-07-22 23:43:42 +020010889if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010890 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010891#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010892_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010893
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010894fi
10895done
10896
Michael W. Hudson54241132001-12-07 15:38:26 +000010897
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010898# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10900$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 +020010901if test "${ac_cv_header_time+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010902 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010903else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010905/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010906#include <sys/types.h>
10907#include <sys/time.h>
10908#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010909
Martin v. Löwis11437992002-04-12 09:54:03 +000010910int
10911main ()
10912{
10913if ((struct tm *) 0)
10914return 0;
10915 ;
10916 return 0;
10917}
10918_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010919if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010920 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010921else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010922 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010925fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10927$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010928if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010929
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010930$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010931
10932fi
10933
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10935$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 +020010936if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010937 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010938else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010940/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010941#include <sys/types.h>
10942#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010943
Martin v. Löwis11437992002-04-12 09:54:03 +000010944int
10945main ()
10946{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010947struct tm tm;
10948 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010949 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010950 ;
10951 return 0;
10952}
10953_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010954if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010955 ac_cv_struct_tm=time.h
10956else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010957 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010960fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10962$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010963if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010964
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010965$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010966
10967fi
10968
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010969ac_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 +000010970#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010971
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010972"
Charles-François Natali97781b02011-07-22 23:43:42 +020010973if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010974
10975cat >>confdefs.h <<_ACEOF
10976#define HAVE_STRUCT_TM_TM_ZONE 1
10977_ACEOF
10978
10979
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010980fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010981
Martin v. Löwis11437992002-04-12 09:54:03 +000010982if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10983
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010984$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010985
10986else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010987 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10988"
Charles-François Natali97781b02011-07-22 23:43:42 +020010989if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010990 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000010991else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010992 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000010993fi
10994
Martin v. Löwiseba40652007-08-30 20:10:57 +000010995cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010996#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000010997_ACEOF
10998
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11000$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011001if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011002 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011005/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011006#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011007#if !HAVE_DECL_TZNAME
11008extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011010
Martin v. Löwis11437992002-04-12 09:54:03 +000011011int
11012main ()
11013{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011014return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011015 ;
11016 return 0;
11017}
11018_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011019if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011020 ac_cv_var_tzname=yes
11021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011022 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011023fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011024rm -f core conftest.err conftest.$ac_objext \
11025 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011026fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11028$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011029 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011030
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011031$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011032
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011033 fi
11034fi
11035
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011036ac_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 +020011037if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011038
11039cat >>confdefs.h <<_ACEOF
11040#define HAVE_STRUCT_STAT_ST_RDEV 1
11041_ACEOF
11042
11043
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011044fi
11045
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011046ac_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 +020011047if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011048
Martin v. Löwis11437992002-04-12 09:54:03 +000011049cat >>confdefs.h <<_ACEOF
11050#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11051_ACEOF
11052
11053
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011054fi
11055
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011056ac_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 +020011057if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011058
11059cat >>confdefs.h <<_ACEOF
11060#define HAVE_STRUCT_STAT_ST_FLAGS 1
11061_ACEOF
11062
11063
11064fi
11065
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011066ac_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 +020011067if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011068
11069cat >>confdefs.h <<_ACEOF
11070#define HAVE_STRUCT_STAT_ST_GEN 1
11071_ACEOF
11072
11073
11074fi
11075
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011076ac_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 +020011077if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011078
11079cat >>confdefs.h <<_ACEOF
11080#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11081_ACEOF
11082
11083
11084fi
11085
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011086ac_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 +020011087if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011088
Martin v. Löwis11437992002-04-12 09:54:03 +000011089cat >>confdefs.h <<_ACEOF
11090#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11091_ACEOF
11092
11093
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011094$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011095
11096else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011097 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011098 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011099 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11100 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011101esac
11102
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011103fi
11104
Michael W. Hudson54241132001-12-07 15:38:26 +000011105
Martin v. Löwis11437992002-04-12 09:54:03 +000011106
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11108$as_echo_n "checking for time.h that defines altzone... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011109if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011110 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011111else
Matthias Klosec511b472010-05-08 11:01:39 +000011112
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011114/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011115#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011116int
11117main ()
11118{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011119return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 ;
11121 return 0;
11122}
11123_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011125 ac_cv_header_time_altzone=yes
11126else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011127 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011130
Martin v. Löwiseba40652007-08-30 20:10:57 +000011131fi
11132
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11134$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011135if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011136
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011137$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011138
11139fi
11140
Guido van Rossumda88dad1995-01-26 00:46:29 +000011141was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11143$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011145/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011146
11147#include <sys/types.h>
11148#include <sys/select.h>
11149#include <sys/time.h>
11150
Martin v. Löwis11437992002-04-12 09:54:03 +000011151int
11152main ()
11153{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011154;
Martin v. Löwis11437992002-04-12 09:54:03 +000011155 ;
11156 return 0;
11157}
11158_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011159if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011160
11161
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011162$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011163
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011164 was_it_defined=yes
11165
Martin v. Löwiseba40652007-08-30 20:10:57 +000011166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11169$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011170
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11172$as_echo_n "checking for addrinfo... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011173if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011174 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011175else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011177/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011178#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011179int
11180main ()
11181{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011182struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011183 ;
11184 return 0;
11185}
11186_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011188 ac_cv_struct_addrinfo=yes
11189else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011190 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11193fi
11194
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11196$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011197if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011198
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011199$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011200
11201fi
11202
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11204$as_echo_n "checking for sockaddr_storage... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011205if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011206 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011207else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011209/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011210
11211# include <sys/types.h>
11212# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011213int
11214main ()
11215{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011216struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011217 ;
11218 return 0;
11219}
11220_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011221if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011222 ac_cv_struct_sockaddr_storage=yes
11223else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011224 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11227fi
11228
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11230$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011231if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011232
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011233$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011234
11235fi
11236
Guido van Rossum627b2d71993-12-24 10:39:16 +000011237# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011238
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11240$as_echo_n "checking whether char is unsigned... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011241if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011242 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011243else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011245/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011246$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011247int
11248main ()
11249{
11250static int test_array [1 - 2 * !(((char) -1) < 0)];
11251test_array [0] = 0
11252
11253 ;
11254 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011255}
Martin v. Löwis11437992002-04-12 09:54:03 +000011256_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011257if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011258 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011259else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011260 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011263fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11265$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011266if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011267 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011268
11269fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011270
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11272$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011273if test "${ac_cv_c_const+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011274 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011275else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011277/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011278
Martin v. Löwis11437992002-04-12 09:54:03 +000011279int
11280main ()
11281{
11282/* FIXME: Include the comments suggested by Paul. */
11283#ifndef __cplusplus
11284 /* Ultrix mips cc rejects this. */
11285 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000011286 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011287 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011288 char const *const *pcpcc;
11289 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 /* NEC SVR4.0.2 mips cc rejects this. */
11291 struct point {int x, y;};
11292 static struct point const zero = {0,0};
11293 /* AIX XL C 1.02.0.0 rejects this.
11294 It does not let you subtract one const X* pointer from another in
11295 an arm of an if-expression whose if-part is not a constant
11296 expression */
11297 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011298 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011300 ++pcpcc;
11301 ppc = (char**) pcpcc;
11302 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011303 { /* SCO 3.2v4 cc rejects this. */
11304 char *t;
11305 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011306
Martin v. Löwis11437992002-04-12 09:54:03 +000011307 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011308 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011309 }
11310 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11311 int x[] = {25, 17};
11312 const int *foo = &x[0];
11313 ++foo;
11314 }
11315 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11316 typedef const int *iptr;
11317 iptr p = 0;
11318 ++p;
11319 }
11320 { /* AIX XL C 1.02.0.0 rejects this saying
11321 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11322 struct s { int j; const int *ap[3]; };
11323 struct s *b; b->j = 5;
11324 }
11325 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11326 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011327 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011328 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011329 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011330#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011331
Martin v. Löwis11437992002-04-12 09:54:03 +000011332 ;
11333 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011334}
Martin v. Löwis11437992002-04-12 09:54:03 +000011335_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011336if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011337 ac_cv_c_const=yes
11338else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011339 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011342fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11344$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011345if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011346
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011347$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011348
11349fi
11350
Michael W. Hudson54241132001-12-07 15:38:26 +000011351
Guido van Rossumda88dad1995-01-26 00:46:29 +000011352works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11354$as_echo_n "checking for working volatile... " >&6; }
11355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011356/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011357
Martin v. Löwis11437992002-04-12 09:54:03 +000011358int
11359main ()
11360{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011361volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011362 ;
11363 return 0;
11364}
11365_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011366if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011367 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011368else
Skip Montanaro6dead952003-09-25 14:50:04 +000011369
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011370$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011371
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011372
Guido van Rossum627b2d71993-12-24 10:39:16 +000011373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11376$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011377
Guido van Rossumda88dad1995-01-26 00:46:29 +000011378works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11380$as_echo_n "checking for working signed char... " >&6; }
11381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011382/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011383
Martin v. Löwis11437992002-04-12 09:54:03 +000011384int
11385main ()
11386{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011387signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011388 ;
11389 return 0;
11390}
11391_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011392if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011393 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011394else
Skip Montanaro6dead952003-09-25 14:50:04 +000011395
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011396$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011397
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011398
Guido van Rossum7f43da71994-08-01 12:15:30 +000011399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11402$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011403
Guido van Rossumda88dad1995-01-26 00:46:29 +000011404have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11406$as_echo_n "checking for prototypes... " >&6; }
11407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011408/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011409int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011410int
11411main ()
11412{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011413return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011414 ;
11415 return 0;
11416}
11417_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011418if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011419
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011420$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011421
Matthias Klosec511b472010-05-08 11:01:39 +000011422 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11426$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011427
Guido van Rossumda88dad1995-01-26 00:46:29 +000011428works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11430$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011432/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011433
11434#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011435int foo(int x, ...) {
11436 va_list va;
11437 va_start(va, x);
11438 va_arg(va, int);
11439 va_arg(va, char *);
11440 va_arg(va, double);
11441 return 0;
11442}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011443
Martin v. Löwis11437992002-04-12 09:54:03 +000011444int
11445main ()
11446{
Guido van Rossum90eea071996-08-30 20:58:57 +000011447return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011448 ;
11449 return 0;
11450}
11451_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011452if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011453
11454
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011455$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011456
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011457 works=yes
11458
Guido van Rossum627b2d71993-12-24 10:39:16 +000011459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11462$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011463
Martin v. Löwisd6320502004-08-12 13:45:08 +000011464# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11466$as_echo_n "checking for socketpair... " >&6; }
11467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011468/* end confdefs.h. */
11469
11470#include <sys/types.h>
11471#include <sys/socket.h>
11472
11473int
11474main ()
11475{
11476void *x=socketpair
11477 ;
11478 return 0;
11479}
11480_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011481if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011482
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011483$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011484
Matthias Klosec511b472010-05-08 11:01:39 +000011485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011486$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011487else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11489$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011490
11491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011493
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011494# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11496$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011498/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011499#include <sys/types.h>
11500#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011501int
11502main ()
11503{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011504struct sockaddr x;
11505x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011506 ;
11507 return 0;
11508}
11509_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011510if ac_fn_c_try_compile "$LINENO"; then :
11511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11512$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011513
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011514$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011515
11516else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11518$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011519
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011522
Guido van Rossumda88dad1995-01-26 00:46:29 +000011523va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11525$as_echo_n "checking whether va_list is an array... " >&6; }
11526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011527/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011528
11529#ifdef HAVE_STDARG_PROTOTYPES
11530#include <stdarg.h>
11531#else
11532#include <varargs.h>
11533#endif
11534
Martin v. Löwis11437992002-04-12 09:54:03 +000011535int
11536main ()
11537{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011538va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011539 ;
11540 return 0;
11541}
11542_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011543if ac_fn_c_try_compile "$LINENO"; then :
11544
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011545else
Skip Montanaro6dead952003-09-25 14:50:04 +000011546
Martin v. Löwis11437992002-04-12 09:54:03 +000011547
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011548$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011549
Guido van Rossumda88dad1995-01-26 00:46:29 +000011550 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011551
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11555$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011556
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011557# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011558
11559
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011560ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Charles-François Natali97781b02011-07-22 23:43:42 +020011561if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011562
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011563 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011564
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11566$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011567 OLD_CFLAGS=$CFLAGS
11568 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011570/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011571
11572# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011573
Martin v. Löwis11437992002-04-12 09:54:03 +000011574int
11575main ()
11576{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011577
11578 char *name;
11579 struct hostent *he, *res;
11580 char buffer[2048];
11581 int buflen = 2048;
11582 int h_errnop;
11583
11584 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011585
11586 ;
11587 return 0;
11588}
11589_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011590if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011591
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011592 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011593
Martin v. Löwis11437992002-04-12 09:54:03 +000011594
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011595$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011596
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11598$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011599
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011600else
Skip Montanaro6dead952003-09-25 14:50:04 +000011601
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11603$as_echo "no" >&6; }
11604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11605$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011607/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011608
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011609# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011610
Martin v. Löwis11437992002-04-12 09:54:03 +000011611int
11612main ()
11613{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011614
11615 char *name;
11616 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011617 char buffer[2048];
11618 int buflen = 2048;
11619 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011620
Matthias Klosec511b472010-05-08 11:01:39 +000011621 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011622
11623 ;
11624 return 0;
11625}
11626_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011627if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011628
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011629 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011630
Martin v. Löwis11437992002-04-12 09:54:03 +000011631
Matthias Klosec511b472010-05-08 11:01:39 +000011632$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011633
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11635$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011636
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011637else
Skip Montanaro6dead952003-09-25 14:50:04 +000011638
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11640$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11642$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11644/* end confdefs.h. */
11645
11646# include <netdb.h>
11647
11648int
11649main ()
11650{
11651
11652 char *name;
11653 struct hostent *he;
11654 struct hostent_data data;
11655
11656 (void) gethostbyname_r(name, he, &data);
11657
11658 ;
11659 return 0;
11660}
11661_ACEOF
11662if ac_fn_c_try_compile "$LINENO"; then :
11663
11664 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11665
11666
11667$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11668
11669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11670$as_echo "yes" >&6; }
11671
11672else
11673
11674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11675$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011676
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011679
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011682
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011683fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011685 CFLAGS=$OLD_CFLAGS
11686
11687else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011688
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011689 for ac_func in gethostbyname
11690do :
11691 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Charles-François Natali97781b02011-07-22 23:43:42 +020011692if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011693 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011694#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011695_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011696
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011697fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011698done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011699
Michael W. Hudson54241132001-12-07 15:38:26 +000011700
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011701fi
11702
Michael W. Hudson54241132001-12-07 15:38:26 +000011703
11704
11705
11706
11707
11708
Guido van Rossum627b2d71993-12-24 10:39:16 +000011709# checks for system services
11710# (none yet)
11711
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011712# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011713ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Charles-François Natali97781b02011-07-22 23:43:42 +020011714if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011715
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011716else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11718$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011719if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011720 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011721else
Martin v. Löwis11437992002-04-12 09:54:03 +000011722 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011723LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011726
Martin v. Löwiseba40652007-08-30 20:10:57 +000011727/* Override any GCC internal prototype to avoid an error.
11728 Use char because int might match the return type of a GCC
11729 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011730#ifdef __cplusplus
11731extern "C"
11732#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011733char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011734int
11735main ()
11736{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011737return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 ;
11739 return 0;
11740}
11741_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011742if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011743 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011744else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011745 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011746fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011747rm -f core conftest.err conftest.$ac_objext \
11748 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011749LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011750fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11752$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011753if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011754 cat >>confdefs.h <<_ACEOF
11755#define HAVE_LIBIEEE 1
11756_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011757
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011758 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011759
Guido van Rossum627b2d71993-12-24 10:39:16 +000011760fi
11761
Michael W. Hudson54241132001-12-07 15:38:26 +000011762
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011763fi
11764
Michael W. Hudson54241132001-12-07 15:38:26 +000011765
Guido van Rossum7f253911997-05-09 02:42:48 +000011766# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11768$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011769
Martin v. Löwiseba40652007-08-30 20:10:57 +000011770# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011771if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011772 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011773if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011774then
11775
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011776$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011777
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11779$as_echo "yes" >&6; }
11780else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11781$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011782fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11785$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011786fi
11787
Guido van Rossum7f253911997-05-09 02:42:48 +000011788
Guido van Rossum7f43da71994-08-01 12:15:30 +000011789# check for --with-libm=...
11790
Guido van Rossum563e7081996-09-10 18:20:48 +000011791case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011792Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011793BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011794*) LIBM=-lm
11795esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11797$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011798
Martin v. Löwiseba40652007-08-30 20:10:57 +000011799# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011800if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011801 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011802if test "$withval" = no
11803then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11805$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011806elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011807then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11809$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011810else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011811fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11814$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011815fi
11816
Guido van Rossum7f43da71994-08-01 12:15:30 +000011817
11818# check for --with-libc=...
11819
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11821$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011822
Martin v. Löwiseba40652007-08-30 20:10:57 +000011823# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011824if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011825 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011826if test "$withval" = no
11827then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11829$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011830elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011831then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11833$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011834else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011835fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011836else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11838$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011839fi
11840
Guido van Rossum7f43da71994-08-01 12:15:30 +000011841
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011842# **************************************************
11843# * Check for various properties of floating point *
11844# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000011845
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11847$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011848if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011849 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011850else
11851
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011852if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011853 ac_cv_little_endian_double=no
11854else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011856/* end confdefs.h. */
11857
11858#include <string.h>
11859int main() {
11860 double x = 9006104071832581.0;
11861 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11862 return 0;
11863 else
11864 return 1;
11865}
11866
11867_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011868if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011869 ac_cv_little_endian_double=yes
11870else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011871 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011872fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11874 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011875fi
11876
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011877fi
11878
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11880$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011881if test "$ac_cv_little_endian_double" = yes
11882then
11883
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011884$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011885
11886fi
11887
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11889$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011890if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011891 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011892else
11893
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011894if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011895 ac_cv_big_endian_double=no
11896else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011898/* end confdefs.h. */
11899
11900#include <string.h>
11901int main() {
11902 double x = 9006104071832581.0;
11903 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11904 return 0;
11905 else
11906 return 1;
11907}
11908
11909_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011910if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011911 ac_cv_big_endian_double=yes
11912else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011913 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011914fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011915rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11916 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011917fi
11918
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011919fi
11920
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11922$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011923if test "$ac_cv_big_endian_double" = yes
11924then
11925
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011926$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011927
11928fi
11929
11930# Some ARM platforms use a mixed-endian representation for doubles.
11931# While Python doesn't currently have full support for these platforms
11932# (see e.g., issue 1762561), we can at least make sure that float <-> string
11933# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11935$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011936if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011937 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011938else
11939
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011940if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011941 ac_cv_mixed_endian_double=no
11942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011944/* end confdefs.h. */
11945
11946#include <string.h>
11947int main() {
11948 double x = 9006104071832581.0;
11949 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11950 return 0;
11951 else
11952 return 1;
11953}
11954
11955_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011956if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011957 ac_cv_mixed_endian_double=yes
11958else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011959 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011960fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011963fi
11964
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011965fi
11966
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11968$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011969if test "$ac_cv_mixed_endian_double" = yes
11970then
11971
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011972$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011973
11974fi
11975
11976# The short float repr introduced in Python 3.1 requires the
11977# correctly-rounded string <-> double conversion functions from
11978# Python/dtoa.c, which in turn require that the FPU uses 53-bit
11979# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000011980# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011981# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000011982
11983# This inline assembler syntax may also work for suncc and icc,
11984# so we try it on all platforms.
11985
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11987$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011989/* end confdefs.h. */
11990
11991int
11992main ()
11993{
11994
Mark Dickinsona548dee2009-11-15 13:12:43 +000011995 unsigned short cw;
11996 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11997 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011998
11999 ;
12000 return 0;
12001}
12002_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012003if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012004 have_gcc_asm_for_x87=yes
12005else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012006 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012007fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12010$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012011if test "$have_gcc_asm_for_x87" = yes
12012then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012013
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012014$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012015
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012016fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012017
Mark Dickinson04b27232009-01-04 12:29:36 +000012018# Detect whether system arithmetic is subject to x87-style double
12019# rounding issues. The result of this test has little meaning on non
12020# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12021# mode is round-to-nearest and double rounding issues are present, and
12022# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12024$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012025# $BASECFLAGS may affect the result
12026ac_save_cc="$CC"
12027CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012028if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012029 ac_cv_x87_double_rounding=no
12030else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012032/* end confdefs.h. */
12033
12034#include <stdlib.h>
12035#include <math.h>
12036int main() {
12037 volatile double x, y, z;
12038 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12039 x = 0.99999999999999989; /* 1-2**-53 */
12040 y = 1./x;
12041 if (y != 1.)
12042 exit(0);
12043 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12044 x = 1e16;
12045 y = 2.99999;
12046 z = x + y;
12047 if (z != 1e16+4.)
12048 exit(0);
12049 /* both tests show evidence of double rounding */
12050 exit(1);
12051}
12052
12053_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012054if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012055 ac_cv_x87_double_rounding=no
12056else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012057 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012058fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12060 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012061fi
12062
Mark Dickinson99abd142009-10-24 13:44:16 +000012063CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12065$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012066if test "$ac_cv_x87_double_rounding" = yes
12067then
12068
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012069$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012070
12071fi
12072
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012073# ************************************
12074# * Check for mathematical functions *
12075# ************************************
12076
12077LIBS_SAVE=$LIBS
12078LIBS="$LIBS $LIBM"
12079
Mark Dickinson265d7382008-04-21 22:32:24 +000012080# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12081# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12083$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012084if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012085 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012086else
12087
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012088if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012089 ac_cv_tanh_preserves_zero_sign=no
12090else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012092/* end confdefs.h. */
12093
12094#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012095#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012096int main() {
12097 /* return 0 if either negative zeros don't exist
12098 on this platform or if negative zeros exist
12099 and tanh(-0.) == -0. */
12100 if (atan2(0., -1.) == atan2(-0., -1.) ||
12101 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12102 else exit(1);
12103}
12104
12105_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012106if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012107 ac_cv_tanh_preserves_zero_sign=yes
12108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012109 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012110fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012111rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12112 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012113fi
12114
Mark Dickinson265d7382008-04-21 22:32:24 +000012115fi
12116
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12118$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012119if test "$ac_cv_tanh_preserves_zero_sign" = yes
12120then
12121
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012122$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012123
12124fi
12125
Mark Dickinson65898e02009-09-05 10:27:00 +000012126for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012127do :
12128 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12129ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012130if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012131 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012132#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012133_ACEOF
12134
12135fi
12136done
12137
Mark Dickinson65898e02009-09-05 10:27:00 +000012138for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012139do :
12140 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12141ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012142if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012143 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012144#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012145_ACEOF
12146
12147fi
12148done
12149
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012150ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12151"
Charles-François Natali97781b02011-07-22 23:43:42 +020012152if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012153 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012154else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012155 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012156fi
12157
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012158cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012159#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012160_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012161ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12162"
Charles-François Natali97781b02011-07-22 23:43:42 +020012163if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012164 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012165else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012166 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012167fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012168
12169cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012170#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012171_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012172ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12173"
Charles-François Natali97781b02011-07-22 23:43:42 +020012174if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012175 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012176else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012177 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012178fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012179
12180cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012181#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012182_ACEOF
12183
12184
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012185LIBS=$LIBS_SAVE
12186
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012187# For multiprocessing module, check that sem_open
12188# actually works. For FreeBSD versions <= 7.2,
12189# the kernel module that provides POSIX semaphores
12190# isn't loaded by default, so an attempt to call
12191# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12193$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012194if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012195 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012196else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012197 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012198 ac_cv_posix_semaphores_enabled=yes
12199else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012201/* end confdefs.h. */
12202
12203#include <unistd.h>
12204#include <fcntl.h>
12205#include <stdio.h>
12206#include <semaphore.h>
12207#include <sys/stat.h>
12208
12209int main(void) {
12210 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12211 if (a == SEM_FAILED) {
12212 perror("sem_open");
12213 return 1;
12214 }
12215 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012216 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012217 return 0;
12218}
12219
12220_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012221if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012222 ac_cv_posix_semaphores_enabled=yes
12223else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012224 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012225fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012226rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12227 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012228fi
12229
12230
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012231fi
12232
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12234$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012235if test $ac_cv_posix_semaphores_enabled = no
12236then
12237
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012238$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012239
12240fi
12241
12242# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12244$as_echo_n "checking for broken sem_getvalue... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012245if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012246 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012247else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012248 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012249 ac_cv_broken_sem_getvalue=yes
12250else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012252/* end confdefs.h. */
12253
12254#include <unistd.h>
12255#include <fcntl.h>
12256#include <stdio.h>
12257#include <semaphore.h>
12258#include <sys/stat.h>
12259
12260int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012261 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012262 int count;
12263 int res;
12264 if(a==SEM_FAILED){
12265 perror("sem_open");
12266 return 1;
12267
12268 }
12269 res = sem_getvalue(a, &count);
12270 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012271 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012272 return res==-1 ? 1 : 0;
12273}
12274
12275_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012276if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012277 ac_cv_broken_sem_getvalue=no
12278else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012279 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012280fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012281rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12282 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012283fi
12284
12285
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012286fi
12287
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12289$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012290if test $ac_cv_broken_sem_getvalue = yes
12291then
12292
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012293$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012294
12295fi
12296
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012297# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12299$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012300# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012301if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012302 enableval=$enable_big_digits; case $enable_big_digits in
12303yes)
12304 enable_big_digits=30 ;;
12305no)
12306 enable_big_digits=15 ;;
1230715|30)
12308 ;;
12309*)
Charles-François Natali97781b02011-07-22 23:43:42 +020012310 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 +000012311esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12313$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012314
12315cat >>confdefs.h <<_ACEOF
12316#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12317_ACEOF
12318
12319
12320else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12322$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012323fi
12324
12325
Guido van Rossumef2255b2000-03-10 22:30:29 +000012326# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012327ac_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 +020012328if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012329
12330
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012331$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012332
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012333 wchar_h="yes"
12334
Guido van Rossumef2255b2000-03-10 22:30:29 +000012335else
Martin v. Löwis11437992002-04-12 09:54:03 +000012336 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012337
12338fi
12339
Michael W. Hudson54241132001-12-07 15:38:26 +000012340
Martin v. Löwis11437992002-04-12 09:54:03 +000012341
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012342# determine wchar_t size
12343if test "$wchar_h" = yes
12344then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012345 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012346# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12347# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12348# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12350$as_echo_n "checking size of wchar_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012351if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012352 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012353else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012354 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12355"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012356
Martin v. Löwis11437992002-04-12 09:54:03 +000012357else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012358 if test "$ac_cv_type_wchar_t" = yes; then
12359 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12360$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012361as_fn_error 77 "cannot compute sizeof (wchar_t)
Charles-François Natali97781b02011-07-22 23:43:42 +020012362See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012363 else
12364 ac_cv_sizeof_wchar_t=0
12365 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012366fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012367
Martin v. Löwis11437992002-04-12 09:54:03 +000012368fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12370$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012371
12372
12373
Martin v. Löwis11437992002-04-12 09:54:03 +000012374cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012375#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012376_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012377
Michael W. Hudson54241132001-12-07 15:38:26 +000012378
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012379fi
12380
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12382$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012383have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012385/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012386
12387#include <tcl.h>
12388#if TCL_UTF_MAX != 6
12389# error "NOT UCS4_TCL"
12390#endif
12391int
12392main ()
12393{
12394
12395 ;
12396 return 0;
12397}
12398_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012399if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012400
12401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012402$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012403
12404 have_ucs4_tcl=yes
12405
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12409$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012410
Skip Montanaro6dead952003-09-25 14:50:04 +000012411# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012412if test "$wchar_h" = yes
12413then
12414 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12416$as_echo_n "checking whether wchar_t is signed... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012417 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012418 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012419else
12420
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012421 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012422 ac_cv_wchar_t_signed=yes
12423else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012425/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012426
12427 #include <wchar.h>
12428 int main()
12429 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012430 /* Success: exit code 0 */
12431 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012432 }
12433
12434_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012435if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012436 ac_cv_wchar_t_signed=yes
12437else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012438 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012439fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012440rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12441 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012442fi
12443
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012444fi
12445
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12447$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012448fi
12449
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12451$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012452# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012453if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012454 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012455else
12456 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012457fi
12458
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012459
12460if test $enable_unicode = yes
12461then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012462 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012463 case "$have_ucs4_tcl" in
12464 yes) enable_unicode="ucs4"
12465 ;;
12466 *) enable_unicode="ucs2"
12467 ;;
12468 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012469fi
12470
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012471
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012472case "$enable_unicode" in
12473ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012474 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012475
12476 ;;
12477ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012478 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012479
12480 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +020012481*) 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 +000012482esac
12483
Michael W. Hudson54241132001-12-07 15:38:26 +000012484
Martin v. Löwis11437992002-04-12 09:54:03 +000012485
12486
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012487if test "$enable_unicode" = "no"
12488then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012489 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12491$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012492else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012493 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012494
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012495$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012496
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012497
12498 # wchar_t is only usable if it maps to an unsigned type
12499 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012500 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012501 then
12502 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012503
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012504$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012505
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012506 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012507
12508 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12509 then
12510 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012511 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012512
12513 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12514 then
12515 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012516 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012517
12518 else
12519 PY_UNICODE_TYPE="no type found"
12520 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12522$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012523fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012524
12525# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12527$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012528if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012529 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012530else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012531 ac_cv_c_bigendian=unknown
12532 # See if we're dealing with a universal compiler.
12533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12534/* end confdefs.h. */
12535#ifndef __APPLE_CC__
12536 not a universal capable compiler
12537 #endif
12538 typedef int dummy;
12539
Skip Montanaro6dead952003-09-25 14:50:04 +000012540_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012541if ac_fn_c_try_compile "$LINENO"; then :
12542
12543 # Check for potential -arch flags. It is not universal unless
12544 # there are at least two -arch flags with different values.
12545 ac_arch=
12546 ac_prev=
12547 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12548 if test -n "$ac_prev"; then
12549 case $ac_word in
12550 i?86 | x86_64 | ppc | ppc64)
12551 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12552 ac_arch=$ac_word
12553 else
12554 ac_cv_c_bigendian=universal
12555 break
12556 fi
12557 ;;
12558 esac
12559 ac_prev=
12560 elif test "x$ac_word" = "x-arch"; then
12561 ac_prev=arch
12562 fi
12563 done
12564fi
12565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12566 if test $ac_cv_c_bigendian = unknown; then
12567 # See if sys/param.h defines the BYTE_ORDER macro.
12568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012569/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012570#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012571 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012572
Martin v. Löwis11437992002-04-12 09:54:03 +000012573int
12574main ()
12575{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012576#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12577 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12578 && LITTLE_ENDIAN)
12579 bogus endian macros
12580 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012581
12582 ;
12583 return 0;
12584}
12585_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012586if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012587 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012589/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012590#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012591 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012592
Martin v. Löwis11437992002-04-12 09:54:03 +000012593int
12594main ()
12595{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012596#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012597 not big endian
12598 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012599
12600 ;
12601 return 0;
12602}
12603_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012604if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012605 ac_cv_c_bigendian=yes
12606else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012607 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012610fi
12611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12612 fi
12613 if test $ac_cv_c_bigendian = unknown; then
12614 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012616/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012617#include <limits.h>
12618
Martin v. Löwis11437992002-04-12 09:54:03 +000012619int
12620main ()
12621{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012622#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12623 bogus endian macros
12624 #endif
12625
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 ;
12627 return 0;
12628}
12629_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012630if ac_fn_c_try_compile "$LINENO"; then :
12631 # It does; now see whether it defined to _BIG_ENDIAN or not.
12632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12633/* end confdefs.h. */
12634#include <limits.h>
12635
12636int
12637main ()
12638{
12639#ifndef _BIG_ENDIAN
12640 not big endian
12641 #endif
12642
12643 ;
12644 return 0;
12645}
12646_ACEOF
12647if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012648 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012649else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012650 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012651fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12653fi
12654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12655 fi
12656 if test $ac_cv_c_bigendian = unknown; then
12657 # Compile a test program.
12658 if test "$cross_compiling" = yes; then :
12659 # Try to guess by grepping values from an object file.
12660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12661/* end confdefs.h. */
12662short int ascii_mm[] =
12663 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12664 short int ascii_ii[] =
12665 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12666 int use_ascii (int i) {
12667 return ascii_mm[i] + ascii_ii[i];
12668 }
12669 short int ebcdic_ii[] =
12670 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12671 short int ebcdic_mm[] =
12672 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12673 int use_ebcdic (int i) {
12674 return ebcdic_mm[i] + ebcdic_ii[i];
12675 }
12676 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012677
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012678int
12679main ()
12680{
12681return use_ascii (foo) == use_ebcdic (foo);
12682 ;
12683 return 0;
12684}
12685_ACEOF
12686if ac_fn_c_try_compile "$LINENO"; then :
12687 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12688 ac_cv_c_bigendian=yes
12689 fi
12690 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12691 if test "$ac_cv_c_bigendian" = unknown; then
12692 ac_cv_c_bigendian=no
12693 else
12694 # finding both strings is unlikely to happen, but who knows?
12695 ac_cv_c_bigendian=unknown
12696 fi
12697 fi
12698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012702/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012703$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012704int
12705main ()
12706{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012707
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012708 /* Are we little or big endian? From Harbison&Steele. */
12709 union
12710 {
12711 long int l;
12712 char c[sizeof (long int)];
12713 } u;
12714 u.l = 1;
12715 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012716
12717 ;
12718 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012719}
Martin v. Löwis11437992002-04-12 09:54:03 +000012720_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012721if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012722 ac_cv_c_bigendian=no
12723else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012724 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012725fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12727 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012729
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012730 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012731fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12733$as_echo "$ac_cv_c_bigendian" >&6; }
12734 case $ac_cv_c_bigendian in #(
12735 yes)
12736 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12737;; #(
12738 no)
12739 ;; #(
12740 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012741
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012742$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012743
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012744 ;; #(
12745 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012746 as_fn_error $? "unknown endianness
Charles-François Natali97781b02011-07-22 23:43:42 +020012747 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012748 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012749
Michael W. Hudson54241132001-12-07 15:38:26 +000012750
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012751# Check whether right shifting a negative integer extends the sign bit
12752# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12754$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012755if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012756 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012757else
Martin v. Löwis11437992002-04-12 09:54:03 +000012758
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012759if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012760 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012763/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012764
12765int main()
12766{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012767 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012768}
12769
Martin v. Löwis11437992002-04-12 09:54:03 +000012770_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012771if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012772 ac_cv_rshift_extends_sign=yes
12773else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012774 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012775fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12777 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012778fi
12779
Martin v. Löwiseba40652007-08-30 20:10:57 +000012780fi
12781
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12783$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012784if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012785then
Martin v. Löwis11437992002-04-12 09:54:03 +000012786
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012787$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012788
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012789fi
12790
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012791# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12793$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012794if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012795 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012796else
Martin v. Löwis11437992002-04-12 09:54:03 +000012797
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012799/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012800#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012801int
12802main ()
12803{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012804
12805 FILE *f = fopen("/dev/null", "r");
12806 flockfile(f);
12807 getc_unlocked(f);
12808 funlockfile(f);
12809
Martin v. Löwis11437992002-04-12 09:54:03 +000012810 ;
12811 return 0;
12812}
12813_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012814if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012815 ac_cv_have_getc_unlocked=yes
12816else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012817 ac_cv_have_getc_unlocked=no
12818fi
12819rm -f core conftest.err conftest.$ac_objext \
12820 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012821fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012822
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12824$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012825if test "$ac_cv_have_getc_unlocked" = yes
12826then
Martin v. Löwis11437992002-04-12 09:54:03 +000012827
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012828$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012829
12830fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012831
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012832# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012833# save the value of LIBS so we don't actually link Python with readline
12834LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012835
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012836# On some systems we need to link readline to a termcap compatible
12837# library. NOTE: Keep the precedence of listed libraries synchronised
12838# with setup.py.
12839py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12841$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012842for py_libtermcap in "" ncursesw ncurses curses termcap; do
12843 if test -z "$py_libtermcap"; then
12844 READLINE_LIBS="-lreadline"
12845 else
12846 READLINE_LIBS="-lreadline -l$py_libtermcap"
12847 fi
12848 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012850/* end confdefs.h. */
12851
Martin v. Löwiseba40652007-08-30 20:10:57 +000012852/* Override any GCC internal prototype to avoid an error.
12853 Use char because int might match the return type of a GCC
12854 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012855#ifdef __cplusplus
12856extern "C"
12857#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012858char readline ();
12859int
12860main ()
12861{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012862return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012863 ;
12864 return 0;
12865}
12866_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012867if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012868 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012869fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012870rm -f core conftest.err conftest.$ac_objext \
12871 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012872 if test $py_cv_lib_readline = yes; then
12873 break
12874 fi
12875done
12876# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12877#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000012878if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12880$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012881else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12883$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012884
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012885$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012886
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012887fi
12888
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012889# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12891$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012892if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012893 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012894else
12895 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012896LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012898/* end confdefs.h. */
12899
Martin v. Löwiseba40652007-08-30 20:10:57 +000012900/* Override any GCC internal prototype to avoid an error.
12901 Use char because int might match the return type of a GCC
12902 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012903#ifdef __cplusplus
12904extern "C"
12905#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012906char rl_callback_handler_install ();
12907int
12908main ()
12909{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012910return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012911 ;
12912 return 0;
12913}
12914_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012915if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012916 ac_cv_lib_readline_rl_callback_handler_install=yes
12917else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012918 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012919fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012920rm -f core conftest.err conftest.$ac_objext \
12921 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012922LIBS=$ac_check_lib_save_LIBS
12923fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12925$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012926if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012928$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012929
12930fi
12931
12932
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012933# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012935/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012936#include <readline/readline.h>
12937_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012938if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012939 have_readline=yes
12940else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012941 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000012942
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012943fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012944rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012945if test $have_readline = yes
12946then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012948/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012949#include <readline/readline.h>
12950
12951_ACEOF
12952if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012953 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012954
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012955$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012956
12957fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012958rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012959
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012961/* end confdefs.h. */
12962#include <readline/readline.h>
12963
12964_ACEOF
12965if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012966 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012967
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012968$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012969
12970fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012971rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012972
12973fi
12974
Martin v. Löwis0daad592001-09-30 21:09:59 +000012975# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12977$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012978if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012979 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012980else
Martin v. Löwis11437992002-04-12 09:54:03 +000012981 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012982LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012985
Martin v. Löwiseba40652007-08-30 20:10:57 +000012986/* Override any GCC internal prototype to avoid an error.
12987 Use char because int might match the return type of a GCC
12988 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012989#ifdef __cplusplus
12990extern "C"
12991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012992char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012993int
12994main ()
12995{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012996return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012997 ;
12998 return 0;
12999}
13000_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013001if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013002 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013004 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013005fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013006rm -f core conftest.err conftest.$ac_objext \
13007 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013008LIBS=$ac_check_lib_save_LIBS
13009fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13011$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013012if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013013
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013014$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013015
Martin v. Löwis0daad592001-09-30 21:09:59 +000013016fi
13017
Michael W. Hudson54241132001-12-07 15:38:26 +000013018
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013019# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13021$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013022if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013023 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013024else
13025 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013026LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013028/* end confdefs.h. */
13029
13030/* Override any GCC internal prototype to avoid an error.
13031 Use char because int might match the return type of a GCC
13032 builtin and then its argument prototype would still apply. */
13033#ifdef __cplusplus
13034extern "C"
13035#endif
13036char rl_completion_display_matches_hook ();
13037int
13038main ()
13039{
13040return rl_completion_display_matches_hook ();
13041 ;
13042 return 0;
13043}
13044_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013045if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013046 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13047else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013048 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013049fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013050rm -f core conftest.err conftest.$ac_objext \
13051 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013052LIBS=$ac_check_lib_save_LIBS
13053fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13055$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013056if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013057
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013058$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013059
13060fi
13061
13062
Martin v. Löwis0daad592001-09-30 21:09:59 +000013063# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13065$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013066if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013067 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013068else
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013070LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013073
Martin v. Löwiseba40652007-08-30 20:10:57 +000013074/* Override any GCC internal prototype to avoid an error.
13075 Use char because int might match the return type of a GCC
13076 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013077#ifdef __cplusplus
13078extern "C"
13079#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013080char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013081int
13082main ()
13083{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013084return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013085 ;
13086 return 0;
13087}
13088_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013089if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013090 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013091else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013092 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013093fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013094rm -f core conftest.err conftest.$ac_objext \
13095 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013096LIBS=$ac_check_lib_save_LIBS
13097fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13099$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013100if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013101
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013102$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013103
Guido van Rossum353ae582001-07-10 16:45:32 +000013104fi
13105
Jack Jansendd19cf82001-12-06 22:36:17 +000013106
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013107# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013109/* end confdefs.h. */
13110#include <readline/readline.h>
13111_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013112if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013113 have_readline=yes
13114else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013115 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013116
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013117fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013118rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013119if test $have_readline = yes
13120then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013122/* end confdefs.h. */
13123#include <readline/readline.h>
13124
13125_ACEOF
13126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013127 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013128
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013129$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013130
13131fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013132rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013133
13134fi
13135
Martin v. Löwis82bca632006-02-10 20:49:30 +000013136# End of readline checks: restore LIBS
13137LIBS=$LIBS_no_readline
13138
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13140$as_echo_n "checking for broken nice()... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013141if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013142 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013143else
Martin v. Löwis11437992002-04-12 09:54:03 +000013144
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013145if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013146 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013147else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013149/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013150
13151int main()
13152{
13153 int val1 = nice(1);
13154 if (val1 != -1 && val1 == nice(2))
13155 exit(0);
13156 exit(1);
13157}
13158
Martin v. Löwis11437992002-04-12 09:54:03 +000013159_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013160if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013161 ac_cv_broken_nice=yes
13162else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013163 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013164fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13166 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013167fi
13168
Martin v. Löwiseba40652007-08-30 20:10:57 +000013169fi
13170
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13172$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013173if test "$ac_cv_broken_nice" = yes
13174then
Martin v. Löwis11437992002-04-12 09:54:03 +000013175
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013176$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013177
13178fi
13179
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13181$as_echo_n "checking for broken poll()... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013182if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013183 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013184else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013185 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013186 ac_cv_broken_poll=no
13187else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013189/* end confdefs.h. */
13190
13191#include <poll.h>
13192
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013193int main()
13194{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013195 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013196 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013197
13198 close (42);
13199
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013200 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013201 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013202 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013203 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013204 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013205 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013206 return 1;
13207}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013208
13209_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013210if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013211 ac_cv_broken_poll=yes
13212else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013213 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013214fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13216 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013218
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013219fi
13220
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13222$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013223if test "$ac_cv_broken_poll" = yes
13224then
13225
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013226$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013227
13228fi
13229
Brett Cannon43802422005-02-10 20:48:03 +000013230# 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 +000013231# (which is not required by ISO C or UNIX spec) and/or if we support
13232# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013233ac_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 +000013234#include <$ac_cv_struct_tm>
13235
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013236"
Charles-François Natali97781b02011-07-22 23:43:42 +020013237if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013238
13239cat >>confdefs.h <<_ACEOF
13240#define HAVE_STRUCT_TM_TM_ZONE 1
13241_ACEOF
13242
13243
13244fi
13245
13246if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13247
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013248$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013249
13250else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013251 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13252"
Charles-François Natali97781b02011-07-22 23:43:42 +020013253if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013254 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013255else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013256 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013257fi
13258
Martin v. Löwiseba40652007-08-30 20:10:57 +000013259cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013260#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013261_ACEOF
13262
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13264$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013265if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013266 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013269/* end confdefs.h. */
13270#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013271#if !HAVE_DECL_TZNAME
13272extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013273#endif
13274
13275int
13276main ()
13277{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013278return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013279 ;
13280 return 0;
13281}
13282_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013283if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013284 ac_cv_var_tzname=yes
13285else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013286 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013287fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013288rm -f core conftest.err conftest.$ac_objext \
13289 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013290fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13292$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013293 if test $ac_cv_var_tzname = yes; then
13294
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013295$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013296
13297 fi
13298fi
13299
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013300
Martin v. Löwis1d459062005-03-14 21:23:33 +000013301# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13303$as_echo_n "checking for working tzset()... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013304if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013305 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013306else
13307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013308if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013309 ac_cv_working_tzset=no
13310else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013312/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013313
13314#include <stdlib.h>
13315#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013316#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013317
13318#if HAVE_TZNAME
13319extern char *tzname[];
13320#endif
13321
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013322int main()
13323{
Brett Cannon18367812003-09-19 00:59:16 +000013324 /* Note that we need to ensure that not only does tzset(3)
13325 do 'something' with localtime, but it works as documented
13326 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013327 This includes making sure that tzname is set properly if
13328 tm->tm_zone does not exist since it is the alternative way
13329 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013330
13331 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013332 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013333 */
13334
Martin v. Löwis1d459062005-03-14 21:23:33 +000013335 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013336 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13337
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013338 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013339 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013340 if (localtime(&groundhogday)->tm_hour != 0)
13341 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013342#if HAVE_TZNAME
13343 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13344 if (strcmp(tzname[0], "UTC") ||
13345 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13346 exit(1);
13347#endif
Brett Cannon18367812003-09-19 00:59:16 +000013348
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013349 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013350 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013351 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013352 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013353#if HAVE_TZNAME
13354 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13355 exit(1);
13356#endif
Brett Cannon18367812003-09-19 00:59:16 +000013357
13358 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13359 tzset();
13360 if (localtime(&groundhogday)->tm_hour != 11)
13361 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013362#if HAVE_TZNAME
13363 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13364 exit(1);
13365#endif
13366
13367#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013368 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13369 exit(1);
13370 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13371 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013372#endif
Brett Cannon18367812003-09-19 00:59:16 +000013373
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013374 exit(0);
13375}
13376
13377_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013378if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013379 ac_cv_working_tzset=yes
13380else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013381 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013382fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013383rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13384 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013385fi
13386
Martin v. Löwiseba40652007-08-30 20:10:57 +000013387fi
13388
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13390$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013391if test "$ac_cv_working_tzset" = yes
13392then
13393
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013394$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013395
13396fi
13397
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013398# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13400$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013401if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013402 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013403else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013405/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013406#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013407int
13408main ()
13409{
13410
13411struct stat st;
13412st.st_mtim.tv_nsec = 1;
13413
13414 ;
13415 return 0;
13416}
13417_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013418if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013419 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013420else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013421 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13424fi
13425
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13427$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013428if test "$ac_cv_stat_tv_nsec" = yes
13429then
13430
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013431$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013432
13433fi
13434
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013435# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13437$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013438if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013439 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013440else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013442/* end confdefs.h. */
13443#include <sys/stat.h>
13444int
13445main ()
13446{
13447
13448struct stat st;
13449st.st_mtimespec.tv_nsec = 1;
13450
13451 ;
13452 return 0;
13453}
13454_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013455if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013456 ac_cv_stat_tv_nsec2=yes
13457else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013458 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13461fi
13462
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13464$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013465if test "$ac_cv_stat_tv_nsec2" = yes
13466then
13467
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013468$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013469
13470fi
13471
Jack Jansen666b1e72001-10-31 12:11:48 +000013472# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13474$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013475if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013476 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013477else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013479/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013480#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013481int
13482main ()
13483{
Jack Jansen666b1e72001-10-31 12:11:48 +000013484
13485 int rtn;
13486 rtn = mvwdelch(0,0,0);
13487
Martin v. Löwis11437992002-04-12 09:54:03 +000013488 ;
13489 return 0;
13490}
13491_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013492if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013493 ac_cv_mvwdelch_is_expression=yes
13494else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013495 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13498fi
13499
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13501$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013502
13503if test "$ac_cv_mvwdelch_is_expression" = yes
13504then
Martin v. Löwis11437992002-04-12 09:54:03 +000013505
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013506$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013507
13508fi
13509
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13511$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013512if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013513 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013514else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013516/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013517#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013518int
13519main ()
13520{
Jack Jansen666b1e72001-10-31 12:11:48 +000013521
13522 WINDOW *w;
13523 w->_flags = 0;
13524
Martin v. Löwis11437992002-04-12 09:54:03 +000013525 ;
13526 return 0;
13527}
13528_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013529if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013530 ac_cv_window_has_flags=yes
13531else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013532 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13535fi
13536
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13538$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013539
Jack Jansen666b1e72001-10-31 12:11:48 +000013540
13541if test "$ac_cv_window_has_flags" = yes
13542then
Martin v. Löwis11437992002-04-12 09:54:03 +000013543
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013544$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013545
13546fi
13547
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13549$as_echo_n "checking for is_term_resized... " >&6; }
13550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013551/* end confdefs.h. */
13552#include <curses.h>
13553int
13554main ()
13555{
13556void *x=is_term_resized
13557 ;
13558 return 0;
13559}
13560_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013561if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013562
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013563$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013564
Matthias Klosec511b472010-05-08 11:01:39 +000013565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013566$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013567else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13569$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013570
13571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13573
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13575$as_echo_n "checking for resize_term... " >&6; }
13576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013577/* end confdefs.h. */
13578#include <curses.h>
13579int
13580main ()
13581{
13582void *x=resize_term
13583 ;
13584 return 0;
13585}
13586_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013587if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013588
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013589$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013590
Matthias Klosec511b472010-05-08 11:01:39 +000013591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013592$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13595$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013596
13597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13599
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13601$as_echo_n "checking for resizeterm... " >&6; }
13602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013603/* end confdefs.h. */
13604#include <curses.h>
13605int
13606main ()
13607{
13608void *x=resizeterm
13609 ;
13610 return 0;
13611}
13612_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013613if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013614
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013615$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013616
Matthias Klosec511b472010-05-08 11:01:39 +000013617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013618$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013619else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13621$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013622
13623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13625
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13627$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013628
13629if test -r /dev/ptmx
13630then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13632$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013633
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013634$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013635
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13638$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013639fi
13640
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13642$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013643
13644if test -r /dev/ptc
13645then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13647$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013648
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013649$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013650
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013651else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13653$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013654fi
13655
Mark Dickinson82864d12009-11-15 16:18:58 +000013656if test "$have_long_long" = yes
13657then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13659$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013660 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013661 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013662else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013663 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013664 ac_cv_have_long_long_format=no
13665else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013667/* end confdefs.h. */
13668
13669 #include <stdio.h>
13670 #include <stddef.h>
13671 #include <string.h>
13672
13673 #ifdef HAVE_SYS_TYPES_H
13674 #include <sys/types.h>
13675 #endif
13676
13677 int main()
13678 {
13679 char buffer[256];
13680
13681 if (sprintf(buffer, "%lld", (long long)123) < 0)
13682 return 1;
13683 if (strcmp(buffer, "123"))
13684 return 1;
13685
13686 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13687 return 1;
13688 if (strcmp(buffer, "-123"))
13689 return 1;
13690
13691 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13692 return 1;
13693 if (strcmp(buffer, "123"))
13694 return 1;
13695
13696 return 0;
13697 }
13698
13699_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013700if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013701 ac_cv_have_long_long_format=yes
13702else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013703 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013704fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13706 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013707fi
13708
13709
Mark Dickinson82864d12009-11-15 16:18:58 +000013710fi
13711
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13713$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013714fi
13715
Mark Dickinson5ce84742009-12-31 20:48:04 +000013716if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013717then
13718
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013719$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013720
13721fi
13722
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013723if test $ac_sys_system = Darwin
13724then
13725 LIBS="$LIBS -framework CoreFoundation"
13726fi
13727
Mark Dickinson82864d12009-11-15 16:18:58 +000013728
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13730$as_echo_n "checking for %zd printf() format support... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013731if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013732 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013733else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013734 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013735 ac_cv_have_size_t_format="cross -- assuming yes"
13736
Brett Cannon09d12362006-05-11 05:11:33 +000013737else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013739/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013740
Brett Cannon09d12362006-05-11 05:11:33 +000013741#include <stdio.h>
13742#include <stddef.h>
13743#include <string.h>
13744
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013745#ifdef HAVE_SYS_TYPES_H
13746#include <sys/types.h>
13747#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013748
13749#ifdef HAVE_SSIZE_T
13750typedef ssize_t Py_ssize_t;
13751#elif SIZEOF_VOID_P == SIZEOF_LONG
13752typedef long Py_ssize_t;
13753#else
13754typedef int Py_ssize_t;
13755#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013756
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013757int main()
13758{
13759 char buffer[256];
13760
Brett Cannon09d12362006-05-11 05:11:33 +000013761 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13762 return 1;
13763
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013764 if (strcmp(buffer, "123"))
13765 return 1;
13766
13767 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13768 return 1;
13769
13770 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013771 return 1;
13772
13773 return 0;
13774}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013775
Brett Cannon09d12362006-05-11 05:11:33 +000013776_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013777if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013778 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013779else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013780 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013781fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13783 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013784fi
13785
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013786fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13788$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013789if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013790
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013791$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013792
13793fi
13794
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013795ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013796#ifdef HAVE_SYS_TYPES_H
13797#include <sys/types.h>
13798#endif
13799#ifdef HAVE_SYS_SOCKET_H
13800#include <sys/socket.h>
13801#endif
13802
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013803"
Charles-François Natali97781b02011-07-22 23:43:42 +020013804if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013805
Martin v. Löwis11437992002-04-12 09:54:03 +000013806else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013807
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013808$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013809
13810fi
13811
Michael W. Hudson54241132001-12-07 15:38:26 +000013812
Benjamin Peterson7497e912010-10-16 00:53:39 +000013813case $ac_sys_system in
13814AIX*)
13815
13816$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13817 ;;
13818esac
13819
13820
Michael W. Hudson54241132001-12-07 15:38:26 +000013821
13822
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013823for h in `(cd $srcdir;echo Python/thread_*.h)`
13824do
13825 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13826done
13827
Michael W. Hudson54241132001-12-07 15:38:26 +000013828
Neal Norwitzd24499d2005-12-18 21:36:39 +000013829SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13831$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013832for dir in $SRCDIRS; do
13833 if test ! -d $dir; then
13834 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013835 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013836done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13838$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013839
Guido van Rossum627b2d71993-12-24 10:39:16 +000013840# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000013841ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013842
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000013843ac_config_files="$ac_config_files Modules/ld_so_aix"
13844
Martin v. Löwis11437992002-04-12 09:54:03 +000013845cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013846# This file is a shell script that caches the results of configure
13847# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013848# scripts and configure runs, see configure's option --config-cache.
13849# It is not useful on other systems. If it contains results you don't
13850# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013851#
Martin v. Löwis11437992002-04-12 09:54:03 +000013852# config.status only pays attention to the cache file if you give it
13853# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013854#
Skip Montanaro6dead952003-09-25 14:50:04 +000013855# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013856# loading this file, other *unset* `ac_cv_foo' will be assigned the
13857# following values.
13858
13859_ACEOF
13860
Guido van Rossumf78abae1997-01-21 22:02:36 +000013861# The following way of writing the cache mishandles newlines in values,
13862# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013863# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013864# Ultrix sh set writes to stderr and can't be redirected directly,
13865# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013866(
13867 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13868 eval ac_val=\$$ac_var
13869 case $ac_val in #(
13870 *${as_nl}*)
13871 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013872 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13873$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013874 esac
13875 case $ac_var in #(
13876 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013877 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13878 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013879 esac ;;
13880 esac
13881 done
13882
Martin v. Löwis11437992002-04-12 09:54:03 +000013883 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000013884 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13885 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013886 # `set' does not quote correctly, so add quotes: double-quote
13887 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013888 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013889 "s/'/'\\\\''/g;
13890 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013891 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013892 *)
13893 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013894 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013895 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013896 esac |
13897 sort
13898) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013899 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000013900 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013901 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000013902 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013903 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13904 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000013905 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13906 :end' >>confcache
13907if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13908 if test -w "$cache_file"; then
Charles-François Natali97781b02011-07-22 23:43:42 +020013909 test "x$cache_file" != "x/dev/null" &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013910 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13911$as_echo "$as_me: updating cache $cache_file" >&6;}
Charles-François Natali97781b02011-07-22 23:43:42 +020013912 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013913 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013914 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13915$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013916 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013917fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013918rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013919
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013920test "x$prefix" = xNONE && prefix=$ac_default_prefix
13921# Let make expand exec_prefix.
13922test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013923
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013924DEFS=-DHAVE_CONFIG_H
13925
Skip Montanaro6dead952003-09-25 14:50:04 +000013926ac_libobjs=
13927ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013928U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013929for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13930 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013931 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013932 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000013933 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13934 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013935 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13936 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013937done
13938LIBOBJS=$ac_libobjs
13939
13940LTLIBOBJS=$ac_ltlibobjs
13941
13942
Martin v. Löwis11437992002-04-12 09:54:03 +000013943
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013944
Charles-François Natali97781b02011-07-22 23:43:42 +020013945: ${CONFIG_STATUS=./config.status}
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013946ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013947ac_clean_files_save=$ac_clean_files
13948ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013949{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13950$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13951as_write_fail=0
13952cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013953#! $SHELL
13954# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013955# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013956# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013957# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013958
Martin v. Löwis11437992002-04-12 09:54:03 +000013959debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013960ac_cs_recheck=false
13961ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013962
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013963SHELL=\${CONFIG_SHELL-$SHELL}
13964export SHELL
13965_ASEOF
13966cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13967## -------------------- ##
13968## M4sh Initialization. ##
13969## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013970
Martin v. Löwiseba40652007-08-30 20:10:57 +000013971# Be more Bourne compatible
13972DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013973if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013974 emulate sh
13975 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013976 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013977 # is contrary to our usage. Disable this feature.
13978 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013979 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000013980else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013981 case `(set -o) 2>/dev/null` in #(
13982 *posix*) :
13983 set -o posix ;; #(
13984 *) :
13985 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013986esac
Martin v. Löwis11437992002-04-12 09:54:03 +000013987fi
Michael W. Hudson54241132001-12-07 15:38:26 +000013988
Skip Montanaro6dead952003-09-25 14:50:04 +000013989
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013990as_nl='
13991'
13992export as_nl
13993# Printing a long string crashes Solaris 7 /usr/bin/printf.
13994as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13995as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13996as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13997# Prefer a ksh shell builtin over an external printf program on Solaris,
13998# but without wasting forks for bash or zsh.
13999if test -z "$BASH_VERSION$ZSH_VERSION" \
14000 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14001 as_echo='print -r --'
14002 as_echo_n='print -rn --'
14003elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14004 as_echo='printf %s\n'
14005 as_echo_n='printf %s'
14006else
14007 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14008 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14009 as_echo_n='/usr/ucb/echo -n'
14010 else
14011 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14012 as_echo_n_body='eval
14013 arg=$1;
14014 case $arg in #(
14015 *"$as_nl"*)
14016 expr "X$arg" : "X\\(.*\\)$as_nl";
14017 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14018 esac;
14019 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14020 '
14021 export as_echo_n_body
14022 as_echo_n='sh -c $as_echo_n_body as_echo'
14023 fi
14024 export as_echo_body
14025 as_echo='sh -c $as_echo_body as_echo'
14026fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014027
14028# The user is always right.
14029if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014030 PATH_SEPARATOR=:
14031 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14032 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14033 PATH_SEPARATOR=';'
14034 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014035fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014036
Martin v. Löwiseba40652007-08-30 20:10:57 +000014037
14038# IFS
14039# We need space, tab and new line, in precisely that order. Quoting is
14040# there to prevent editors from complaining about space-tab.
14041# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14042# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014043IFS=" "" $as_nl"
14044
14045# Find who we are. Look in the path if we contain no directory separator.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014046case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014047 *[\\/]* ) as_myself=$0 ;;
14048 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014049for as_dir in $PATH
14050do
14051 IFS=$as_save_IFS
14052 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014053 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14054 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014055IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014056
Martin v. Löwiseba40652007-08-30 20:10:57 +000014057 ;;
14058esac
14059# We did not find ourselves, most probably we were run as `sh COMMAND'
14060# in which case we are not to be found in the path.
14061if test "x$as_myself" = x; then
14062 as_myself=$0
14063fi
14064if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014065 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14066 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014067fi
14068
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014069# Unset variables that we do not need and which cause bugs (e.g. in
14070# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14071# suppresses any "Segmentation fault" message there. '((' could
14072# trigger a bug in pdksh 5.2.14.
14073for as_var in BASH_ENV ENV MAIL MAILPATH
14074do eval test x\${$as_var+set} = xset \
14075 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014076done
14077PS1='$ '
14078PS2='> '
14079PS4='+ '
14080
14081# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014082LC_ALL=C
14083export LC_ALL
14084LANGUAGE=C
14085export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014086
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014087# CDPATH.
14088(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14089
14090
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014091# as_fn_error STATUS ERROR [LINENO LOG_FD]
14092# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014093# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14094# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014095# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014096as_fn_error ()
14097{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014098 as_status=$1; test $as_status -eq 0 && as_status=1
14099 if test "$4"; then
14100 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14101 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014102 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014103 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014104 as_fn_exit $as_status
14105} # as_fn_error
14106
14107
14108# as_fn_set_status STATUS
14109# -----------------------
14110# Set $? to STATUS, without forking.
14111as_fn_set_status ()
14112{
14113 return $1
14114} # as_fn_set_status
14115
14116# as_fn_exit STATUS
14117# -----------------
14118# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14119as_fn_exit ()
14120{
14121 set +e
14122 as_fn_set_status $1
14123 exit $1
14124} # as_fn_exit
14125
14126# as_fn_unset VAR
14127# ---------------
14128# Portably unset VAR.
14129as_fn_unset ()
14130{
14131 { eval $1=; unset $1;}
14132}
14133as_unset=as_fn_unset
14134# as_fn_append VAR VALUE
14135# ----------------------
14136# Append the text in VALUE to the end of the definition contained in VAR. Take
14137# advantage of any shell optimizations that allow amortized linear growth over
14138# repeated appends, instead of the typical quadratic growth present in naive
14139# implementations.
14140if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14141 eval 'as_fn_append ()
14142 {
14143 eval $1+=\$2
14144 }'
14145else
14146 as_fn_append ()
14147 {
14148 eval $1=\$$1\$2
14149 }
14150fi # as_fn_append
14151
14152# as_fn_arith ARG...
14153# ------------------
14154# Perform arithmetic evaluation on the ARGs, and store the result in the
14155# global $as_val. Take advantage of shells that can avoid forks. The arguments
14156# must be portable across $(()) and expr.
14157if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14158 eval 'as_fn_arith ()
14159 {
14160 as_val=$(( $* ))
14161 }'
14162else
14163 as_fn_arith ()
14164 {
14165 as_val=`expr "$@" || test $? -eq 1`
14166 }
14167fi # as_fn_arith
14168
14169
Martin v. Löwiseba40652007-08-30 20:10:57 +000014170if expr a : '\(a\)' >/dev/null 2>&1 &&
14171 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14172 as_expr=expr
14173else
14174 as_expr=false
14175fi
14176
14177if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14178 as_basename=basename
14179else
14180 as_basename=false
14181fi
14182
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014183if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14184 as_dirname=dirname
14185else
14186 as_dirname=false
14187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014188
Martin v. Löwiseba40652007-08-30 20:10:57 +000014189as_me=`$as_basename -- "$0" ||
14190$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14191 X"$0" : 'X\(//\)$' \| \
14192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014193$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014194 sed '/^.*\/\([^/][^/]*\)\/*$/{
14195 s//\1/
14196 q
14197 }
14198 /^X\/\(\/\/\)$/{
14199 s//\1/
14200 q
14201 }
14202 /^X\/\(\/\).*/{
14203 s//\1/
14204 q
14205 }
14206 s/.*/./; q'`
14207
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014208# Avoid depending upon Character Ranges.
14209as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14210as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14211as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14212as_cr_digits='0123456789'
14213as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014214
14215ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014216case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014217-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014218 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014219 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014220 xy) ECHO_C='\c';;
14221 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14222 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014223 esac;;
14224*)
14225 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014226esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014227
Martin v. Löwis11437992002-04-12 09:54:03 +000014228rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014229if test -d conf$$.dir; then
14230 rm -f conf$$.dir/conf$$.file
14231else
14232 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014233 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014234fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014235if (echo >conf$$.file) 2>/dev/null; then
14236 if ln -s conf$$.file conf$$ 2>/dev/null; then
14237 as_ln_s='ln -s'
14238 # ... but there are two gotchas:
14239 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14240 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14241 # In both cases, we have to default to `cp -p'.
14242 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14243 as_ln_s='cp -p'
14244 elif ln conf$$.file conf$$ 2>/dev/null; then
14245 as_ln_s=ln
14246 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014247 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014248 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014249else
14250 as_ln_s='cp -p'
14251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014252rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14253rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014254
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014255
14256# as_fn_mkdir_p
14257# -------------
14258# Create "$as_dir" as a directory, including parents if necessary.
14259as_fn_mkdir_p ()
14260{
14261
14262 case $as_dir in #(
14263 -*) as_dir=./$as_dir;;
14264 esac
14265 test -d "$as_dir" || eval $as_mkdir_p || {
14266 as_dirs=
14267 while :; do
14268 case $as_dir in #(
14269 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14270 *) as_qdir=$as_dir;;
14271 esac
14272 as_dirs="'$as_qdir' $as_dirs"
14273 as_dir=`$as_dirname -- "$as_dir" ||
14274$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14275 X"$as_dir" : 'X\(//\)[^/]' \| \
14276 X"$as_dir" : 'X\(//\)$' \| \
14277 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14278$as_echo X"$as_dir" |
14279 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14280 s//\1/
14281 q
14282 }
14283 /^X\(\/\/\)[^/].*/{
14284 s//\1/
14285 q
14286 }
14287 /^X\(\/\/\)$/{
14288 s//\1/
14289 q
14290 }
14291 /^X\(\/\).*/{
14292 s//\1/
14293 q
14294 }
14295 s/.*/./; q'`
14296 test -d "$as_dir" && break
14297 done
14298 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014299 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014300
14301
14302} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014303if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014304 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014305else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014306 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014307 as_mkdir_p=false
14308fi
14309
Martin v. Löwiseba40652007-08-30 20:10:57 +000014310if test -x / >/dev/null 2>&1; then
14311 as_test_x='test -x'
14312else
14313 if ls -dL / >/dev/null 2>&1; then
14314 as_ls_L_option=L
14315 else
14316 as_ls_L_option=
14317 fi
14318 as_test_x='
14319 eval sh -c '\''
14320 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014321 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000014322 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014323 case $1 in #(
14324 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014325 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014326 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014327 ???[sx]*):;;*)false;;esac;fi
14328 '\'' sh
14329 '
14330fi
14331as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014332
14333# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014334as_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 +000014335
14336# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014337as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014338
14339
Martin v. Löwis11437992002-04-12 09:54:03 +000014340exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014341## ----------------------------------- ##
14342## Main body of $CONFIG_STATUS script. ##
14343## ----------------------------------- ##
14344_ASEOF
14345test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014346
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014347cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14348# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014349# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014350# values after options handling.
14351ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014352This file was extended by python $as_me 2.7, which was
Charles-François Natali97781b02011-07-22 23:43:42 +020014353generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014354
14355 CONFIG_FILES = $CONFIG_FILES
14356 CONFIG_HEADERS = $CONFIG_HEADERS
14357 CONFIG_LINKS = $CONFIG_LINKS
14358 CONFIG_COMMANDS = $CONFIG_COMMANDS
14359 $ $0 $@
14360
Martin v. Löwiseba40652007-08-30 20:10:57 +000014361on `(hostname || uname -n) 2>/dev/null | sed 1q`
14362"
14363
Martin v. Löwis11437992002-04-12 09:54:03 +000014364_ACEOF
14365
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014366case $ac_config_files in *"
14367"*) set x $ac_config_files; shift; ac_config_files=$*;;
14368esac
14369
14370case $ac_config_headers in *"
14371"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14372esac
14373
14374
14375cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014376# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014377config_files="$ac_config_files"
14378config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014379
Martin v. Löwiseba40652007-08-30 20:10:57 +000014380_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014381
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014382cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014383ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014384\`$as_me' instantiates files and other configuration actions
14385from templates according to the current configuration. Unless the files
14386and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014387
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014388Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014389
14390 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014391 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014392 --config print configuration, then exit
14393 -q, --quiet, --silent
14394 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014395 -d, --debug don't remove temporary files
14396 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014397 --file=FILE[:TEMPLATE]
14398 instantiate the configuration file FILE
14399 --header=FILE[:TEMPLATE]
14400 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014401
14402Configuration files:
14403$config_files
14404
14405Configuration headers:
14406$config_headers
14407
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014408Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014409
Martin v. Löwiseba40652007-08-30 20:10:57 +000014410_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014411cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14412ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014413ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014414python config.status 2.7
Charles-François Natali97781b02011-07-22 23:43:42 +020014415configured by $0, generated by GNU Autoconf 2.67,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014416 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014417
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014418Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014419This config.status script is free software; the Free Software Foundation
14420gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014421
14422ac_pwd='$ac_pwd'
14423srcdir='$srcdir'
14424INSTALL='$INSTALL'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014425test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014426_ACEOF
14427
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014428cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14429# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014430ac_need_defaults=:
14431while test $# != 0
14432do
14433 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014434 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014435 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14436 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014437 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014438 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014439 --*=)
14440 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14441 ac_optarg=
14442 ac_shift=:
14443 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014444 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014445 ac_option=$1
14446 ac_optarg=$2
14447 ac_shift=shift
14448 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014449 esac
14450
Skip Montanaro6dead952003-09-25 14:50:04 +000014451 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014452 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014453 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14454 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014455 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014456 $as_echo "$ac_cs_version"; exit ;;
14457 --config | --confi | --conf | --con | --co | --c )
14458 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014459 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014460 debug=: ;;
14461 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014462 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014463 case $ac_optarg in
14464 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014465 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014466 esac
14467 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014468 ac_need_defaults=false;;
14469 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014470 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014471 case $ac_optarg in
14472 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14473 esac
14474 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014475 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014476 --he | --h)
14477 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014478 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014479Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014480 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014481 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014482 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14483 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14484 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014485
14486 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014487 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014488Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014489
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014490 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014491 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014492
14493 esac
14494 shift
14495done
14496
Skip Montanaro6dead952003-09-25 14:50:04 +000014497ac_configure_extra_args=
14498
14499if $ac_cs_silent; then
14500 exec 6>/dev/null
14501 ac_configure_extra_args="$ac_configure_extra_args --silent"
14502fi
14503
14504_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014505cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014506if \$ac_cs_recheck; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014507 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14508 shift
14509 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14510 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014511 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014512 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014513fi
14514
Martin v. Löwis11437992002-04-12 09:54:03 +000014515_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014516cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014517exec 5>>config.log
14518{
14519 echo
14520 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14521## Running $as_me. ##
14522_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014523 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014524} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014525
Martin v. Löwiseba40652007-08-30 20:10:57 +000014526_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014527cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014528_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014529
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014530cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014531
14532# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014533for ac_config_target in $ac_config_targets
14534do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014535 case $ac_config_target in
14536 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14537 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14538 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14539 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014540 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14541 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014542 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14543 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014544 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014545 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014546
Charles-François Natali97781b02011-07-22 23:43:42 +020014547 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014548 esac
14549done
14550
Martin v. Löwiseba40652007-08-30 20:10:57 +000014551
Martin v. Löwis11437992002-04-12 09:54:03 +000014552# If the user did not use the arguments to specify the items to instantiate,
14553# then the envvar interface is used. Set only those that are not.
14554# We use the long form for the default assignment because of an extremely
14555# bizarre bug on SunOS 4.1.3.
14556if $ac_need_defaults; then
14557 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14558 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14559fi
14560
Skip Montanaro6dead952003-09-25 14:50:04 +000014561# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014562# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014563# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014564# Hook for its removal unless debugging.
14565# Note that there is a small window in which the directory will not be cleaned:
14566# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014567$debug ||
14568{
Charles-François Natali97781b02011-07-22 23:43:42 +020014569 tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000014570 trap 'exit_status=$?
Charles-François Natali97781b02011-07-22 23:43:42 +020014571 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000014572' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014573 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014574}
Martin v. Löwis11437992002-04-12 09:54:03 +000014575# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014576
Martin v. Löwis11437992002-04-12 09:54:03 +000014577{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014578 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Charles-François Natali97781b02011-07-22 23:43:42 +020014579 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014580} ||
14581{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014582 tmp=./conf$$-$RANDOM
14583 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014584} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014585
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014586# Set up the scripts for CONFIG_FILES section.
14587# No need to generate them if there are no CONFIG_FILES.
14588# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014589if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014590
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014591
14592ac_cr=`echo X | tr X '\015'`
14593# On cygwin, bash can eat \r inside `` if the user requested igncr.
14594# But we know of no other shell where ac_cr would be empty at this
14595# point, so we can use a bashism as a fallback.
14596if test "x$ac_cr" = x; then
14597 eval ac_cr=\$\'\\r\'
14598fi
14599ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14600if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014601 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014602else
14603 ac_cs_awk_cr=$ac_cr
14604fi
14605
Charles-François Natali97781b02011-07-22 23:43:42 +020014606echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014607_ACEOF
14608
Martin v. Löwiseba40652007-08-30 20:10:57 +000014609
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014610{
14611 echo "cat >conf$$subs.awk <<_ACEOF" &&
14612 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14613 echo "_ACEOF"
14614} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014615 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14616ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014617ac_delim='%!_!# '
14618for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014619 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014620 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014621
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014622 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14623 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014624 break
14625 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014626 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014627 else
14628 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014629 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014630done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014631rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014632
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014633cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Charles-François Natali97781b02011-07-22 23:43:42 +020014634cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014635_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014636sed -n '
14637h
14638s/^/S["/; s/!.*/"]=/
14639p
14640g
14641s/^[^!]*!//
14642:repl
14643t repl
14644s/'"$ac_delim"'$//
14645t delim
14646:nl
14647h
14648s/\(.\{148\}\)..*/\1/
14649t more1
14650s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14651p
14652n
14653b repl
14654:more1
14655s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14656p
14657g
14658s/.\{148\}//
14659t nl
14660:delim
14661h
14662s/\(.\{148\}\)..*/\1/
14663t more2
14664s/["\\]/\\&/g; s/^/"/; s/$/"/
14665p
14666b
14667:more2
14668s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14669p
14670g
14671s/.\{148\}//
14672t delim
14673' <conf$$subs.awk | sed '
14674/^[^""]/{
14675 N
14676 s/\n//
14677}
14678' >>$CONFIG_STATUS || ac_write_fail=1
14679rm -f conf$$subs.awk
14680cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14681_ACAWK
Charles-François Natali97781b02011-07-22 23:43:42 +020014682cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014683 for (key in S) S_is_set[key] = 1
14684 FS = ""
14685
14686}
14687{
14688 line = $ 0
14689 nfields = split(line, field, "@")
14690 substed = 0
14691 len = length(field[1])
14692 for (i = 2; i < nfields; i++) {
14693 key = field[i]
14694 keylen = length(key)
14695 if (S_is_set[key]) {
14696 value = S[key]
14697 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14698 len += length(value) + length(field[++i])
14699 substed = 1
14700 } else
14701 len += 1 + keylen
14702 }
14703
14704 print line
14705}
14706
14707_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014708_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014709cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14710if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14711 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14712else
14713 cat
Charles-François Natali97781b02011-07-22 23:43:42 +020014714fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014715 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014716_ACEOF
14717
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014718# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14719# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000014720# trailing colons and then remove the whole line if VPATH becomes empty
14721# (actually we leave an empty line to preserve line numbers).
14722if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014723 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14724h
14725s///
14726s/^/:/
14727s/[ ]*$/:/
14728s/:\$(srcdir):/:/g
14729s/:\${srcdir}:/:/g
14730s/:@srcdir@:/:/g
14731s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014732s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014733x
14734s/\(=[ ]*\).*/\1/
14735G
14736s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014737s/^[^=]*=[ ]*$//
14738}'
14739fi
14740
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014741cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014742fi # test -n "$CONFIG_FILES"
14743
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014744# Set up the scripts for CONFIG_HEADERS section.
14745# No need to generate them if there are no CONFIG_HEADERS.
14746# This happens for instance with `./config.status Makefile'.
14747if test -n "$CONFIG_HEADERS"; then
Charles-François Natali97781b02011-07-22 23:43:42 +020014748cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014749BEGIN {
14750_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014751
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014752# Transform confdefs.h into an awk script `defines.awk', embedded as
14753# here-document in config.status, that substitutes the proper values into
14754# config.h.in to produce config.h.
14755
14756# Create a delimiter string that does not exist in confdefs.h, to ease
14757# handling of long lines.
14758ac_delim='%!_!# '
14759for ac_last_try in false false :; do
Charles-François Natali97781b02011-07-22 23:43:42 +020014760 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14761 if test -z "$ac_t"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014762 break
14763 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014764 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014765 else
14766 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14767 fi
14768done
14769
14770# For the awk script, D is an array of macro values keyed by name,
14771# likewise P contains macro parameters if any. Preserve backslash
14772# newline sequences.
14773
14774ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14775sed -n '
14776s/.\{148\}/&'"$ac_delim"'/g
14777t rset
14778:rset
14779s/^[ ]*#[ ]*define[ ][ ]*/ /
14780t def
14781d
14782:def
14783s/\\$//
14784t bsnl
14785s/["\\]/\\&/g
14786s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14787D["\1"]=" \3"/p
14788s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14789d
14790:bsnl
14791s/["\\]/\\&/g
14792s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14793D["\1"]=" \3\\\\\\n"\\/p
14794t cont
14795s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14796t cont
14797d
14798:cont
14799n
14800s/.\{148\}/&'"$ac_delim"'/g
14801t clear
14802:clear
14803s/\\$//
14804t bsnlc
14805s/["\\]/\\&/g; s/^/"/; s/$/"/p
14806d
14807:bsnlc
14808s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14809b cont
14810' <confdefs.h | sed '
14811s/'"$ac_delim"'/"\\\
14812"/g' >>$CONFIG_STATUS || ac_write_fail=1
14813
14814cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14815 for (key in D) D_is_set[key] = 1
14816 FS = ""
14817}
14818/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14819 line = \$ 0
14820 split(line, arg, " ")
14821 if (arg[1] == "#") {
14822 defundef = arg[2]
14823 mac1 = arg[3]
14824 } else {
14825 defundef = substr(arg[1], 2)
14826 mac1 = arg[2]
14827 }
14828 split(mac1, mac2, "(") #)
14829 macro = mac2[1]
14830 prefix = substr(line, 1, index(line, defundef) - 1)
14831 if (D_is_set[macro]) {
14832 # Preserve the white space surrounding the "#".
14833 print prefix "define", macro P[macro] D[macro]
14834 next
14835 } else {
14836 # Replace #undef with comments. This is necessary, for example,
14837 # in the case of _POSIX_SOURCE, which is predefined and required
14838 # on some systems where configure will not decide to define it.
14839 if (defundef == "undef") {
14840 print "/*", prefix defundef, macro, "*/"
14841 next
14842 }
14843 }
14844}
14845{ print }
14846_ACAWK
14847_ACEOF
14848cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014849 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014850fi # test -n "$CONFIG_HEADERS"
14851
14852
14853eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14854shift
14855for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000014856do
14857 case $ac_tag in
14858 :[FHLC]) ac_mode=$ac_tag; continue;;
14859 esac
14860 case $ac_mode$ac_tag in
14861 :[FHL]*:*);;
Charles-François Natali97781b02011-07-22 23:43:42 +020014862 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014863 :[FH]-) ac_tag=-:-;;
14864 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14865 esac
14866 ac_save_IFS=$IFS
14867 IFS=:
14868 set x $ac_tag
14869 IFS=$ac_save_IFS
14870 shift
14871 ac_file=$1
14872 shift
14873
14874 case $ac_mode in
14875 :L) ac_source=$1;;
14876 :[FH])
14877 ac_file_inputs=
14878 for ac_f
14879 do
14880 case $ac_f in
Charles-François Natali97781b02011-07-22 23:43:42 +020014881 -) ac_f="$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014882 *) # Look for the file first in the build tree, then in the source tree
14883 # (if the path is not absolute). The absolute path cannot be DOS-style,
14884 # because $ac_f cannot contain `:'.
14885 test -f "$ac_f" ||
14886 case $ac_f in
14887 [\\/$]*) false;;
14888 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14889 esac ||
Charles-François Natali97781b02011-07-22 23:43:42 +020014890 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014891 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014892 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14893 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014894 done
14895
14896 # Let's still pretend it is `configure' which instantiates (i.e., don't
14897 # use $as_me), people would be surprised to read:
14898 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014899 configure_input='Generated from '`
14900 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14901 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014902 if test x"$ac_file" != x-; then
14903 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014904 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14905$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014906 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014907 # Neutralize special characters interpreted by sed in replacement strings.
14908 case $configure_input in #(
14909 *\&* | *\|* | *\\* )
14910 ac_sed_conf_input=`$as_echo "$configure_input" |
14911 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14912 *) ac_sed_conf_input=$configure_input;;
14913 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014914
14915 case $ac_tag in
Charles-François Natali97781b02011-07-22 23:43:42 +020014916 *:-:* | *:-) cat >"$tmp/stdin" \
14917 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014918 esac
14919 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014920 esac
14921
Martin v. Löwiseba40652007-08-30 20:10:57 +000014922 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014923$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014924 X"$ac_file" : 'X\(//\)[^/]' \| \
14925 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000014926 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014927$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014928 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14929 s//\1/
14930 q
14931 }
14932 /^X\(\/\/\)[^/].*/{
14933 s//\1/
14934 q
14935 }
14936 /^X\(\/\/\)$/{
14937 s//\1/
14938 q
14939 }
14940 /^X\(\/\).*/{
14941 s//\1/
14942 q
14943 }
14944 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014945 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014946 ac_builddir=.
14947
Martin v. Löwiseba40652007-08-30 20:10:57 +000014948case "$ac_dir" in
14949.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14950*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014951 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014952 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014953 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014954 case $ac_top_builddir_sub in
14955 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14956 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14957 esac ;;
14958esac
14959ac_abs_top_builddir=$ac_pwd
14960ac_abs_builddir=$ac_pwd$ac_dir_suffix
14961# for backward compatibility:
14962ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014963
14964case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014965 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014966 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014967 ac_top_srcdir=$ac_top_builddir_sub
14968 ac_abs_top_srcdir=$ac_pwd ;;
14969 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014970 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014971 ac_top_srcdir=$srcdir
14972 ac_abs_top_srcdir=$srcdir ;;
14973 *) # Relative name.
14974 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14975 ac_top_srcdir=$ac_top_build_prefix$srcdir
14976 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014977esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014978ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014979
Martin v. Löwis11437992002-04-12 09:54:03 +000014980
Martin v. Löwiseba40652007-08-30 20:10:57 +000014981 case $ac_mode in
14982 :F)
14983 #
14984 # CONFIG_FILE
14985 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014986
14987 case $INSTALL in
14988 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014989 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014990 esac
Brett Cannon19fab762007-06-02 03:02:29 +000014991_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014992
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014993cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014994# If the template does not know about datarootdir, expand it.
14995# FIXME: This hack should be removed a few years after 2.60.
14996ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014997ac_sed_dataroot='
14998/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000014999 p
15000 q
15001}
15002/@datadir@/p
15003/@docdir@/p
15004/@infodir@/p
15005/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015006/@mandir@/p'
15007case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015008*datarootdir*) ac_datarootdir_seen=yes;;
15009*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015010 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15011$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015012_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015013cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015014 ac_datarootdir_hack='
15015 s&@datadir@&$datadir&g
15016 s&@docdir@&$docdir&g
15017 s&@infodir@&$infodir&g
15018 s&@localedir@&$localedir&g
15019 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015020 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015021esac
15022_ACEOF
15023
15024# Neutralize VPATH when `$srcdir' = `.'.
15025# Shell code in configure.ac might set extrasub.
15026# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015027cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15028ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015029$extrasub
15030_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015031cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015032:t
15033/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015034s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015035s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015036s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015037s&@srcdir@&$ac_srcdir&;t t
15038s&@abs_srcdir@&$ac_abs_srcdir&;t t
15039s&@top_srcdir@&$ac_top_srcdir&;t t
15040s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15041s&@builddir@&$ac_builddir&;t t
15042s&@abs_builddir@&$ac_abs_builddir&;t t
15043s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15044s&@INSTALL@&$ac_INSTALL&;t t
15045$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015046"
Charles-François Natali97781b02011-07-22 23:43:42 +020015047eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15048 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015049
Martin v. Löwiseba40652007-08-30 20:10:57 +000015050test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Charles-François Natali97781b02011-07-22 23:43:42 +020015051 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15052 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015053 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015054which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015055$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015056which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015057
Charles-François Natali97781b02011-07-22 23:43:42 +020015058 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015059 case $ac_file in
Charles-François Natali97781b02011-07-22 23:43:42 +020015060 -) cat "$tmp/out" && rm -f "$tmp/out";;
15061 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015062 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015063 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015064 ;;
15065 :H)
15066 #
15067 # CONFIG_HEADER
15068 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015069 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015070 {
15071 $as_echo "/* $configure_input */" \
Charles-François Natali97781b02011-07-22 23:43:42 +020015072 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15073 } >"$tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015074 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Charles-François Natali97781b02011-07-22 23:43:42 +020015075 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015076 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15077$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015078 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015079 rm -f "$ac_file"
Charles-François Natali97781b02011-07-22 23:43:42 +020015080 mv "$tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015081 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 fi
15083 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015084 $as_echo "/* $configure_input */" \
Charles-François Natali97781b02011-07-22 23:43:42 +020015085 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015086 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015087 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015088 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015089
Martin v. Löwiseba40652007-08-30 20:10:57 +000015090
15091 esac
15092
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015093
15094 case $ac_file$ac_mode in
15095 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15096
15097 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015098done # for ac_tag
15099
Guido van Rossum627b2d71993-12-24 10:39:16 +000015100
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015101as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015102_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015103ac_clean_files=$ac_clean_files_save
15104
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015105test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015106 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015107
Martin v. Löwis11437992002-04-12 09:54:03 +000015108
15109# configure is writing to config.log, and then calls config.status.
15110# config.status does its own redirection, appending to config.log.
15111# Unfortunately, on DOS this fails, as config.log is still kept open
15112# by configure, so config.status won't be able to write to it; its
15113# output is simply discarded. So we exec the FD to /dev/null,
15114# effectively closing config.log, so it can be properly (re)opened and
15115# appended to by config.status. When coming back to configure, we
15116# need to make the FD available again.
15117if test "$no_create" != yes; then
15118 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015119 ac_config_status_args=
15120 test "$silent" = yes &&
15121 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015123 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 exec 5>>config.log
15125 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15126 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015127 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015128fi
15129if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15130 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15131$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015132fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015133
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015134
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015135echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015136if test ! -f Modules/Setup
15137then
15138 cp $srcdir/Modules/Setup.dist Modules/Setup
15139fi
15140
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015141echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015142if test ! -f Modules/Setup.local
15143then
15144 echo "# Edit this file for local setup changes" >Modules/Setup.local
15145fi
15146
15147echo "creating Makefile"
15148$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15149 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015150 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015151
15152case $ac_sys_system in
15153BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015155
15156 Support for BeOS is deprecated as of Python 2.6.
15157 See PEP 11 for the gory details.
15158 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015159$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015160
15161 Support for BeOS is deprecated as of Python 2.6.
15162 See PEP 11 for the gory details.
15163 " >&2;}
15164 ;;
15165*) ;;
15166esac
15167
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015168mv config.c Modules