blob: a3a092b25acc22e88ff82db740cf39875d9b5104 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandl1ca2e792011-03-05 20:51:24 +01002# From configure.in Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004# Generated by GNU Autoconf 2.65 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
11# Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +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 Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +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 Kloseb9621712010-04-24 17:59:49 +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+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +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 Kloseb9621712010-04-24 17:59:49 +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 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +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.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +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 || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +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
Benjamin Peterson316e02b2011-05-10 15:01:56 -0500224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +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"
Benjamin Peterson316e02b2011-05-10 15:01:56 -0500323 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +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
Benjamin Peterson316e02b2011-05-10 15:01:56 -0500363# as_fn_error ERROR [LINENO LOG_FD]
364# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +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
Benjamin Peterson316e02b2011-05-10 15:01:56 -0500367# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Benjamin Peterson316e02b2011-05-10 15:01:56 -0500370 as_status=$?; test $as_status -eq 0 && as_status=1
371 if test "$3"; then
372 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +0000374 fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -0500375 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000376 as_fn_exit $as_status
377} # as_fn_error
378
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +0000392if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
393 as_dirname=dirname
394else
395 as_dirname=false
396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000397
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000398as_me=`$as_basename -- "$0" ||
399$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
400 X"$0" : 'X\(//\)$' \| \
401 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000402$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000423
424
Matthias Kloseb9621712010-04-24 17:59:49 +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. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430 sed -n '
431 p
432 /[$]LINENO/=
433 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000434 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000435 s/[$]LINENO.*/&-/
436 t lineno
437 b
438 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440 :loop
441 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000444 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000445 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000457case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000459 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000460 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000461 xy) ECHO_C='\c';;
462 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
463 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464 esac;;
465*)
466 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000468
Martin v. Löwis11437992002-04-12 09:54:03 +0000469rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000470if test -d conf$$.dir; then
471 rm -f conf$$.dir/conf$$.file
472else
473 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000474 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000475fi
Matthias Kloseb9621712010-04-24 17:59:49 +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 Kloseb9621712010-04-24 17:59:49 +0000489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000490else
491 as_ln_s='cp -p'
492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +0000514 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000515 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000516 case $1 in #(
517 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000519 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +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.
Benjamin Peterson316e02b2011-05-10 15:01:56 -0500537# hostname on some systems (SVR3.2, 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
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000545ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000546ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +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'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000556PACKAGE_VERSION='3.3'
557PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000558PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +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>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000565#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# include <sys/types.h>
567#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000569# include <sys/stat.h>
570#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000571#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000572# include <stdlib.h>
573# include <stddef.h>
574#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <stdlib.h>
577# endif
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000585#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000586# include <strings.h>
587#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000588#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000590#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +0000598ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000599SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000600THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000601SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000602LIBC
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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000634ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000635LN
636INSTALL_DATA
637INSTALL_SCRIPT
638INSTALL_PROGRAM
Georg Brandl1ca2e792011-03-05 20:51:24 +0100639HAS_HG
640HGBRANCH
641HGTAG
642HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000643ARFLAGS
644AR
645RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000646USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000647GNULD
648LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000649LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000650RUNSHARED
651INSTSONAME
652LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000653PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000654BLDLIBRARY
655DLLLIBRARY
656LDLIBRARY
657LIBRARY
658BUILDEXEEXT
659EGREP
660GREP
661CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200662NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000663MAINCC
664CXX
665OBJEXT
666EXEEXT
667ac_ct_CC
668CPPFLAGS
669LDFLAGS
670CFLAGS
671CC
672EXPORT_MACOSX_DEPLOYMENT_TARGET
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674SGI_ABI
675MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000676FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000677FRAMEWORKUNIXTOOLSPREFIX
678FRAMEWORKALTINSTALLLAST
679FRAMEWORKALTINSTALLFIRST
680FRAMEWORKINSTALLLAST
681FRAMEWORKINSTALLFIRST
682PYTHONFRAMEWORKINSTALLDIR
683PYTHONFRAMEWORKPREFIX
684PYTHONFRAMEWORKDIR
685PYTHONFRAMEWORKIDENTIFIER
686PYTHONFRAMEWORK
687LIPO_32BIT_FLAGS
688ARCH_RUN_32BIT
689UNIVERSALSDK
690CONFIG_ARGS
691SOVERSION
692VERSION
693target_alias
694host_alias
695build_alias
696LIBS
697ECHO_T
698ECHO_N
699ECHO_C
700DEFS
701mandir
702localedir
703libdir
704psdir
705pdfdir
706dvidir
707htmldir
708infodir
709docdir
710oldincludedir
711includedir
712localstatedir
713sharedstatedir
714sysconfdir
715datadir
716datarootdir
717libexecdir
718sbindir
719bindir
720program_transform_name
721prefix
722exec_prefix
723PACKAGE_URL
724PACKAGE_BUGREPORT
725PACKAGE_STRING
726PACKAGE_VERSION
727PACKAGE_TARNAME
728PACKAGE_NAME
729PATH_SEPARATOR
730SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000731ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000732ac_user_opts='
733enable_option_checking
734enable_universalsdk
735with_universal_archs
736with_framework_name
737enable_framework
738with_gcc
739with_cxx_main
740with_suffix
741enable_shared
742enable_profiling
743with_pydebug
744with_libs
745with_system_expat
746with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000747enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000748with_dbmliborder
749with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000750with_threads
751with_thread
752enable_ipv6
753with_doc_strings
754with_tsc
755with_pymalloc
756with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000757with_fpectl
758with_libm
759with_libc
760enable_big_digits
761with_wide_unicode
762with_computed_gotos
763'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000764 ac_precious_vars='build_alias
765host_alias
766target_alias
767CC
768CFLAGS
769LDFLAGS
770LIBS
771CPPFLAGS
Ross Lagerwall7807c352011-03-17 20:20:30 +0200772CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000773
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 Kloseb9621712010-04-24 17:59:49 +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.
Thomas Wouters47b49bf2007-08-30 22:15:33 +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'
Thomas Wouters47b49bf2007-08-30 22:15:33 +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'
Thomas Wouters47b49bf2007-08-30 22:15:33 +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=
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834 case $ac_option in
Benjamin Peterson316e02b2011-05-10 15:01:56 -0500835 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
836 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839 # Accept the important Cygnus configure options, so we can diagnose typos.
840
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841 case $ac_dashdash$ac_option in
842 --)
843 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845 -bindir | --bindir | --bindi | --bind | --bin | --bi)
846 ac_prev=bindir ;;
847 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000849
850 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000852 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855 -cache-file | --cache-file | --cache-fil | --cache-fi \
856 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
857 ac_prev=cache_file ;;
858 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
859 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000860 cache_file=$ac_optarg ;;
861
862 --config-cache | -C)
863 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000865 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000866 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000868 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000869
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000870 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
871 | --dataroo | --dataro | --datar)
872 ac_prev=datarootdir ;;
873 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
874 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
875 datarootdir=$ac_optarg ;;
876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000878 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000880 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -0500881 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000882 ac_useropt_orig=$ac_useropt
883 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
884 case $ac_user_opts in
885 *"
886"enable_$ac_useropt"
887"*) ;;
888 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
889 ac_unrecognized_sep=', ';;
890 esac
891 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892
893 -docdir | --docdir | --docdi | --doc | --do)
894 ac_prev=docdir ;;
895 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
896 docdir=$ac_optarg ;;
897
898 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
899 ac_prev=dvidir ;;
900 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
901 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
903 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000904 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000905 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000906 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -0500907 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000908 ac_useropt_orig=$ac_useropt
909 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
910 case $ac_user_opts in
911 *"
912"enable_$ac_useropt"
913"*) ;;
914 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
915 ac_unrecognized_sep=', ';;
916 esac
917 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
920 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
921 | --exec | --exe | --ex)
922 ac_prev=exec_prefix ;;
923 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
924 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
925 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
928 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 # Obsolete; use --with-gas.
930 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 -help | --help | --hel | --he | -h)
933 ac_init_help=long ;;
934 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
935 ac_init_help=recursive ;;
936 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
937 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938
939 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000944 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
945 ac_prev=htmldir ;;
946 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
947 | --ht=*)
948 htmldir=$ac_optarg ;;
949
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950 -includedir | --includedir | --includedi | --included | --include \
951 | --includ | --inclu | --incl | --inc)
952 ac_prev=includedir ;;
953 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
954 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956
957 -infodir | --infodir | --infodi | --infod | --info | --inf)
958 ac_prev=infodir ;;
959 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961
962 -libdir | --libdir | --libdi | --libd)
963 ac_prev=libdir ;;
964 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
967 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
968 | --libexe | --libex | --libe)
969 ac_prev=libexecdir ;;
970 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
971 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000973
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974 -localedir | --localedir | --localedi | --localed | --locale)
975 ac_prev=localedir ;;
976 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
977 localedir=$ac_optarg ;;
978
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000979 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981 ac_prev=localstatedir ;;
982 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000983 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000985
986 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
987 ac_prev=mandir ;;
988 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000990
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992 # Obsolete; use --without-fp.
993 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
995 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000996 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997 no_create=yes ;;
998
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000999 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1000 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1001 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001003 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1004 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1005 | --oldin | --oldi | --old | --ol | --o)
1006 ac_prev=oldincludedir ;;
1007 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1008 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1009 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1013 ac_prev=prefix ;;
1014 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1018 | --program-pre | --program-pr | --program-p)
1019 ac_prev=program_prefix ;;
1020 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1021 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
1024 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1025 | --program-suf | --program-su | --program-s)
1026 ac_prev=program_suffix ;;
1027 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1028 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
1031 -program-transform-name | --program-transform-name \
1032 | --program-transform-nam | --program-transform-na \
1033 | --program-transform-n | --program-transform- \
1034 | --program-transform | --program-transfor \
1035 | --program-transfo | --program-transf \
1036 | --program-trans | --program-tran \
1037 | --progr-tra | --program-tr | --program-t)
1038 ac_prev=program_transform_name ;;
1039 -program-transform-name=* | --program-transform-name=* \
1040 | --program-transform-nam=* | --program-transform-na=* \
1041 | --program-transform-n=* | --program-transform-=* \
1042 | --program-transform=* | --program-transfor=* \
1043 | --program-transfo=* | --program-transf=* \
1044 | --program-trans=* | --program-tran=* \
1045 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001048 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1049 ac_prev=pdfdir ;;
1050 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1051 pdfdir=$ac_optarg ;;
1052
1053 -psdir | --psdir | --psdi | --psd | --ps)
1054 ac_prev=psdir ;;
1055 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1056 psdir=$ac_optarg ;;
1057
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1059 | -silent | --silent | --silen | --sile | --sil)
1060 silent=yes ;;
1061
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1063 ac_prev=sbindir ;;
1064 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1065 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067
1068 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1069 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1070 | --sharedst | --shareds | --shared | --share | --shar \
1071 | --sha | --sh)
1072 ac_prev=sharedstatedir ;;
1073 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1074 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1075 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1076 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 -site | --site | --sit)
1080 ac_prev=site ;;
1081 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1085 ac_prev=srcdir ;;
1086 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001089 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1090 | --syscon | --sysco | --sysc | --sys | --sy)
1091 ac_prev=sysconfdir ;;
1092 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1093 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001095
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1102 verbose=yes ;;
1103
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 -version | --version | --versio | --versi | --vers | -V)
1105 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001108 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001109 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001110 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001111 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001112 ac_useropt_orig=$ac_useropt
1113 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1114 case $ac_user_opts in
1115 *"
1116"with_$ac_useropt"
1117"*) ;;
1118 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1119 ac_unrecognized_sep=', ';;
1120 esac
1121 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122
1123 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001124 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001126 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001127 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001128 ac_useropt_orig=$ac_useropt
1129 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1130 case $ac_user_opts in
1131 *"
1132"with_$ac_useropt"
1133"*) ;;
1134 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1135 ac_unrecognized_sep=', ';;
1136 esac
1137 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139 --x)
1140 # Obsolete; use --with-x.
1141 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142
1143 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1144 | --x-incl | --x-inc | --x-in | --x-i)
1145 ac_prev=x_includes ;;
1146 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1147 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
1150 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1151 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1152 ac_prev=x_libraries ;;
1153 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1154 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001157 -*) as_fn_error "unrecognized option: \`$ac_option'
1158Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159 ;;
1160
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 *=*)
1162 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1163 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001164 case $ac_envvar in #(
1165 '' | [0-9]* | *[!_$as_cr_alnum]* )
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001166 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001167 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001168 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 export $ac_envvar ;;
1170
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001171 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001176 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177 ;;
1178
1179 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001180done
1181
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001184 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185fi
1186
Matthias Kloseb9621712010-04-24 17:59:49 +00001187if test -n "$ac_unrecognized_opts"; then
1188 case $enable_option_checking in
1189 no) ;;
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001190 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001191 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1192 esac
1193fi
1194
1195# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001196for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1197 datadir sysconfdir sharedstatedir localstatedir includedir \
1198 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1199 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001201 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 # Remove trailing slashes.
1203 case $ac_val in
1204 */ )
1205 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1206 eval $ac_var=\$ac_val;;
1207 esac
1208 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001209 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001210 [\\/$]* | ?:[\\/]* ) continue;;
1211 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212 esac
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001213 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001214done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215
Martin v. Löwis11437992002-04-12 09:54:03 +00001216# There might be people who depend on the old broken behavior: `$host'
1217# used to hold the argument of --host etc.
1218# FIXME: To remove some day.
1219build=$build_alias
1220host=$host_alias
1221target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001222
Martin v. Löwis11437992002-04-12 09:54:03 +00001223# FIXME: To remove some day.
1224if test "x$host_alias" != x; then
1225 if test "x$build_alias" = x; then
1226 cross_compiling=maybe
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001227 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1228 If a cross compiler is detected then cross compile mode will be used." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 elif test "x$build_alias" != "x$host_alias"; then
1230 cross_compiling=yes
1231 fi
1232fi
1233
1234ac_tool_prefix=
1235test -n "$host_alias" && ac_tool_prefix=$host_alias-
1236
1237test "$silent" = yes && exec 6>/dev/null
1238
Guido van Rossum627b2d71993-12-24 10:39:16 +00001239
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001240ac_pwd=`pwd` && test -n "$ac_pwd" &&
1241ac_ls_di=`ls -di .` &&
1242ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001243 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001244test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001245 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246
1247
Guido van Rossum627b2d71993-12-24 10:39:16 +00001248# Find the source files, if location was not specified.
1249if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001251 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 ac_confdir=`$as_dirname -- "$as_myself" ||
1253$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1254 X"$as_myself" : 'X\(//\)[^/]' \| \
1255 X"$as_myself" : 'X\(//\)$' \| \
1256 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1257$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001258 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1259 s//\1/
1260 q
1261 }
1262 /^X\(\/\/\)[^/].*/{
1263 s//\1/
1264 q
1265 }
1266 /^X\(\/\/\)$/{
1267 s//\1/
1268 q
1269 }
1270 /^X\(\/\).*/{
1271 s//\1/
1272 q
1273 }
1274 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001276 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277 srcdir=..
1278 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001279else
1280 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282if test ! -r "$srcdir/$ac_unique_file"; then
1283 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001284 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1287ac_abs_confdir=`(
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001288 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289 pwd)`
1290# When building in place, set srcdir=.
1291if test "$ac_abs_confdir" = "$ac_pwd"; then
1292 srcdir=.
1293fi
1294# Remove unnecessary trailing slashes from srcdir.
1295# Double slashes in file names in object file debugging info
1296# mess up M-x gdb in Emacs.
1297case $srcdir in
1298*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1299esac
1300for ac_var in $ac_precious_vars; do
1301 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1302 eval ac_env_${ac_var}_value=\$${ac_var}
1303 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1304 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1305done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001306
Martin v. Löwis11437992002-04-12 09:54:03 +00001307#
1308# Report the --help message.
1309#
1310if test "$ac_init_help" = "long"; then
1311 # Omit some internal or obsolete options to make the list less imposing.
1312 # This message is too long to be a string in the A/UX 3.1 sh.
1313 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001314\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001315
1316Usage: $0 [OPTION]... [VAR=VALUE]...
1317
1318To assign environment variables (e.g., CC, CFLAGS...), specify them as
1319VAR=VALUE. See below for descriptions of some of the useful variables.
1320
1321Defaults for the options are specified in brackets.
1322
1323Configuration:
1324 -h, --help display this help and exit
1325 --help=short display options specific to this package
1326 --help=recursive display the short help of all the included packages
1327 -V, --version display version information and exit
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001328 -q, --quiet, --silent do not print \`checking...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001329 --cache-file=FILE cache test results in FILE [disabled]
1330 -C, --config-cache alias for \`--cache-file=config.cache'
1331 -n, --no-create do not create output files
1332 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1333
Martin v. Löwis11437992002-04-12 09:54:03 +00001334Installation directories:
1335 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001336 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001337 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001338 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001339
1340By default, \`make install' will install all the files in
1341\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1342an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1343for instance \`--prefix=\$HOME'.
1344
1345For better control, use the options below.
1346
1347Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001348 --bindir=DIR user executables [EPREFIX/bin]
1349 --sbindir=DIR system admin executables [EPREFIX/sbin]
1350 --libexecdir=DIR program executables [EPREFIX/libexec]
1351 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1352 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1353 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1354 --libdir=DIR object code libraries [EPREFIX/lib]
1355 --includedir=DIR C header files [PREFIX/include]
1356 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1357 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1358 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1359 --infodir=DIR info documentation [DATAROOTDIR/info]
1360 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1361 --mandir=DIR man documentation [DATAROOTDIR/man]
1362 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1363 --htmldir=DIR html documentation [DOCDIR]
1364 --dvidir=DIR dvi documentation [DOCDIR]
1365 --pdfdir=DIR pdf documentation [DOCDIR]
1366 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001367_ACEOF
1368
1369 cat <<\_ACEOF
1370_ACEOF
1371fi
1372
1373if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001374 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001375 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001376 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 cat <<\_ACEOF
1378
1379Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001380 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001381 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1382 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001383 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001384 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001385 --enable-framework[=INSTALLDIR]
1386 Build (MacOSX|Darwin) framework
1387 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001388 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001389 --enable-loadable-sqlite-extensions
1390 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001391 --enable-ipv6 Enable ipv6 (with ipv4) support
1392 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001393 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001394 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001395
1396Optional Packages:
1397 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1398 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001399 --with-universal-archs=ARCH
1400 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001401 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001402 --with-framework-name=FRAMEWORK
1403 specify an alternate name of the framework built
1404 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001405 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001406 --with-cxx-main=<compiler>
1407 compile main() and link python executable with C++
1408 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001409 --with-suffix=.exe set executable suffix
1410 --with-pydebug build with Py_DEBUG defined
1411 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001412 --with-system-expat build pyexpat module using an installed expat
1413 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001414 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001415 --with-dbmliborder=db1:db2:...
1416 order to check db backends for dbm. Valid value is a
1417 colon separated string with the backend names
1418 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with(out)-threads[=DIRECTORY]
1421 disable/enable thread support
1422 --with(out)-thread[=DIRECTORY]
1423 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001424 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001425 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001426 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001427 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --with-fpectl enable SIGFPE catching
1429 --with-libm=STRING math library
1430 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001431 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001432 --with(out)-computed-gotos
1433 Use computed gotos in evaluation loop (enabled by
1434 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001435
1436Some influential environment variables:
1437 CC C compiler command
1438 CFLAGS C compiler flags
1439 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1440 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001441 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001444 CPP C preprocessor
1445
1446Use these variables to override the choices made by `configure' or to help
1447it to find libraries and programs with nonstandard names/locations.
1448
Georg Brandle2e15612009-05-20 18:25:10 +00001449Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001450_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001452fi
1453
1454if test "$ac_init_help" = "recursive"; then
1455 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001456 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001457 test -d "$ac_dir" ||
1458 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1459 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001460 ac_builddir=.
1461
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001462case "$ac_dir" in
1463.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1464*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001465 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001466 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001467 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001468 case $ac_top_builddir_sub in
1469 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1470 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1471 esac ;;
1472esac
1473ac_abs_top_builddir=$ac_pwd
1474ac_abs_builddir=$ac_pwd$ac_dir_suffix
1475# for backward compatibility:
1476ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001477
1478case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001481 ac_top_srcdir=$ac_top_builddir_sub
1482 ac_abs_top_srcdir=$ac_pwd ;;
1483 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001484 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485 ac_top_srcdir=$srcdir
1486 ac_abs_top_srcdir=$srcdir ;;
1487 *) # Relative name.
1488 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1489 ac_top_srcdir=$ac_top_build_prefix$srcdir
1490 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001491esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494 cd "$ac_dir" || { ac_status=$?; continue; }
1495 # Check for guested configure.
1496 if test -f "$ac_srcdir/configure.gnu"; then
1497 echo &&
1498 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1499 elif test -f "$ac_srcdir/configure"; then
1500 echo &&
1501 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001502 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001503 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 fi || ac_status=$?
1505 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001506 done
1507fi
1508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001509test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001510if $ac_init_version; then
1511 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001512python configure 3.3
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001513generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001514
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001515Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516This configure script is free software; the Free Software Foundation
1517gives unlimited permission to copy, distribute and modify it.
1518_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001520fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001521
1522## ------------------------ ##
1523## Autoconf initialization. ##
1524## ------------------------ ##
1525
1526# ac_fn_c_try_compile LINENO
1527# --------------------------
1528# Try to compile conftest.$ac_ext, and return whether this succeeded.
1529ac_fn_c_try_compile ()
1530{
1531 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1532 rm -f conftest.$ac_objext
1533 if { { ac_try="$ac_compile"
1534case "(($ac_try" in
1535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1536 *) ac_try_echo=$ac_try;;
1537esac
1538eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1539$as_echo "$ac_try_echo"; } >&5
1540 (eval "$ac_compile") 2>conftest.err
1541 ac_status=$?
1542 if test -s conftest.err; then
1543 grep -v '^ *+' conftest.err >conftest.er1
1544 cat conftest.er1 >&5
1545 mv -f conftest.er1 conftest.err
1546 fi
1547 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1548 test $ac_status = 0; } && {
1549 test -z "$ac_c_werror_flag" ||
1550 test ! -s conftest.err
1551 } && test -s conftest.$ac_objext; then :
1552 ac_retval=0
1553else
1554 $as_echo "$as_me: failed program was:" >&5
1555sed 's/^/| /' conftest.$ac_ext >&5
1556
1557 ac_retval=1
1558fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001559 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001560 as_fn_set_status $ac_retval
1561
1562} # ac_fn_c_try_compile
1563
Matthias Kloseb9621712010-04-24 17:59:49 +00001564# ac_fn_c_try_link LINENO
1565# -----------------------
1566# Try to link conftest.$ac_ext, and return whether this succeeded.
1567ac_fn_c_try_link ()
1568{
1569 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1570 rm -f conftest.$ac_objext conftest$ac_exeext
1571 if { { ac_try="$ac_link"
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_link") 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
1586 test $ac_status = 0; } && {
1587 test -z "$ac_c_werror_flag" ||
1588 test ! -s conftest.err
1589 } && test -s conftest$ac_exeext && {
1590 test "$cross_compiling" = yes ||
1591 $as_test_x conftest$ac_exeext
1592 }; then :
1593 ac_retval=0
1594else
1595 $as_echo "$as_me: failed program was:" >&5
1596sed 's/^/| /' conftest.$ac_ext >&5
1597
1598 ac_retval=1
1599fi
1600 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1601 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1602 # interfere with the next link command; also delete a directory that is
1603 # left behind by Apple's compiler. We do this before executing the actions.
1604 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001605 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001606 as_fn_set_status $ac_retval
1607
1608} # ac_fn_c_try_link
1609
Matthias Kloseb9621712010-04-24 17:59:49 +00001610# ac_fn_c_try_cpp LINENO
1611# ----------------------
1612# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1613ac_fn_c_try_cpp ()
1614{
1615 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1616 if { { ac_try="$ac_cpp conftest.$ac_ext"
1617case "(($ac_try" in
1618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1619 *) ac_try_echo=$ac_try;;
1620esac
1621eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1622$as_echo "$ac_try_echo"; } >&5
1623 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1624 ac_status=$?
1625 if test -s conftest.err; then
1626 grep -v '^ *+' conftest.err >conftest.er1
1627 cat conftest.er1 >&5
1628 mv -f conftest.er1 conftest.err
1629 fi
1630 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001631 test $ac_status = 0; } >/dev/null && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001632 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1633 test ! -s conftest.err
1634 }; then :
1635 ac_retval=0
1636else
1637 $as_echo "$as_me: failed program was:" >&5
1638sed 's/^/| /' conftest.$ac_ext >&5
1639
1640 ac_retval=1
1641fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001642 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001643 as_fn_set_status $ac_retval
1644
1645} # ac_fn_c_try_cpp
1646
1647# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1648# -------------------------------------------------------
1649# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1650# the include files in INCLUDES and setting the cache variable VAR
1651# accordingly.
1652ac_fn_c_check_header_mongrel ()
1653{
1654 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001655 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1657$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001658if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001659 $as_echo_n "(cached) " >&6
1660fi
1661eval ac_res=\$$3
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1663$as_echo "$ac_res" >&6; }
1664else
1665 # Is the header compilable?
1666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1667$as_echo_n "checking $2 usability... " >&6; }
1668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1669/* end confdefs.h. */
1670$4
1671#include <$2>
1672_ACEOF
1673if ac_fn_c_try_compile "$LINENO"; then :
1674 ac_header_compiler=yes
1675else
1676 ac_header_compiler=no
1677fi
1678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1680$as_echo "$ac_header_compiler" >&6; }
1681
1682# Is the header present?
1683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1684$as_echo_n "checking $2 presence... " >&6; }
1685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1686/* end confdefs.h. */
1687#include <$2>
1688_ACEOF
1689if ac_fn_c_try_cpp "$LINENO"; then :
1690 ac_header_preproc=yes
1691else
1692 ac_header_preproc=no
1693fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001694rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1696$as_echo "$ac_header_preproc" >&6; }
1697
1698# So? What about this header?
1699case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1700 yes:no: )
1701 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1702$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1704$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1705 ;;
1706 no:yes:* )
1707 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1708$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1710$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1712$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1714$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1716$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001717( cat <<\_ASBOX
1718## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001719## Report this to http://bugs.python.org/ ##
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001720## -------------------------------------- ##
1721_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +00001722 ) | sed "s/^/$as_me: WARNING: /" >&2
1723 ;;
1724esac
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1726$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001727if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001728 $as_echo_n "(cached) " >&6
1729else
1730 eval "$3=\$ac_header_compiler"
1731fi
1732eval ac_res=\$$3
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1734$as_echo "$ac_res" >&6; }
1735fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001736 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001737
1738} # ac_fn_c_check_header_mongrel
1739
1740# ac_fn_c_try_run LINENO
1741# ----------------------
1742# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1743# that executables *can* be run.
1744ac_fn_c_try_run ()
1745{
1746 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1747 if { { ac_try="$ac_link"
1748case "(($ac_try" in
1749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1750 *) ac_try_echo=$ac_try;;
1751esac
1752eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1753$as_echo "$ac_try_echo"; } >&5
1754 (eval "$ac_link") 2>&5
1755 ac_status=$?
1756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1757 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1758 { { case "(($ac_try" in
1759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1760 *) ac_try_echo=$ac_try;;
1761esac
1762eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1763$as_echo "$ac_try_echo"; } >&5
1764 (eval "$ac_try") 2>&5
1765 ac_status=$?
1766 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1767 test $ac_status = 0; }; }; then :
1768 ac_retval=0
1769else
1770 $as_echo "$as_me: program exited with status $ac_status" >&5
1771 $as_echo "$as_me: failed program was:" >&5
1772sed 's/^/| /' conftest.$ac_ext >&5
1773
1774 ac_retval=$ac_status
1775fi
1776 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001777 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 as_fn_set_status $ac_retval
1779
1780} # ac_fn_c_try_run
1781
1782# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1783# -------------------------------------------------------
1784# Tests whether HEADER exists and can be compiled using the include files in
1785# INCLUDES, setting the cache variable VAR accordingly.
1786ac_fn_c_check_header_compile ()
1787{
1788 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1790$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001791if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001792 $as_echo_n "(cached) " >&6
1793else
1794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1795/* end confdefs.h. */
1796$4
1797#include <$2>
1798_ACEOF
1799if ac_fn_c_try_compile "$LINENO"; then :
1800 eval "$3=yes"
1801else
1802 eval "$3=no"
1803fi
1804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1805fi
1806eval ac_res=\$$3
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1808$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001809 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001810
1811} # ac_fn_c_check_header_compile
1812
Matthias Kloseb9621712010-04-24 17:59:49 +00001813# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1814# -------------------------------------------
1815# Tests whether TYPE exists after having included INCLUDES, setting cache
1816# variable VAR accordingly.
1817ac_fn_c_check_type ()
1818{
1819 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1821$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001822if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001823 $as_echo_n "(cached) " >&6
1824else
1825 eval "$3=no"
1826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1827/* end confdefs.h. */
1828$4
1829int
1830main ()
1831{
1832if (sizeof ($2))
1833 return 0;
1834 ;
1835 return 0;
1836}
1837_ACEOF
1838if ac_fn_c_try_compile "$LINENO"; then :
1839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1840/* end confdefs.h. */
1841$4
1842int
1843main ()
1844{
1845if (sizeof (($2)))
1846 return 0;
1847 ;
1848 return 0;
1849}
1850_ACEOF
1851if ac_fn_c_try_compile "$LINENO"; then :
1852
1853else
1854 eval "$3=yes"
1855fi
1856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1857fi
1858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1859fi
1860eval ac_res=\$$3
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1862$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001863 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001864
1865} # ac_fn_c_check_type
1866
1867# ac_fn_c_find_uintX_t LINENO BITS VAR
1868# ------------------------------------
1869# Finds an unsigned integer type with width BITS, setting cache variable VAR
1870# accordingly.
1871ac_fn_c_find_uintX_t ()
1872{
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1875$as_echo_n "checking for uint$2_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001876if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001877 $as_echo_n "(cached) " >&6
1878else
1879 eval "$3=no"
1880 # Order is important - never check a type that is potentially smaller
1881 # than half of the expected target width.
1882 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1883 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1885/* end confdefs.h. */
1886$ac_includes_default
1887int
1888main ()
1889{
1890static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1891test_array [0] = 0
1892
1893 ;
1894 return 0;
1895}
1896_ACEOF
1897if ac_fn_c_try_compile "$LINENO"; then :
1898 case $ac_type in #(
1899 uint$2_t) :
1900 eval "$3=yes" ;; #(
1901 *) :
1902 eval "$3=\$ac_type" ;;
1903esac
1904fi
1905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001906 eval as_val=\$$3
1907 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001908
1909else
1910 break
1911fi
1912 done
1913fi
1914eval ac_res=\$$3
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1916$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001917 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001918
1919} # ac_fn_c_find_uintX_t
1920
1921# ac_fn_c_find_intX_t LINENO BITS VAR
1922# -----------------------------------
1923# Finds a signed integer type with width BITS, setting cache variable VAR
1924# accordingly.
1925ac_fn_c_find_intX_t ()
1926{
1927 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1929$as_echo_n "checking for int$2_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001930if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001931 $as_echo_n "(cached) " >&6
1932else
1933 eval "$3=no"
1934 # Order is important - never check a type that is potentially smaller
1935 # than half of the expected target width.
1936 for ac_type in int$2_t 'int' 'long int' \
1937 'long long int' 'short int' 'signed char'; do
1938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1939/* end confdefs.h. */
1940$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001941 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001942int
1943main ()
1944{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001945static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001946test_array [0] = 0
1947
1948 ;
1949 return 0;
1950}
1951_ACEOF
1952if ac_fn_c_try_compile "$LINENO"; then :
1953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1954/* end confdefs.h. */
1955$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001956 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001957int
1958main ()
1959{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001960static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001961 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1962test_array [0] = 0
1963
1964 ;
1965 return 0;
1966}
1967_ACEOF
1968if ac_fn_c_try_compile "$LINENO"; then :
1969
1970else
1971 case $ac_type in #(
1972 int$2_t) :
1973 eval "$3=yes" ;; #(
1974 *) :
1975 eval "$3=\$ac_type" ;;
1976esac
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979fi
1980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001981 eval as_val=\$$3
1982 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001983
1984else
1985 break
1986fi
1987 done
1988fi
1989eval ac_res=\$$3
1990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1991$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001992 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001993
1994} # ac_fn_c_find_intX_t
1995
1996# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1997# --------------------------------------------
1998# Tries to find the compile-time value of EXPR in a program that includes
1999# INCLUDES, setting VAR accordingly. Returns whether the value could be
2000# computed
2001ac_fn_c_compute_int ()
2002{
2003 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2004 if test "$cross_compiling" = yes; then
2005 # Depending upon the size, compute the lo and hi bounds.
2006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2007/* end confdefs.h. */
2008$4
2009int
2010main ()
2011{
2012static int test_array [1 - 2 * !(($2) >= 0)];
2013test_array [0] = 0
2014
2015 ;
2016 return 0;
2017}
2018_ACEOF
2019if ac_fn_c_try_compile "$LINENO"; then :
2020 ac_lo=0 ac_mid=0
2021 while :; do
2022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2023/* end confdefs.h. */
2024$4
2025int
2026main ()
2027{
2028static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2029test_array [0] = 0
2030
2031 ;
2032 return 0;
2033}
2034_ACEOF
2035if ac_fn_c_try_compile "$LINENO"; then :
2036 ac_hi=$ac_mid; break
2037else
2038 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2039 if test $ac_lo -le $ac_mid; then
2040 ac_lo= ac_hi=
2041 break
2042 fi
2043 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2044fi
2045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2046 done
2047else
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$4
2051int
2052main ()
2053{
2054static int test_array [1 - 2 * !(($2) < 0)];
2055test_array [0] = 0
2056
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_compile "$LINENO"; then :
2062 ac_hi=-1 ac_mid=-1
2063 while :; do
2064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2065/* end confdefs.h. */
2066$4
2067int
2068main ()
2069{
2070static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2071test_array [0] = 0
2072
2073 ;
2074 return 0;
2075}
2076_ACEOF
2077if ac_fn_c_try_compile "$LINENO"; then :
2078 ac_lo=$ac_mid; break
2079else
2080 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2081 if test $ac_mid -le $ac_hi; then
2082 ac_lo= ac_hi=
2083 break
2084 fi
2085 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088 done
2089else
2090 ac_lo= ac_hi=
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095# Binary search between lo and hi bounds.
2096while test "x$ac_lo" != "x$ac_hi"; do
2097 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099/* end confdefs.h. */
2100$4
2101int
2102main ()
2103{
2104static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2105test_array [0] = 0
2106
2107 ;
2108 return 0;
2109}
2110_ACEOF
2111if ac_fn_c_try_compile "$LINENO"; then :
2112 ac_hi=$ac_mid
2113else
2114 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2115fi
2116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2117done
2118case $ac_lo in #((
2119?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2120'') ac_retval=1 ;;
2121esac
2122 else
2123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124/* end confdefs.h. */
2125$4
2126static long int longval () { return $2; }
2127static unsigned long int ulongval () { return $2; }
2128#include <stdio.h>
2129#include <stdlib.h>
2130int
2131main ()
2132{
2133
2134 FILE *f = fopen ("conftest.val", "w");
2135 if (! f)
2136 return 1;
2137 if (($2) < 0)
2138 {
2139 long int i = longval ();
2140 if (i != ($2))
2141 return 1;
2142 fprintf (f, "%ld", i);
2143 }
2144 else
2145 {
2146 unsigned long int i = ulongval ();
2147 if (i != ($2))
2148 return 1;
2149 fprintf (f, "%lu", i);
2150 }
2151 /* Do not output a trailing newline, as this causes \r\n confusion
2152 on some platforms. */
2153 return ferror (f) || fclose (f) != 0;
2154
2155 ;
2156 return 0;
2157}
2158_ACEOF
2159if ac_fn_c_try_run "$LINENO"; then :
2160 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2161else
2162 ac_retval=1
2163fi
2164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2165 conftest.$ac_objext conftest.beam conftest.$ac_ext
2166rm -f conftest.val
2167
2168 fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002169 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002170 as_fn_set_status $ac_retval
2171
2172} # ac_fn_c_compute_int
2173
2174# ac_fn_c_check_func LINENO FUNC VAR
2175# ----------------------------------
2176# Tests whether FUNC exists, setting the cache variable VAR accordingly
2177ac_fn_c_check_func ()
2178{
2179 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2181$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002182if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002183 $as_echo_n "(cached) " >&6
2184else
2185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2186/* end confdefs.h. */
2187/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2188 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2189#define $2 innocuous_$2
2190
2191/* System header to define __stub macros and hopefully few prototypes,
2192 which can conflict with char $2 (); below.
2193 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2194 <limits.h> exists even on freestanding compilers. */
2195
2196#ifdef __STDC__
2197# include <limits.h>
2198#else
2199# include <assert.h>
2200#endif
2201
2202#undef $2
2203
2204/* Override any GCC internal prototype to avoid an error.
2205 Use char because int might match the return type of a GCC
2206 builtin and then its argument prototype would still apply. */
2207#ifdef __cplusplus
2208extern "C"
2209#endif
2210char $2 ();
2211/* The GNU C library defines this for functions which it implements
2212 to always fail with ENOSYS. Some functions are actually named
2213 something starting with __ and the normal name is an alias. */
2214#if defined __stub_$2 || defined __stub___$2
2215choke me
2216#endif
2217
2218int
2219main ()
2220{
2221return $2 ();
2222 ;
2223 return 0;
2224}
2225_ACEOF
2226if ac_fn_c_try_link "$LINENO"; then :
2227 eval "$3=yes"
2228else
2229 eval "$3=no"
2230fi
2231rm -f core conftest.err conftest.$ac_objext \
2232 conftest$ac_exeext conftest.$ac_ext
2233fi
2234eval ac_res=\$$3
2235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2236$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002237 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002238
2239} # ac_fn_c_check_func
2240
2241# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2242# ----------------------------------------------------
2243# Tries to find if the field MEMBER exists in type AGGR, after including
2244# INCLUDES, setting cache variable VAR accordingly.
2245ac_fn_c_check_member ()
2246{
2247 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2249$as_echo_n "checking for $2.$3... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002250if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002251 $as_echo_n "(cached) " >&6
2252else
2253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2254/* end confdefs.h. */
2255$5
2256int
2257main ()
2258{
2259static $2 ac_aggr;
2260if (ac_aggr.$3)
2261return 0;
2262 ;
2263 return 0;
2264}
2265_ACEOF
2266if ac_fn_c_try_compile "$LINENO"; then :
2267 eval "$4=yes"
2268else
2269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2270/* end confdefs.h. */
2271$5
2272int
2273main ()
2274{
2275static $2 ac_aggr;
2276if (sizeof ac_aggr.$3)
2277return 0;
2278 ;
2279 return 0;
2280}
2281_ACEOF
2282if ac_fn_c_try_compile "$LINENO"; then :
2283 eval "$4=yes"
2284else
2285 eval "$4=no"
2286fi
2287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288fi
2289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2290fi
2291eval ac_res=\$$4
2292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2293$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002294 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002295
2296} # ac_fn_c_check_member
2297
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002298# ac_fn_c_check_decl LINENO SYMBOL VAR
2299# ------------------------------------
2300# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002301ac_fn_c_check_decl ()
2302{
2303 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2305$as_echo_n "checking whether $2 is declared... " >&6; }
2306if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002307 $as_echo_n "(cached) " >&6
2308else
2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310/* end confdefs.h. */
2311$4
2312int
2313main ()
2314{
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002315#ifndef $2
2316 (void) $2;
Matthias Kloseb9621712010-04-24 17:59:49 +00002317#endif
2318
2319 ;
2320 return 0;
2321}
2322_ACEOF
2323if ac_fn_c_try_compile "$LINENO"; then :
2324 eval "$3=yes"
2325else
2326 eval "$3=no"
2327fi
2328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2329fi
2330eval ac_res=\$$3
2331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2332$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002333 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002334
2335} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002337This file contains any messages produced by compilers while
2338running configure, to aid debugging if configure makes a mistake.
2339
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002340It was created by python $as_me 3.3, which was
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002341generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002342
2343 $ $0 $@
2344
2345_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002346exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002347{
2348cat <<_ASUNAME
2349## --------- ##
2350## Platform. ##
2351## --------- ##
2352
2353hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2354uname -m = `(uname -m) 2>/dev/null || echo unknown`
2355uname -r = `(uname -r) 2>/dev/null || echo unknown`
2356uname -s = `(uname -s) 2>/dev/null || echo unknown`
2357uname -v = `(uname -v) 2>/dev/null || echo unknown`
2358
2359/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2360/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2361
2362/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2363/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2364/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002365/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002366/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2367/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2368/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2369
2370_ASUNAME
2371
2372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2373for as_dir in $PATH
2374do
2375 IFS=$as_save_IFS
2376 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002377 $as_echo "PATH: $as_dir"
2378 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002380
2381} >&5
2382
2383cat >&5 <<_ACEOF
2384
2385
2386## ----------- ##
2387## Core tests. ##
2388## ----------- ##
2389
2390_ACEOF
2391
2392
2393# Keep a trace of the command line.
2394# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002395# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002396# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002397# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002398ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002399ac_configure_args0=
2400ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002401ac_must_keep_next=false
2402for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002403do
Skip Montanaro6dead952003-09-25 14:50:04 +00002404 for ac_arg
2405 do
2406 case $ac_arg in
2407 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2408 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2409 | -silent | --silent | --silen | --sile | --sil)
2410 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002411 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002412 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 esac
2414 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002419 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002421 case $ac_arg in
2422 *=* | --config-cache | -C | -disable-* | --disable-* \
2423 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2424 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2425 | -with-* | --with-* | -without-* | --without-* | --x)
2426 case "$ac_configure_args0 " in
2427 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2428 esac
2429 ;;
2430 -* ) ac_must_keep_next=true ;;
2431 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002433 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 ;;
2435 esac
2436 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002437done
Matthias Kloseb9621712010-04-24 17:59:49 +00002438{ ac_configure_args0=; unset ac_configure_args0;}
2439{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002440
2441# When interrupted or exit'd, cleanup temporary files, and complete
2442# config.log. We remove comments because anyway the quotes in there
2443# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002444# WARNING: Use '\'' to represent an apostrophe within the trap.
2445# 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 +00002446trap 'exit_status=$?
2447 # Save into config.log some information that might help in debugging.
2448 {
2449 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002450
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002451 cat <<\_ASBOX
2452## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002453## Cache variables. ##
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002454## ---------------- ##
2455_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002456 echo
2457 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458(
2459 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2460 eval ac_val=\$$ac_var
2461 case $ac_val in #(
2462 *${as_nl}*)
2463 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002464 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2465$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 esac
2467 case $ac_var in #(
2468 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002469 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2470 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 esac ;;
2472 esac
2473 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2476 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 "s/'\''/'\''\\\\'\'''\''/g;
2479 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2480 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002481 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 esac |
2485 sort
2486)
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002488
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002489 cat <<\_ASBOX
2490## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002491## Output variables. ##
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002492## ----------------- ##
2493_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 echo
2495 for ac_var in $ac_subst_vars
2496 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 eval ac_val=\$$ac_var
2498 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 esac
Matthias Kloseb9621712010-04-24 17:59:49 +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
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002506 cat <<\_ASBOX
2507## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508## File substitutions. ##
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002509## ------------------- ##
2510_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 echo
2512 for ac_var in $ac_subst_files
2513 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 eval ac_val=\$$ac_var
2515 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002518 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 done | sort
2520 echo
2521 fi
2522
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 if test -s confdefs.h; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002524 cat <<\_ASBOX
2525## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002526## confdefs.h. ##
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002527## ----------- ##
2528_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 echo
2532 fi
2533 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002534 $as_echo "$as_me: caught signal $ac_signal"
2535 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 rm -f core *.core core.conftest.* &&
2538 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002541for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002542 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002543done
2544ac_signal=0
2545
2546# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002548
Matthias Kloseb9621712010-04-24 17:59:49 +00002549$as_echo "/* confdefs.h */" > confdefs.h
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551# Predefined preprocessor variables.
2552
2553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_NAME "$PACKAGE_NAME"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_VERSION "$PACKAGE_VERSION"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_STRING "$PACKAGE_STRING"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2571_ACEOF
2572
Matthias Kloseb9621712010-04-24 17:59:49 +00002573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_URL "$PACKAGE_URL"
2575_ACEOF
2576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577
2578# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002579# Prefer an explicitly selected file to automatically selected ones.
2580ac_site_file1=NONE
2581ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582if test -n "$CONFIG_SITE"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002583 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$prefix/share/config.site
2586 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587else
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 ac_site_file1=$ac_default_prefix/share/config.site
2589 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002591for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592do
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 test "x$ac_site_file" = xNONE && continue
2594 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2595 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2596$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 sed 's/^/| /' "$ac_site_file" >&5
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002598 . "$ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599 fi
2600done
2601
2602if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 # Some versions of bash will fail to source /dev/null (special files
2604 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2605 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2607$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2610 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 esac
2612 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613else
Matthias Kloseb9621712010-04-24 17:59:49 +00002614 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2615$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 >$cache_file
2617fi
2618
2619# Check that the precious variables saved in the cache have kept the same
2620# value.
2621ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2624 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2626 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 case $ac_old_set,$ac_new_set in
2628 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2630$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 +00002631 ac_cache_corrupted=: ;;
2632 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2634$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 ac_cache_corrupted=: ;;
2636 ,);;
2637 *)
2638 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002639 # differences in whitespace do not lead to failure.
2640 ac_old_val_w=`echo x $ac_old_val`
2641 ac_new_val_w=`echo x $ac_new_val`
2642 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2644$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2645 ac_cache_corrupted=:
2646 else
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2648$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2649 eval $ac_var=\$ac_old_val
2650 fi
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2652$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2654$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 fi;;
2656 esac
2657 # Pass precious variables to config.status.
2658 if test "$ac_new_set" = set; then
2659 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002660 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 *) ac_arg=$ac_var=$ac_new_val ;;
2662 esac
2663 case " $ac_configure_args " in
2664 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 esac
2667 fi
2668done
2669if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2673$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002674 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002676## -------------------- ##
2677## Main body of script. ##
2678## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679
Guido van Rossum7f43da71994-08-01 12:15:30 +00002680ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002681ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002682ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2683ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2684ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685
Guido van Rossum627b2d71993-12-24 10:39:16 +00002686
Michael W. Hudson54241132001-12-07 15:38:26 +00002687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002688ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002689
2690
Martin v. Löwis11437992002-04-12 09:54:03 +00002691
Benjamin Petersond23f8222009-04-05 19:13:16 +00002692if test "$prefix" != "/"; then
2693 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2694fi
2695
2696
Martin v. Löwis11437992002-04-12 09:54:03 +00002697
2698
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002699# We don't use PACKAGE_ variables, and they cause conflicts
2700# with other autoconf-based packages that include Python.h
2701grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2702rm confdefs.h
2703mv confdefs.h.new confdefs.h
2704
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002705
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002706VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002707
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002708# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002709
2710SOVERSION=1.0
2711
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002712# The later defininition of _XOPEN_SOURCE disables certain features
2713# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2714
Matthias Kloseb9621712010-04-24 17:59:49 +00002715$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002716
2717
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002718# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2719# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2720# them.
2721
Matthias Kloseb9621712010-04-24 17:59:49 +00002722$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002723
2724
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002725# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2726# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2727# them.
2728
Matthias Kloseb9621712010-04-24 17:59:49 +00002729$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002730
2731
Martin v. Löwisd6320502004-08-12 13:45:08 +00002732# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2733# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2734
Matthias Kloseb9621712010-04-24 17:59:49 +00002735$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002736
2737
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002738# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2739# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2740# them.
2741
Matthias Kloseb9621712010-04-24 17:59:49 +00002742$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002743
2744
2745
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002746define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002747
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002748# Arguments passed to configure.
2749
2750CONFIG_ARGS="$ac_configure_args"
2751
Matthias Kloseb9621712010-04-24 17:59:49 +00002752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2753$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002754# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002755if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002756 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002757 case $enableval in
2758 yes)
2759 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002760 if test ! -d "${enableval}"
2761 then
2762 enableval=/
2763 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002764 ;;
2765 esac
2766 case $enableval in
2767 no)
2768 UNIVERSALSDK=
2769 enable_universalsdk=
2770 ;;
2771 *)
2772 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002773 if test ! -d "${UNIVERSALSDK}"
2774 then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002775 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002776 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002777 ;;
2778 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002779
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002780
Thomas Wouters477c8d52006-05-27 19:21:47 +00002781else
2782
2783 UNIVERSALSDK=
2784 enable_universalsdk=
2785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002786fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002787
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002788if test -n "${UNIVERSALSDK}"
2789then
Matthias Kloseb9621712010-04-24 17:59:49 +00002790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2791$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002792else
Matthias Kloseb9621712010-04-24 17:59:49 +00002793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2794$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002795fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002797
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002798
2799
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002800UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002801
Matthias Kloseb9621712010-04-24 17:59:49 +00002802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2803$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002804
2805# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002806if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002807 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2809$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002810 UNIVERSAL_ARCHS="$withval"
2811
2812else
2813
Matthias Kloseb9621712010-04-24 17:59:49 +00002814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2815$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002816
2817fi
2818
2819
2820
2821
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002822
2823# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002824if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002825 withval=$with_framework_name;
2826 PYTHONFRAMEWORK=${withval}
2827 PYTHONFRAMEWORKDIR=${withval}.framework
2828 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2829
2830else
2831
2832 PYTHONFRAMEWORK=Python
2833 PYTHONFRAMEWORKDIR=Python.framework
2834 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2835
2836fi
2837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002838# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002839if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002840 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002841 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002843 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002844 esac
2845 case $enableval in
2846 no)
2847 PYTHONFRAMEWORK=
2848 PYTHONFRAMEWORKDIR=no-framework
2849 PYTHONFRAMEWORKPREFIX=
2850 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002851 FRAMEWORKINSTALLFIRST=
2852 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002853 FRAMEWORKALTINSTALLFIRST=
2854 FRAMEWORKALTINSTALLLAST=
2855 if test "x${prefix}" = "xNONE"; then
2856 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2857 else
2858 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2859 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002860 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002861 ;;
2862 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002863 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002864 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002865 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002866 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002867 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2868 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002869 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002870
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002871 if test "x${prefix}" = "xNONE" ; then
2872 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002873
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002874 else
2875 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2876 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002877
2878 case "${enableval}" in
2879 /System*)
2880 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2881 if test "${prefix}" = "NONE" ; then
2882 # See below
2883 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2884 fi
2885 ;;
2886
2887 /Library*)
2888 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2889 ;;
2890
2891 */Library/Frameworks)
2892 MDIR="`dirname "${enableval}"`"
2893 MDIR="`dirname "${MDIR}"`"
2894 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2895
2896 if test "${prefix}" = "NONE"; then
2897 # User hasn't specified the
2898 # --prefix option, but wants to install
2899 # the framework in a non-default location,
2900 # ensure that the compatibility links get
2901 # installed relative to that prefix as well
2902 # instead of in /usr/local.
2903 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2904 fi
2905 ;;
2906
2907 *)
2908 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2909 ;;
2910 esac
2911
Jack Jansen127e56e2001-09-11 14:41:54 +00002912 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002913
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002914 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002915 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002916 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002917
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002918 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002919
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002920 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2921
2922 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2923
Jack Jansene578a632001-08-15 01:27:14 +00002924 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002925
Guido van Rossum563e7081996-09-10 18:20:48 +00002926else
Martin v. Löwis11437992002-04-12 09:54:03 +00002927
Jack Jansene578a632001-08-15 01:27:14 +00002928 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002929 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002930 PYTHONFRAMEWORKPREFIX=
2931 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002932 FRAMEWORKINSTALLFIRST=
2933 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002934 FRAMEWORKALTINSTALLFIRST=
2935 FRAMEWORKALTINSTALLLAST=
2936 if test "x${prefix}" = "xNONE" ; then
2937 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2938 else
2939 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2940 fi
Jack Jansene578a632001-08-15 01:27:14 +00002941 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002942
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002944fi
2945
Thomas Wouters477c8d52006-05-27 19:21:47 +00002946
2947
Michael W. Hudson54241132001-12-07 15:38:26 +00002948
2949
2950
2951
Jack Jansene578a632001-08-15 01:27:14 +00002952
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002953
2954
2955
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002956
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002957
Jack Jansene578a632001-08-15 01:27:14 +00002958##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002959## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002960## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002961##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002962# Set name for machine-dependent library files
2963
Matthias Kloseb9621712010-04-24 17:59:49 +00002964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2965$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002966if test -z "$MACHDEP"
2967then
Guido van Rossum563e7081996-09-10 18:20:48 +00002968 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002969 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002970 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002971 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002972 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002973 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002974 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002975 ac_md_system=`echo $ac_sys_system |
2976 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2977 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002978 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002979 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002980
Guido van Rossum07397971997-04-29 21:49:50 +00002981 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002982 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002983 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002984 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002985 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002986 esac
2987fi
Guido van Rossum91922671997-10-09 20:24:13 +00002988
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002989# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2990# disable features if it is defined, without any means to access these
2991# features as extensions. For these systems, we skip the definition of
2992# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2993# some feature, make sure there is no alternative way to access this
2994# feature. Also, when using wildcards, make sure you have verified the
2995# need for not defining _XOPEN_SOURCE on all systems matching the
2996# wildcard, and that the wildcard does not include future systems
2997# (which may remove their limitations).
2998case $ac_sys_system/$ac_sys_release in
2999 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3000 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003001 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003002 # In addition, Stefan Krah confirms that issue #1244610 exists through
3003 # OpenBSD 4.6, but is fixed in 4.7.
3004 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003005 define_xopen_source=no
3006 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3007 # also defined. This can be overridden by defining _BSD_SOURCE
3008 # As this has a different meaning on Linux, only define it on OpenBSD
3009
Matthias Kloseb9621712010-04-24 17:59:49 +00003010$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003011
3012 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003013 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003014 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3015 # also defined. This can be overridden by defining _BSD_SOURCE
3016 # As this has a different meaning on Linux, only define it on OpenBSD
3017
Matthias Kloseb9621712010-04-24 17:59:49 +00003018$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003019
3020 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003021 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3022 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3023 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003024 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003025 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003026 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3027 # request to enable features supported by the standard as a request
3028 # to disable features not supported by the standard. The best way
3029 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3030 # entirely and define __EXTENSIONS__ instead.
3031 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003032 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003033 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3034 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003035 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003036 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003037 define_xopen_source=no;;
3038 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003039 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003040 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003041 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003042 # On FreeBSD 4, the math functions C89 does not cover are never defined
3043 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3044 FreeBSD/4.*)
3045 define_xopen_source=no;;
3046 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3047 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3048 # identifies itself as Darwin/7.*
3049 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3050 # disables platform specific features beyond repair.
3051 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3052 # has no effect, don't bother defining them
3053 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003054 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003055 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003056 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003057 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3058 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3059 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003060 AIX/4)
3061 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003062 AIX/5)
3063 if test `uname -r` -eq 1; then
3064 define_xopen_source=no
3065 fi
3066 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003067 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3068 # defining NI_NUMERICHOST.
3069 QNX/6.3.2)
3070 define_xopen_source=no
3071 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003072
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003073esac
3074
3075if test $define_xopen_source = yes
3076then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003077
Matthias Kloseb9621712010-04-24 17:59:49 +00003078$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003079
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003080
3081 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3082 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3083 # several APIs are not declared. Since this is also needed in some
3084 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003085
Matthias Kloseb9621712010-04-24 17:59:49 +00003086$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003087
3088
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003089
Matthias Kloseb9621712010-04-24 17:59:49 +00003090$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003091
3092
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003093fi
3094
Guido van Rossum91922671997-10-09 20:24:13 +00003095#
3096# SGI compilers allow the specification of the both the ABI and the
3097# ISA on the command line. Depending on the values of these switches,
3098# different and often incompatable code will be generated.
3099#
3100# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3101# thus supply support for various ABI/ISA combinations. The MACHDEP
3102# variable is also adjusted.
3103#
3104
3105if test ! -z "$SGI_ABI"
3106then
3107 CC="cc $SGI_ABI"
3108 LDFLAGS="$SGI_ABI $LDFLAGS"
3109 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3110fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3112$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003113
Jack Jansen6b08a402004-06-03 12:41:45 +00003114# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3115# it may influence the way we can build extensions, so distutils
3116# needs to check it
3117
Thomas Wouters477c8d52006-05-27 19:21:47 +00003118
Jack Jansen6b08a402004-06-03 12:41:45 +00003119CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003120EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003121
Matthias Kloseb9621712010-04-24 17:59:49 +00003122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3123$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003124ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3126$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003127
Guido van Rossum627b2d71993-12-24 10:39:16 +00003128# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003129
3130# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3131# for debug/optimization stuff. BASECFLAGS is for flags that are required
3132# just to get things to compile and link. Users are free to override OPT
3133# when running configure or make. The build should not break if they do.
3134# BASECFLAGS should generally not be messed with, however.
3135
3136# XXX shouldn't some/most/all of this code be merged with the stuff later
3137# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3139$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003140
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003142if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003143 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003144 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003145 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003146 without_gcc=yes;;
3147 yes) CC=gcc
3148 without_gcc=no;;
3149 *) CC=$withval
3150 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003151 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003152else
Martin v. Löwis11437992002-04-12 09:54:03 +00003153
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003154 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003155 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003156 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003157 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003158 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003159fi
3160
Matthias Kloseb9621712010-04-24 17:59:49 +00003161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3162$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003163
Guido van Rossum8b131c51995-03-09 14:10:13 +00003164# If the user switches compilers, we can't believe the cache
3165if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3166then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003167 as_fn_error "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003168(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003169fi
3170
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003171# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3172# when the compiler supports them, but we don't always want -O2, and
3173# we set -g later.
3174if test -z "$CFLAGS"; then
3175 CFLAGS=
3176fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003177ac_ext=c
3178ac_cpp='$CPP $CPPFLAGS'
3179ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3180ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3181ac_compiler_gnu=$ac_cv_c_compiler_gnu
3182if test -n "$ac_tool_prefix"; then
3183 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3184set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3186$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003187if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003188 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003189else
3190 if test -n "$CC"; then
3191 ac_cv_prog_CC="$CC" # Let the user override the test.
3192else
Martin v. Löwis11437992002-04-12 09:54:03 +00003193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3194for as_dir in $PATH
3195do
3196 IFS=$as_save_IFS
3197 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003198 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199 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 +00003200 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003201 $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 +00003202 break 2
3203 fi
3204done
Matthias Kloseb9621712010-04-24 17:59:49 +00003205 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003206IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003207
Jack Jansendd19cf82001-12-06 22:36:17 +00003208fi
3209fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003210CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003211if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3213$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003214else
Matthias Kloseb9621712010-04-24 17:59:49 +00003215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3216$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003217fi
3218
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003219
Martin v. Löwis11437992002-04-12 09:54:03 +00003220fi
3221if test -z "$ac_cv_prog_CC"; then
3222 ac_ct_CC=$CC
3223 # Extract the first word of "gcc", so it can be a program name with args.
3224set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3226$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003227if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003228 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003229else
3230 if test -n "$ac_ct_CC"; then
3231 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3232else
3233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3234for as_dir in $PATH
3235do
3236 IFS=$as_save_IFS
3237 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003238 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003239 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 +00003240 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003241 $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 +00003242 break 2
3243 fi
3244done
Matthias Kloseb9621712010-04-24 17:59:49 +00003245 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003246IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003247
3248fi
3249fi
3250ac_ct_CC=$ac_cv_prog_ac_ct_CC
3251if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3253$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003254else
Matthias Kloseb9621712010-04-24 17:59:49 +00003255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3256$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003257fi
3258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003259 if test "x$ac_ct_CC" = x; then
3260 CC=""
3261 else
3262 case $cross_compiling:$ac_tool_warned in
3263yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003264{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3265$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003266ac_tool_warned=yes ;;
3267esac
3268 CC=$ac_ct_CC
3269 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003270else
3271 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003272fi
3273
Jack Jansendd19cf82001-12-06 22:36:17 +00003274if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003275 if test -n "$ac_tool_prefix"; then
3276 # 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 +00003277set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3279$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003280if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003281 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003282else
3283 if test -n "$CC"; then
3284 ac_cv_prog_CC="$CC" # Let the user override the test.
3285else
Martin v. Löwis11437992002-04-12 09:54:03 +00003286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3287for as_dir in $PATH
3288do
3289 IFS=$as_save_IFS
3290 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003291 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003292 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 +00003293 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003294 $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 +00003295 break 2
3296 fi
3297done
Matthias Kloseb9621712010-04-24 17:59:49 +00003298 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003299IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003300
3301fi
3302fi
3303CC=$ac_cv_prog_CC
3304if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3306$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003307else
Matthias Kloseb9621712010-04-24 17:59:49 +00003308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3309$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003310fi
3311
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003312
Martin v. Löwis11437992002-04-12 09:54:03 +00003313 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003314fi
3315if test -z "$CC"; then
3316 # Extract the first word of "cc", so it can be a program name with args.
3317set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3319$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003320if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003321 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003322else
3323 if test -n "$CC"; then
3324 ac_cv_prog_CC="$CC" # Let the user override the test.
3325else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003326 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3328for as_dir in $PATH
3329do
3330 IFS=$as_save_IFS
3331 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003332 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003333 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 +00003334 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3335 ac_prog_rejected=yes
3336 continue
3337 fi
3338 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003339 $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 +00003340 break 2
3341 fi
3342done
Matthias Kloseb9621712010-04-24 17:59:49 +00003343 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003344IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003345
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003346if test $ac_prog_rejected = yes; then
3347 # We found a bogon in the path, so make sure we never use it.
3348 set dummy $ac_cv_prog_CC
3349 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003350 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003351 # We chose a different compiler from the bogus one.
3352 # However, it has the same basename, so the bogon will be chosen
3353 # first if we set CC to just the basename; use the full file name.
3354 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003355 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003356 fi
3357fi
3358fi
3359fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003360CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003361if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3363$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003364else
Matthias Kloseb9621712010-04-24 17:59:49 +00003365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3366$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003367fi
3368
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003369
Martin v. Löwis11437992002-04-12 09:54:03 +00003370fi
3371if test -z "$CC"; then
3372 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003373 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003374 do
3375 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3376set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3378$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003379if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003380 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003381else
3382 if test -n "$CC"; then
3383 ac_cv_prog_CC="$CC" # Let the user override the test.
3384else
Martin v. Löwis11437992002-04-12 09:54:03 +00003385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3386for as_dir in $PATH
3387do
3388 IFS=$as_save_IFS
3389 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003390 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003391 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 +00003392 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003393 $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 +00003394 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003395 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003396done
Matthias Kloseb9621712010-04-24 17:59:49 +00003397 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003398IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003399
3400fi
3401fi
3402CC=$ac_cv_prog_CC
3403if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3405$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003406else
Matthias Kloseb9621712010-04-24 17:59:49 +00003407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3408$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003409fi
3410
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003411
Martin v. Löwis11437992002-04-12 09:54:03 +00003412 test -n "$CC" && break
3413 done
3414fi
3415if test -z "$CC"; then
3416 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003417 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003418do
3419 # Extract the first word of "$ac_prog", so it can be a program name with args.
3420set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3422$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003423if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003424 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003425else
3426 if test -n "$ac_ct_CC"; then
3427 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3428else
3429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3430for as_dir in $PATH
3431do
3432 IFS=$as_save_IFS
3433 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003434 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003435 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 +00003436 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003437 $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 +00003438 break 2
3439 fi
3440done
Matthias Kloseb9621712010-04-24 17:59:49 +00003441 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003442IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003443
Martin v. Löwis11437992002-04-12 09:54:03 +00003444fi
3445fi
3446ac_ct_CC=$ac_cv_prog_ac_ct_CC
3447if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3449$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003450else
Matthias Kloseb9621712010-04-24 17:59:49 +00003451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3452$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003453fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003455
Martin v. Löwis11437992002-04-12 09:54:03 +00003456 test -n "$ac_ct_CC" && break
3457done
Michael W. Hudson54241132001-12-07 15:38:26 +00003458
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003459 if test "x$ac_ct_CC" = x; then
3460 CC=""
3461 else
3462 case $cross_compiling:$ac_tool_warned in
3463yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003464{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3465$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003466ac_tool_warned=yes ;;
3467esac
3468 CC=$ac_ct_CC
3469 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003470fi
3471
3472fi
3473
3474
Matthias Kloseb9621712010-04-24 17:59:49 +00003475test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3476$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003477as_fn_error "no acceptable C compiler found in \$PATH
3478See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003479
3480# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003481$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3482set X $ac_compile
3483ac_compiler=$2
3484for ac_option in --version -v -V -qversion; do
3485 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003486case "(($ac_try" in
3487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3488 *) ac_try_echo=$ac_try;;
3489esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003490eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3491$as_echo "$ac_try_echo"; } >&5
3492 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003493 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003494 if test -s conftest.err; then
3495 sed '10a\
3496... rest of stderr output deleted ...
3497 10q' conftest.err >conftest.er1
3498 cat conftest.er1 >&5
3499 fi
3500 rm -f conftest.er1 conftest.err
3501 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3502 test $ac_status = 0; }
3503done
Martin v. Löwis11437992002-04-12 09:54:03 +00003504
Matthias Kloseb9621712010-04-24 17:59:49 +00003505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003506/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003507
Martin v. Löwis11437992002-04-12 09:54:03 +00003508int
3509main ()
3510{
3511
3512 ;
3513 return 0;
3514}
3515_ACEOF
3516ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003517ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003518# Try to create an executable without -o first, disregard a.out.
3519# It will help us diagnose broken compilers, and finding out an intuition
3520# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3522$as_echo_n "checking whether the C compiler works... " >&6; }
3523ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3524
3525# The possible output files:
3526ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3527
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003528ac_rmfiles=
3529for ac_file in $ac_files
3530do
3531 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003532 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003533 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3534 esac
3535done
3536rm -f $ac_rmfiles
3537
Matthias Kloseb9621712010-04-24 17:59:49 +00003538if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539case "(($ac_try" in
3540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3541 *) ac_try_echo=$ac_try;;
3542esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003543eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3544$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003545 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003546 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003547 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3548 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003549 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3550# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3551# in a Makefile. We should not override ac_cv_exeext if it was cached,
3552# so that the user can short-circuit this test for compilers unknown to
3553# Autoconf.
3554for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003555do
3556 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003558 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003559 ;;
3560 [ab].out )
3561 # We found the default executable, but exeext='' is most
3562 # certainly right.
3563 break;;
3564 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003565 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003566 then :; else
3567 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3568 fi
3569 # We set ac_cv_exeext here because the later test for it is not
3570 # safe: cross compilers may not add the suffix if given an `-o'
3571 # argument, so we may need to know it at that point already.
3572 # Even if this section looks crufty: it has the advantage of
3573 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003574 break;;
3575 * )
3576 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 esac
3578done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003579test "$ac_cv_exeext" = no && ac_cv_exeext=
3580
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003581else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003582 ac_file=''
3583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003584if test -z "$ac_file"; then :
3585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3586$as_echo "no" >&6; }
3587$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003588sed 's/^/| /' conftest.$ac_ext >&5
3589
Matthias Kloseb9621712010-04-24 17:59:49 +00003590{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3591$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003592{ as_fn_set_status 77
3593as_fn_error "C compiler cannot create executables
3594See \`config.log' for more details." "$LINENO" 5; }; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003595else
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3597$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3600$as_echo_n "checking for C compiler default output file name... " >&6; }
3601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3602$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003603ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003604
Matthias Kloseb9621712010-04-24 17:59:49 +00003605rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003606ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3608$as_echo_n "checking for suffix of executables... " >&6; }
3609if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003610case "(($ac_try" in
3611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3612 *) ac_try_echo=$ac_try;;
3613esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003614eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3615$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003616 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003617 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3619 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003620 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3621# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3622# work properly (i.e., refer to `conftest.exe'), while it won't with
3623# `rm'.
3624for ac_file in conftest.exe conftest conftest.*; do
3625 test -f "$ac_file" || continue
3626 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003628 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3629 break;;
3630 * ) break;;
3631 esac
3632done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003633else
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003636as_fn_error "cannot compute suffix of executables: cannot compile and link
3637See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003639rm -f conftest conftest$ac_cv_exeext
3640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3641$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003642
3643rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003644EXEEXT=$ac_cv_exeext
3645ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3647/* end confdefs.h. */
3648#include <stdio.h>
3649int
3650main ()
3651{
3652FILE *f = fopen ("conftest.out", "w");
3653 return ferror (f) || fclose (f) != 0;
3654
3655 ;
3656 return 0;
3657}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003659ac_clean_files="$ac_clean_files conftest.out"
3660# Check that the compiler produces executables we can run. If not, either
3661# the compiler is broken, or we cross compile.
3662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3663$as_echo_n "checking whether we are cross compiling... " >&6; }
3664if test "$cross_compiling" != yes; then
3665 { { ac_try="$ac_link"
3666case "(($ac_try" in
3667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3668 *) ac_try_echo=$ac_try;;
3669esac
3670eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3671$as_echo "$ac_try_echo"; } >&5
3672 (eval "$ac_link") 2>&5
3673 ac_status=$?
3674 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3675 test $ac_status = 0; }
3676 if { ac_try='./conftest$ac_cv_exeext'
3677 { { case "(($ac_try" in
3678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3679 *) ac_try_echo=$ac_try;;
3680esac
3681eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3682$as_echo "$ac_try_echo"; } >&5
3683 (eval "$ac_try") 2>&5
3684 ac_status=$?
3685 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3686 test $ac_status = 0; }; }; then
3687 cross_compiling=no
3688 else
3689 if test "$cross_compiling" = maybe; then
3690 cross_compiling=yes
3691 else
3692 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3693$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003694as_fn_error "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003695If you meant to cross compile, use \`--host'.
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003696See \`config.log' for more details." "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 fi
3698 fi
3699fi
3700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3701$as_echo "$cross_compiling" >&6; }
3702
3703rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3704ac_clean_files=$ac_clean_files_save
3705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3706$as_echo_n "checking for suffix of object files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003707if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 $as_echo_n "(cached) " >&6
3709else
3710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003711/* end confdefs.h. */
3712
3713int
3714main ()
3715{
3716
3717 ;
3718 return 0;
3719}
3720_ACEOF
3721rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003722if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723case "(($ac_try" in
3724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3725 *) ac_try_echo=$ac_try;;
3726esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003727eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3728$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003730 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3732 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003733 for ac_file in conftest.o conftest.obj conftest.*; do
3734 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3738 break;;
3739 esac
3740done
3741else
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003743sed 's/^/| /' conftest.$ac_ext >&5
3744
Matthias Kloseb9621712010-04-24 17:59:49 +00003745{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003747as_fn_error "cannot compute suffix of object files: cannot compile
3748See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003749fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003750rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3753$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003754OBJEXT=$ac_cv_objext
3755ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3757$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003758if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003760else
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003763
Martin v. Löwis11437992002-04-12 09:54:03 +00003764int
3765main ()
3766{
3767#ifndef __GNUC__
3768 choke me
3769#endif
3770
3771 ;
3772 return 0;
3773}
3774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003775if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 ac_compiler_gnu=yes
3777else
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003781ac_cv_c_compiler_gnu=$ac_compiler_gnu
3782
3783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3785$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3786if test $ac_compiler_gnu = yes; then
3787 GCC=yes
3788else
3789 GCC=
3790fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003791ac_test_CFLAGS=${CFLAGS+set}
3792ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3794$as_echo_n "checking whether $CC accepts -g... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003795if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003797else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798 ac_save_c_werror_flag=$ac_c_werror_flag
3799 ac_c_werror_flag=yes
3800 ac_cv_prog_cc_g=no
3801 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003804
Martin v. Löwis11437992002-04-12 09:54:03 +00003805int
3806main ()
3807{
3808
3809 ;
3810 return 0;
3811}
3812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003813if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003814 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003815else
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 CFLAGS=""
3817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818/* end confdefs.h. */
3819
3820int
3821main ()
3822{
3823
3824 ;
3825 return 0;
3826}
3827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003828if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829
Matthias Kloseb9621712010-04-24 17:59:49 +00003830else
3831 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834/* end confdefs.h. */
3835
3836int
3837main ()
3838{
3839
3840 ;
3841 return 0;
3842}
3843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003844if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3852 ac_c_werror_flag=$ac_save_c_werror_flag
3853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3855$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003856if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003857 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003858elif test $ac_cv_prog_cc_g = yes; then
3859 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003860 CFLAGS="-g -O2"
3861 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003862 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003863 fi
3864else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003865 if test "$GCC" = yes; then
3866 CFLAGS="-O2"
3867 else
3868 CFLAGS=
3869 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3872$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003873if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003875else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003876 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003877ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003879/* end confdefs.h. */
3880#include <stdarg.h>
3881#include <stdio.h>
3882#include <sys/types.h>
3883#include <sys/stat.h>
3884/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3885struct buf { int x; };
3886FILE * (*rcsopen) (struct buf *, struct stat *, int);
3887static char *e (p, i)
3888 char **p;
3889 int i;
3890{
3891 return p[i];
3892}
3893static char *f (char * (*g) (char **, int), char **p, ...)
3894{
3895 char *s;
3896 va_list v;
3897 va_start (v,p);
3898 s = g (p, va_arg (v,int));
3899 va_end (v);
3900 return s;
3901}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003902
3903/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3904 function prototypes and stuff, but not '\xHH' hex character constants.
3905 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003906 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003907 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3908 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003910int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3913 inside strings and character constants. */
3914#define FOO(x) 'x'
3915int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3916
Skip Montanaro6dead952003-09-25 14:50:04 +00003917int test (int i, double x);
3918struct s1 {int (*f) (int a);};
3919struct s2 {int (*f) (double a);};
3920int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3921int argc;
3922char **argv;
3923int
3924main ()
3925{
3926return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3927 ;
3928 return 0;
3929}
3930_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003931for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3932 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003933do
3934 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003935 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938rm -f core conftest.err conftest.$ac_objext
3939 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003940done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003942CC=$ac_save_CC
3943
3944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945# AC_CACHE_VAL
3946case "x$ac_cv_prog_cc_c89" in
3947 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3949$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3952$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003953 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3956$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003957esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003958if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003959
Matthias Kloseb9621712010-04-24 17:59:49 +00003960fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003961
Martin v. Löwis11437992002-04-12 09:54:03 +00003962ac_ext=c
3963ac_cpp='$CPP $CPPFLAGS'
3964ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3965ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3966ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003967
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003968
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003969
3970
Matthias Kloseb9621712010-04-24 17:59:49 +00003971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3972$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003973
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003974# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003975if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003977
3978 case $withval in
3979 no) with_cxx_main=no
3980 MAINCC='$(CC)';;
3981 yes) with_cxx_main=yes
3982 MAINCC='$(CXX)';;
3983 *) with_cxx_main=yes
3984 MAINCC=$withval
3985 if test -z "$CXX"
3986 then
3987 CXX=$withval
3988 fi;;
3989 esac
3990else
3991
3992 with_cxx_main=no
3993 MAINCC='$(CC)'
3994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995fi
3996
Matthias Kloseb9621712010-04-24 17:59:49 +00003997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3998$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003999
4000preset_cxx="$CXX"
4001if test -z "$CXX"
4002then
4003 case "$CC" in
4004 gcc) # Extract the first word of "g++", so it can be a program name with args.
4005set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4007$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004008if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004009 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004010else
4011 case $CXX in
4012 [\\/]* | ?:[\\/]*)
4013 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4014 ;;
4015 *)
4016 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4017for as_dir in notfound
4018do
4019 IFS=$as_save_IFS
4020 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004021 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004023 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004025 break 2
4026 fi
4027done
Matthias Kloseb9621712010-04-24 17:59:49 +00004028 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004029IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004030
4031 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4032 ;;
4033esac
4034fi
4035CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004036if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4038$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004039else
Matthias Kloseb9621712010-04-24 17:59:49 +00004040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4041$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004043
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004044 ;;
4045 cc) # Extract the first word of "c++", so it can be a program name with args.
4046set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4048$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004049if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004050 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004051else
4052 case $CXX in
4053 [\\/]* | ?:[\\/]*)
4054 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4055 ;;
4056 *)
4057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4058for as_dir in notfound
4059do
4060 IFS=$as_save_IFS
4061 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004062 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004063 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004064 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004066 break 2
4067 fi
4068done
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004070IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004071
4072 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4073 ;;
4074esac
4075fi
4076CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004077if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4079$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004080else
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4082$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004085 ;;
4086 esac
4087 if test "$CXX" = "notfound"
4088 then
4089 CXX=""
4090 fi
4091fi
4092if test -z "$CXX"
4093then
4094 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4095do
4096 # Extract the first word of "$ac_prog", so it can be a program name with args.
4097set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4099$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004100if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004102else
4103 if test -n "$CXX"; then
4104 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4105else
4106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4107for as_dir in $PATH
4108do
4109 IFS=$as_save_IFS
4110 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004112 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004113 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004115 break 2
4116 fi
4117done
Matthias Kloseb9621712010-04-24 17:59:49 +00004118 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004119IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004120
4121fi
4122fi
4123CXX=$ac_cv_prog_CXX
4124if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4126$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004127else
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4129$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004130fi
4131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004132
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004133 test -n "$CXX" && break
4134done
4135test -n "$CXX" || CXX="notfound"
4136
4137 if test "$CXX" = "notfound"
4138 then
4139 CXX=""
4140 fi
4141fi
4142if test "$preset_cxx" != "$CXX"
4143then
Matthias Kloseb9621712010-04-24 17:59:49 +00004144 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004145
4146 By default, distutils will build C++ extension modules with \"$CXX\".
4147 If this is not intended, then set CXX on the configure command line.
4148 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004149$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004150
4151 By default, distutils will build C++ extension modules with \"$CXX\".
4152 If this is not intended, then set CXX on the configure command line.
4153 " >&2;}
4154fi
4155
4156
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4158$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4159save_LDFLAGS="$LDFLAGS"
4160LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004161
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4163/* end confdefs.h. */
4164
4165int
4166main ()
4167{
4168
4169 ;
4170 return 0;
4171}
4172_ACEOF
4173if ac_fn_c_try_link "$LINENO"; then :
4174 NO_AS_NEEDED="-Wl,--no-as-needed"
4175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4176$as_echo "yes" >&6; }
4177else
4178 NO_AS_NEEDED=""
4179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4180$as_echo "no" >&6; }
4181fi
4182rm -f core conftest.err conftest.$ac_objext \
4183 conftest$ac_exeext conftest.$ac_ext
4184LDFLAGS="$save_LDFLAGS"
4185
4186
4187
4188# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004189ac_ext=c
4190ac_cpp='$CPP $CPPFLAGS'
4191ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4192ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4193ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4195$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004196# On Suns, sometimes $CPP names a directory.
4197if test -n "$CPP" && test -d "$CPP"; then
4198 CPP=
4199fi
4200if test -z "$CPP"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004201 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004203else
Martin v. Löwis11437992002-04-12 09:54:03 +00004204 # Double quotes because CPP needs to be expanded
4205 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4206 do
4207 ac_preproc_ok=false
4208for ac_c_preproc_warn_flag in '' yes
4209do
4210 # Use a header file that comes with gcc, so configuring glibc
4211 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004212 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4213 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004214 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004215 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004217/* end confdefs.h. */
4218#ifdef __STDC__
4219# include <limits.h>
4220#else
4221# include <assert.h>
4222#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004223 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004225if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004226
Matthias Kloseb9621712010-04-24 17:59:49 +00004227else
Martin v. Löwis11437992002-04-12 09:54:03 +00004228 # Broken: fails on valid input.
4229continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004230fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004231rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004234 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004237#include <ac_nonexistent.h>
4238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004239if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004240 # Broken: success on invalid input.
4241continue
4242else
Martin v. Löwis11437992002-04-12 09:54:03 +00004243 # Passes both tests.
4244ac_preproc_ok=:
4245break
4246fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004247rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004248
4249done
4250# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004251rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004252if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004253 break
4254fi
4255
4256 done
4257 ac_cv_prog_CPP=$CPP
4258
4259fi
4260 CPP=$ac_cv_prog_CPP
4261else
4262 ac_cv_prog_CPP=$CPP
4263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4265$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004266ac_preproc_ok=false
4267for ac_c_preproc_warn_flag in '' yes
4268do
4269 # Use a header file that comes with gcc, so configuring glibc
4270 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004271 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4272 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 # On the NeXT, cc -E runs the code through the compiler's parser,
4274 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004276/* end confdefs.h. */
4277#ifdef __STDC__
4278# include <limits.h>
4279#else
4280# include <assert.h>
4281#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004282 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004284if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004285
Matthias Kloseb9621712010-04-24 17:59:49 +00004286else
Martin v. Löwis11437992002-04-12 09:54:03 +00004287 # Broken: fails on valid input.
4288continue
4289fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004290rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004291
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004293 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004295/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004296#include <ac_nonexistent.h>
4297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004298if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004299 # Broken: success on invalid input.
4300continue
4301else
Martin v. Löwis11437992002-04-12 09:54:03 +00004302 # Passes both tests.
4303ac_preproc_ok=:
4304break
4305fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004306rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004307
4308done
4309# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004310rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004311if $ac_preproc_ok; then :
4312
Martin v. Löwis11437992002-04-12 09:54:03 +00004313else
Matthias Kloseb9621712010-04-24 17:59:49 +00004314 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4315$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004316as_fn_error "C preprocessor \"$CPP\" fails sanity check
4317See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004318fi
4319
4320ac_ext=c
4321ac_cpp='$CPP $CPPFLAGS'
4322ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4323ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4324ac_compiler_gnu=$ac_cv_c_compiler_gnu
4325
4326
Matthias Kloseb9621712010-04-24 17:59:49 +00004327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4328$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004329if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004330 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004331else
Matthias Kloseb9621712010-04-24 17:59:49 +00004332 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 # Loop through the user's path and test for each of PROGNAME-LIST
4335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4337do
4338 IFS=$as_save_IFS
4339 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 for ac_prog in grep ggrep; do
4341 for ac_exec_ext in '' $ac_executable_extensions; do
4342 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4343 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4344# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345 # Check for GNU $ac_path_GREP
4346case `"$ac_path_GREP" --version 2>&1` in
4347*GNU*)
4348 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4349*)
4350 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004351 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352 while :
4353 do
4354 cat "conftest.in" "conftest.in" >"conftest.tmp"
4355 mv "conftest.tmp" "conftest.in"
4356 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004357 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4359 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4362 # Best one so far, save it but keep looking for a better one
4363 ac_cv_path_GREP="$ac_path_GREP"
4364 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004365 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366 # 10*(2^10) chars as input seems more than enough
4367 test $ac_count -gt 10 && break
4368 done
4369 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4370esac
4371
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 $ac_path_GREP_found && break 3
4373 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 if test -z "$ac_cv_path_GREP"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004378 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380else
4381 ac_cv_path_GREP=$GREP
4382fi
4383
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4386$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004387 GREP="$ac_cv_path_GREP"
4388
4389
Matthias Kloseb9621712010-04-24 17:59:49 +00004390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4391$as_echo_n "checking for egrep... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004392if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004393 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004394else
4395 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4396 then ac_cv_path_EGREP="$GREP -E"
4397 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004398 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004399 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004400 # Loop through the user's path and test for each of PROGNAME-LIST
4401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4403do
4404 IFS=$as_save_IFS
4405 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 for ac_prog in egrep; do
4407 for ac_exec_ext in '' $ac_executable_extensions; do
4408 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4409 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4410# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004411 # Check for GNU $ac_path_EGREP
4412case `"$ac_path_EGREP" --version 2>&1` in
4413*GNU*)
4414 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4415*)
4416 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004417 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 while :
4419 do
4420 cat "conftest.in" "conftest.in" >"conftest.tmp"
4421 mv "conftest.tmp" "conftest.in"
4422 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004423 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004424 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4425 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004426 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004427 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4428 # Best one so far, save it but keep looking for a better one
4429 ac_cv_path_EGREP="$ac_path_EGREP"
4430 ac_path_EGREP_max=$ac_count
4431 fi
4432 # 10*(2^10) chars as input seems more than enough
4433 test $ac_count -gt 10 && break
4434 done
4435 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4436esac
4437
Matthias Kloseb9621712010-04-24 17:59:49 +00004438 $ac_path_EGREP_found && break 3
4439 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004440 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004441 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004442IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004443 if test -z "$ac_cv_path_EGREP"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004444 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004445 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004446else
4447 ac_cv_path_EGREP=$EGREP
4448fi
4449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004450 fi
4451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4453$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004454 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004455
4456
Matthias Kloseb9621712010-04-24 17:59:49 +00004457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4458$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004459if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004460 $as_echo_n "(cached) " >&6
4461else
4462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004463/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004464#include <stdlib.h>
4465#include <stdarg.h>
4466#include <string.h>
4467#include <float.h>
4468
4469int
4470main ()
4471{
4472
4473 ;
4474 return 0;
4475}
4476_ACEOF
4477if ac_fn_c_try_compile "$LINENO"; then :
4478 ac_cv_header_stdc=yes
4479else
4480 ac_cv_header_stdc=no
4481fi
4482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4483
4484if test $ac_cv_header_stdc = yes; then
4485 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4487/* end confdefs.h. */
4488#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004489
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004490_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004491if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004492 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004493
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004494else
Matthias Kloseb9621712010-04-24 17:59:49 +00004495 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004496fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004497rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004498
Matthias Kloseb9621712010-04-24 17:59:49 +00004499fi
4500
4501if test $ac_cv_header_stdc = yes; then
4502 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4504/* end confdefs.h. */
4505#include <stdlib.h>
4506
4507_ACEOF
4508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4509 $EGREP "free" >/dev/null 2>&1; then :
4510
4511else
4512 ac_cv_header_stdc=no
4513fi
4514rm -f conftest*
4515
4516fi
4517
4518if test $ac_cv_header_stdc = yes; then
4519 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4520 if test "$cross_compiling" = yes; then :
4521 :
4522else
4523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4524/* end confdefs.h. */
4525#include <ctype.h>
4526#include <stdlib.h>
4527#if ((' ' & 0x0FF) == 0x020)
4528# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4529# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4530#else
4531# define ISLOWER(c) \
4532 (('a' <= (c) && (c) <= 'i') \
4533 || ('j' <= (c) && (c) <= 'r') \
4534 || ('s' <= (c) && (c) <= 'z'))
4535# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4536#endif
4537
4538#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4539int
4540main ()
4541{
4542 int i;
4543 for (i = 0; i < 256; i++)
4544 if (XOR (islower (i), ISLOWER (i))
4545 || toupper (i) != TOUPPER (i))
4546 return 2;
4547 return 0;
4548}
4549_ACEOF
4550if ac_fn_c_try_run "$LINENO"; then :
4551
4552else
4553 ac_cv_header_stdc=no
4554fi
4555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4556 conftest.$ac_objext conftest.beam conftest.$ac_ext
4557fi
4558
4559fi
4560fi
4561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4562$as_echo "$ac_cv_header_stdc" >&6; }
4563if test $ac_cv_header_stdc = yes; then
4564
4565$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4566
4567fi
4568
4569# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4570for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4571 inttypes.h stdint.h unistd.h
4572do :
4573 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4574ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4575"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004576eval as_val=\$$as_ac_Header
4577 if test "x$as_val" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004578 cat >>confdefs.h <<_ACEOF
4579#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4580_ACEOF
4581
4582fi
4583
4584done
4585
4586
4587
4588 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004589if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004590 MINIX=yes
4591else
4592 MINIX=
4593fi
4594
4595
4596 if test "$MINIX" = yes; then
4597
4598$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4599
4600
4601$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4602
4603
4604$as_echo "#define _MINIX 1" >>confdefs.h
4605
4606 fi
4607
4608
4609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4610$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004611if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004612 $as_echo_n "(cached) " >&6
4613else
4614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4615/* end confdefs.h. */
4616
4617# define __EXTENSIONS__ 1
4618 $ac_includes_default
4619int
4620main ()
4621{
4622
4623 ;
4624 return 0;
4625}
4626_ACEOF
4627if ac_fn_c_try_compile "$LINENO"; then :
4628 ac_cv_safe_to_define___extensions__=yes
4629else
4630 ac_cv_safe_to_define___extensions__=no
4631fi
4632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4633fi
4634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4635$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4636 test $ac_cv_safe_to_define___extensions__ = yes &&
4637 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4638
4639 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4640
4641 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4642
4643 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4644
4645 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4646
4647
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004648
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004649# Check for unsupported systems
4650case $ac_sys_system/$ac_sys_release in
4651atheos*|Linux*/1*)
4652 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4653 echo See README for details.
4654 exit 1;;
4655esac
4656
4657
Matthias Kloseb9621712010-04-24 17:59:49 +00004658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4659$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004660
4661# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004662if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004663 withval=$with_suffix;
4664 case $withval in
4665 no) EXEEXT=;;
4666 yes) EXEEXT=.exe;;
4667 *) EXEEXT=$withval;;
4668 esac
4669fi
4670
Matthias Kloseb9621712010-04-24 17:59:49 +00004671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4672$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004673
4674# Test whether we're running on a non-case-sensitive system, in which
4675# case we give a warning if no ext is given
4676
Matthias Kloseb9621712010-04-24 17:59:49 +00004677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4678$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004679if test ! -d CaseSensitiveTestDir; then
4680mkdir CaseSensitiveTestDir
4681fi
4682
4683if test -d casesensitivetestdir
4684then
Matthias Kloseb9621712010-04-24 17:59:49 +00004685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4686$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004687 BUILDEXEEXT=.exe
4688else
Matthias Kloseb9621712010-04-24 17:59:49 +00004689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4690$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004691 BUILDEXEEXT=$EXEEXT
4692fi
4693rmdir CaseSensitiveTestDir
4694
4695case $MACHDEP in
4696bsdos*)
4697 case $CC in
4698 gcc) CC="$CC -D_HAVE_BSDI";;
4699 esac;;
4700esac
4701
4702case $ac_sys_system in
4703hp*|HP*)
4704 case $CC in
4705 cc|*/cc) CC="$CC -Ae";;
4706 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004707esac
4708
4709
4710
Matthias Kloseb9621712010-04-24 17:59:49 +00004711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4712$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004713if test -z "$LIBRARY"
4714then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004715 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4718$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004719
4720# LDLIBRARY is the name of the library to link against (as opposed to the
4721# name of the library into which to insert object files). BLDLIBRARY is also
4722# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4723# is blank as the main program is not linked directly against LDLIBRARY.
4724# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4725# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4726# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4727# DLLLIBRARY is the shared (i.e., DLL) library.
4728#
4729# RUNSHARED is used to run shared python without installed libraries
4730#
4731# INSTSONAME is the name of the shared library that will be use to install
4732# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004733#
4734# LDVERSION is the shared library version number, normally the Python version
4735# with the ABI build flags appended.
4736
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004737
4738
4739
4740
4741
4742
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004743
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004744LDLIBRARY="$LIBRARY"
4745BLDLIBRARY='$(LDLIBRARY)'
4746INSTSONAME='$(LDLIBRARY)'
4747DLLLIBRARY=''
4748LDLIBRARYDIR=''
4749RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004750LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004751
4752# LINKCC is the command that links the python executable -- default is $(CC).
4753# If CXX is set, and if it is needed to link a main function that was
4754# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4755# python might then depend on the C++ runtime
4756# This is altered for AIX in order to build the export list before
4757# linking.
4758
Matthias Kloseb9621712010-04-24 17:59:49 +00004759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4760$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004761if test -z "$LINKCC"
4762then
4763 LINKCC='$(PURIFY) $(MAINCC)'
4764 case $ac_sys_system in
4765 AIX*)
4766 exp_extra="\"\""
4767 if test $ac_sys_release -ge 5 -o \
4768 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4769 exp_extra="."
4770 fi
4771 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004772 QNX*)
4773 # qcc must be used because the other compilers do not
4774 # support -N.
4775 LINKCC=qcc;;
4776 esac
4777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4779$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004780
4781# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4782# make sure we default having it set to "no": this is used by
4783# distutils.unixccompiler to know if it should add --enable-new-dtags
4784# to linker command lines, and failing to detect GNU ld simply results
4785# in the same bahaviour as before.
4786
Matthias Kloseb9621712010-04-24 17:59:49 +00004787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4788$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004789ac_prog=ld
4790if test "$GCC" = yes; then
4791 ac_prog=`$CC -print-prog-name=ld`
4792fi
4793case `"$ac_prog" -V 2>&1 < /dev/null` in
4794 *GNU*)
4795 GNULD=yes;;
4796 *)
4797 GNULD=no;;
4798esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4800$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004801
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4803$as_echo_n "checking for inline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004804if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004805 $as_echo_n "(cached) " >&6
4806else
4807 ac_cv_c_inline=no
4808for ac_kw in inline __inline__ __inline; do
4809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4810/* end confdefs.h. */
4811#ifndef __cplusplus
4812typedef int foo_t;
4813static $ac_kw foo_t static_foo () {return 0; }
4814$ac_kw foo_t foo () {return 0; }
4815#endif
4816
4817_ACEOF
4818if ac_fn_c_try_compile "$LINENO"; then :
4819 ac_cv_c_inline=$ac_kw
4820fi
4821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4822 test "$ac_cv_c_inline" != no && break
4823done
4824
4825fi
4826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4827$as_echo "$ac_cv_c_inline" >&6; }
4828
4829case $ac_cv_c_inline in
4830 inline | yes) ;;
4831 *)
4832 case $ac_cv_c_inline in
4833 no) ac_val=;;
4834 *) ac_val=$ac_cv_c_inline;;
4835 esac
4836 cat >>confdefs.h <<_ACEOF
4837#ifndef __cplusplus
4838#define inline $ac_val
4839#endif
4840_ACEOF
4841 ;;
4842esac
4843
4844if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004845
4846$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004847
4848
4849fi
4850
4851
Matthias Kloseb9621712010-04-24 17:59:49 +00004852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4853$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004855if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004856 enableval=$enable_shared;
4857fi
4858
4859
4860if test -z "$enable_shared"
4861then
4862 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004863 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004864 enable_shared="yes";;
4865 *)
4866 enable_shared="no";;
4867 esac
4868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4870$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004871
Matthias Kloseb9621712010-04-24 17:59:49 +00004872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4873$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004874# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004875if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004876 enableval=$enable_profiling; ac_save_cc="$CC"
4877 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004878 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004879 ac_enable_profiling="no"
4880else
Matthias Kloseb9621712010-04-24 17:59:49 +00004881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004882/* end confdefs.h. */
4883int main() { return 0; }
4884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004885if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004886 ac_enable_profiling="yes"
4887else
Matthias Kloseb9621712010-04-24 17:59:49 +00004888 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4891 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004892fi
4893
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004894 CC="$ac_save_cc"
4895fi
4896
Matthias Kloseb9621712010-04-24 17:59:49 +00004897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4898$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004899
4900case "$ac_enable_profiling" in
4901 "yes")
4902 BASECFLAGS="-pg $BASECFLAGS"
4903 LDFLAGS="-pg $LDFLAGS"
4904 ;;
4905esac
4906
Matthias Kloseb9621712010-04-24 17:59:49 +00004907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4908$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004909
4910# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4911# library that we build, but we do not want to link against it (we
4912# will find it with a -framework option). For this reason there is an
4913# extra variable BLDLIBRARY against which Python and the extension
4914# modules are linked, BLDLIBRARY. This is normally the same as
4915# LDLIBRARY, but empty for MacOSX framework builds.
4916if test "$enable_framework"
4917then
4918 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4919 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4920 BLDLIBRARY=''
4921else
4922 BLDLIBRARY='$(LDLIBRARY)'
4923fi
4924
4925# Other platforms follow
4926if test $enable_shared = "yes"; then
4927
Matthias Kloseb9621712010-04-24 17:59:49 +00004928$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004929
4930 case $ac_sys_system in
4931 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004932 LDLIBRARY='libpython$(LDVERSION).dll.a'
4933 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004934 ;;
4935 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004936 LDLIBRARY='libpython$(LDVERSION).so'
4937 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4939 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004940 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004941 then
4942 PY3LIBRARY=libpython3.so
4943 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004944 ;;
4945 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004946 LDLIBRARY='libpython$(LDVERSION).so'
4947 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004948 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4949 case $ac_sys_system in
4950 FreeBSD*)
4951 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4952 ;;
4953 esac
4954 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004955 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004956 then
4957 PY3LIBRARY=libpython3.so
4958 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004959 ;;
4960 hp*|HP*)
4961 case `uname -m` in
4962 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004963 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964 ;;
4965 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004966 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004967 ;;
4968 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004969 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004970 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4971 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004973 LDLIBRARY='libpython$(LDVERSION).dylib'
4974 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4976 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004977 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004978 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004979 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4980 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981
4982 esac
4983else # shared is disabled
4984 case $ac_sys_system in
4985 CYGWIN*)
4986 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004987 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004988 ;;
4989 esac
4990fi
4991
Matthias Kloseb9621712010-04-24 17:59:49 +00004992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4993$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994
4995if test -n "$ac_tool_prefix"; then
4996 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4997set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4999$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005000if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005001 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005002else
5003 if test -n "$RANLIB"; then
5004 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5005else
5006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5007for as_dir in $PATH
5008do
5009 IFS=$as_save_IFS
5010 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005011 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005012 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5013 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015 break 2
5016 fi
5017done
Matthias Kloseb9621712010-04-24 17:59:49 +00005018 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019IFS=$as_save_IFS
5020
5021fi
5022fi
5023RANLIB=$ac_cv_prog_RANLIB
5024if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5026$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005027else
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5029$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030fi
5031
5032
5033fi
5034if test -z "$ac_cv_prog_RANLIB"; then
5035 ac_ct_RANLIB=$RANLIB
5036 # Extract the first word of "ranlib", so it can be a program name with args.
5037set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5039$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005040if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042else
5043 if test -n "$ac_ct_RANLIB"; then
5044 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5045else
5046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5047for as_dir in $PATH
5048do
5049 IFS=$as_save_IFS
5050 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005051 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5053 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005055 break 2
5056 fi
5057done
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059IFS=$as_save_IFS
5060
5061fi
5062fi
5063ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5064if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5066$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005067else
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5069$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005070fi
5071
5072 if test "x$ac_ct_RANLIB" = x; then
5073 RANLIB=":"
5074 else
5075 case $cross_compiling:$ac_tool_warned in
5076yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005077{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5078$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005079ac_tool_warned=yes ;;
5080esac
5081 RANLIB=$ac_ct_RANLIB
5082 fi
5083else
5084 RANLIB="$ac_cv_prog_RANLIB"
5085fi
5086
5087
5088for ac_prog in ar aal
5089do
5090 # Extract the first word of "$ac_prog", so it can be a program name with args.
5091set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5093$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005094if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005096else
5097 if test -n "$AR"; then
5098 ac_cv_prog_AR="$AR" # Let the user override the test.
5099else
5100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5101for as_dir in $PATH
5102do
5103 IFS=$as_save_IFS
5104 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005106 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5107 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109 break 2
5110 fi
5111done
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005113IFS=$as_save_IFS
5114
5115fi
5116fi
5117AR=$ac_cv_prog_AR
5118if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5120$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005121else
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5123$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005124fi
5125
5126
5127 test -n "$AR" && break
5128done
5129test -n "$AR" || AR="ar"
5130
5131
5132# tweak ARFLAGS only if the user didn't set it on the command line
5133
5134if test -z "$ARFLAGS"
5135then
5136 ARFLAGS="rc"
5137fi
5138
5139
Georg Brandl1ca2e792011-03-05 20:51:24 +01005140
5141
5142# Extract the first word of "hg", so it can be a program name with args.
5143set dummy hg; ac_word=$2
5144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5145$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005146if test "${ac_cv_prog_HAS_HG+set}" = set; then :
Georg Brandl1ca2e792011-03-05 20:51:24 +01005147 $as_echo_n "(cached) " >&6
5148else
5149 if test -n "$HAS_HG"; then
5150 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5151else
5152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5153for as_dir in $PATH
5154do
5155 IFS=$as_save_IFS
5156 test -z "$as_dir" && as_dir=.
5157 for ac_exec_ext in '' $ac_executable_extensions; do
5158 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5159 ac_cv_prog_HAS_HG="found"
5160 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5161 break 2
5162 fi
5163done
5164 done
5165IFS=$as_save_IFS
5166
5167 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5168fi
5169fi
5170HAS_HG=$ac_cv_prog_HAS_HG
5171if test -n "$HAS_HG"; then
5172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5173$as_echo "$HAS_HG" >&6; }
5174else
5175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5176$as_echo "no" >&6; }
5177fi
5178
5179
5180if test $HAS_HG = found
5181then
5182 HGVERSION="hg id -i \$(srcdir)"
5183 HGTAG="hg id -t \$(srcdir)"
5184 HGBRANCH="hg id -b \$(srcdir)"
5185else
5186 HGVERSION=""
5187 HGTAG=""
5188 HGBRANCH=""
5189fi
5190
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005191case $MACHDEP in
5192bsdos*|hp*|HP*)
5193 # install -d does not work on BSDI or HP-UX
5194 if test -z "$INSTALL"
5195 then
5196 INSTALL="${srcdir}/install-sh -c"
5197 fi
5198esac
5199ac_aux_dir=
5200for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005201 for ac_t in install-sh install.sh shtool; do
5202 if test -f "$ac_dir/$ac_t"; then
5203 ac_aux_dir=$ac_dir
5204 ac_install_sh="$ac_aux_dir/$ac_t -c"
5205 break 2
5206 fi
5207 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005208done
5209if test -z "$ac_aux_dir"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005210 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005211fi
5212
5213# These three variables are undocumented and unsupported,
5214# and are intended to be withdrawn in a future Autoconf release.
5215# They can cause serious problems if a builder's source tree is in a directory
5216# whose full name contains unusual characters.
5217ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5218ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5219ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5220
5221
5222# Find a good install program. We prefer a C program (faster),
5223# so one script is as good as another. But avoid the broken or
5224# incompatible versions:
5225# SysV /etc/install, /usr/sbin/install
5226# SunOS /usr/etc/install
5227# IRIX /sbin/install
5228# AIX /bin/install
5229# AmigaOS /C/install, which installs bootblocks on floppy discs
5230# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5231# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5232# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5233# OS/2's system install, which has a completely different semantic
5234# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005235# Reject install programs that cannot install multiple files.
5236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5237$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238if test -z "$INSTALL"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005239if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005240 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005241else
5242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5243for as_dir in $PATH
5244do
5245 IFS=$as_save_IFS
5246 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005247 # Account for people who put trailing slashes in PATH elements.
5248case $as_dir/ in #((
5249 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005250 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005251 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005252 /usr/ucb/* ) ;;
5253 *)
5254 # OSF1 and SCO ODT 3.0 have their own names for install.
5255 # Don't use installbsd from OSF since it installs stuff as root
5256 # by default.
5257 for ac_prog in ginstall scoinst install; do
5258 for ac_exec_ext in '' $ac_executable_extensions; do
5259 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5260 if test $ac_prog = install &&
5261 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5262 # AIX install. It has an incompatible calling convention.
5263 :
5264 elif test $ac_prog = install &&
5265 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5266 # program-specific install script used by HP pwplus--don't use.
5267 :
5268 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005269 rm -rf conftest.one conftest.two conftest.dir
5270 echo one > conftest.one
5271 echo two > conftest.two
5272 mkdir conftest.dir
5273 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5274 test -s conftest.one && test -s conftest.two &&
5275 test -s conftest.dir/conftest.one &&
5276 test -s conftest.dir/conftest.two
5277 then
5278 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5279 break 3
5280 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005281 fi
5282 fi
5283 done
5284 done
5285 ;;
5286esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005287
5288 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005289IFS=$as_save_IFS
5290
Matthias Kloseb9621712010-04-24 17:59:49 +00005291rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292
5293fi
5294 if test "${ac_cv_path_install+set}" = set; then
5295 INSTALL=$ac_cv_path_install
5296 else
5297 # As a last resort, use the slow shell script. Don't cache a
5298 # value for INSTALL within a source directory, because that will
5299 # break other packages using the cache if that directory is
5300 # removed, or if the value is a relative name.
5301 INSTALL=$ac_install_sh
5302 fi
5303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5305$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005306
5307# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5308# It thinks the first close brace ends the variable substitution.
5309test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5310
5311test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5312
5313test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5314
5315
5316# Not every filesystem supports hard links
5317
5318if test -z "$LN" ; then
5319 case $ac_sys_system in
5320 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321 *) LN=ln;;
5322 esac
5323fi
5324
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005325# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005326
5327ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005328
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005329# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5331$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005332
5333# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005334if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005335 withval=$with_pydebug;
5336if test "$withval" != no
5337then
5338
Matthias Kloseb9621712010-04-24 17:59:49 +00005339$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340
Matthias Kloseb9621712010-04-24 17:59:49 +00005341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5342$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005343 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005344 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005345else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5346$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005347fi
5348else
Matthias Kloseb9621712010-04-24 17:59:49 +00005349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5350$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005351fi
5352
5353
5354# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5355# merged with this chunk of code?
5356
5357# Optimizer/debugger flags
5358# ------------------------
5359# (The following bit of code is complicated enough - please keep things
5360# indented properly. Just pretend you're editing Python code. ;-)
5361
5362# There are two parallel sets of case statements below, one that checks to
5363# see if OPT was set and one that does BASECFLAGS setting based upon
5364# compiler and platform. BASECFLAGS tweaks need to be made even if the
5365# user set OPT.
5366
5367# tweak OPT based on compiler and platform, only if the user didn't set
5368# it on the command line
5369
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005370if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005371then
5372 case $GCC in
5373 yes)
5374 if test "$CC" != 'g++' ; then
5375 STRICT_PROTO="-Wstrict-prototypes"
5376 fi
5377 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5378 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5379 WRAP="-fwrapv"
5380 fi
5381 case $ac_cv_prog_cc_g in
5382 yes)
5383 if test "$Py_DEBUG" = 'true' ; then
5384 # Optimization messes up debuggers, so turn it off for
5385 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005386 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005387 else
5388 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5389 fi
5390 ;;
5391 *)
5392 OPT="-O3 -Wall $STRICT_PROTO"
5393 ;;
5394 esac
5395 case $ac_sys_system in
5396 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5397 ;;
5398 esac
5399 ;;
5400
5401 *)
5402 OPT="-O"
5403 ;;
5404 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405fi
5406
5407
5408
5409# The -arch flags for universal builds on OSX
5410UNIVERSAL_ARCH_FLAGS=
5411
5412
5413# tweak BASECFLAGS based on compiler and platform
5414case $GCC in
5415yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005416 # Python doesn't violate C99 aliasing rules, but older versions of
5417 # GCC produce warnings for legal Python code. Enable
5418 # -fno-strict-aliasing on versions of GCC that support but produce
5419 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5421$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422 ac_save_cc="$CC"
5423 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005424 save_CFLAGS="$CFLAGS"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005425 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005426 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005427else
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005429/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005430
Matthias Kloseb159a552010-04-25 21:00:44 +00005431
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005432int
5433main ()
5434{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005435
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005436 ;
5437 return 0;
5438}
Matthias Kloseb159a552010-04-25 21:00:44 +00005439
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005441if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005442
5443 CC="$ac_save_cc -fstrict-aliasing"
5444 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005446/* end confdefs.h. */
5447
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005448 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005449int
5450main ()
5451{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005452double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005453 ;
5454 return 0;
5455}
Matthias Kloseb159a552010-04-25 21:00:44 +00005456
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005458if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005459
5460 ac_cv_no_strict_aliasing=no
5461
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005462else
Matthias Kloseb159a552010-04-25 21:00:44 +00005463
5464 ac_cv_no_strict_aliasing=yes
5465
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005466fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005468
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005469else
Matthias Kloseb159a552010-04-25 21:00:44 +00005470
5471 ac_cv_no_strict_aliasing=no
5472
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005473fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005475fi
5476
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005477 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005478 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5480$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005481 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005482 then
5483 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5484 fi
5485
5486 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5487 # support. Without this, treatment of subnormals doesn't follow
5488 # the standard.
5489 case $ac_sys_machine in
5490 alpha*)
5491 BASECFLAGS="$BASECFLAGS -mieee"
5492 ;;
5493 esac
5494
5495 case $ac_sys_system in
5496 SCO_SV*)
5497 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5498 ;;
5499 # is there any other compiler on Darwin besides gcc?
5500 Darwin*)
5501 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5502 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005503 if test "${CC}" = gcc
5504 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5506$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005507 case "${UNIVERSALSDK}" in
5508 */MacOSX10.4u.sdk)
5509 # Build using 10.4 SDK, force usage of gcc when the
5510 # compiler is gcc, otherwise the user will get very
5511 # confusing error messages when building on OSX 10.6
5512 CC=gcc-4.0
5513 CPP=cpp-4.0
5514 ;;
5515 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5517$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005518 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005519
5520
5521 if test "${enable_universalsdk}"; then
5522 UNIVERSAL_ARCH_FLAGS=""
5523 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5524 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5525 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005526 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005527 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5528 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005529 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005530 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005531
5532 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5533 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005534 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005535 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005537 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5538 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005539 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005540 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005541
5542 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5543 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005544 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005545 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005546
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005547 else
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005548 as_fn_error "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549
5550 fi
5551
5552
Ronald Oussoren666028b2010-04-18 19:07:43 +00005553 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5554 if test "${UNIVERSALSDK}" != "/"
5555 then
5556 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5557 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005558 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559 fi
5560 fi
5561
5562 # Calculate the right deployment target for this build.
5563 #
5564 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5565 if test ${cur_target} '>' 10.2; then
5566 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005567 if test ${enable_universalsdk}; then
5568 if test "${UNIVERSAL_ARCHS}" = "all"; then
5569 # Ensure that the default platform for a
5570 # 4-way universal build is OSX 10.5,
5571 # that's the first OS release where
5572 # 4-way builds make sense.
5573 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005574
5575 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5576 cur_target='10.5'
5577
5578 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5579 cur_target='10.5'
5580
5581 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5582 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005583 fi
5584 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005585 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005586 # On Intel macs default to a deployment
5587 # target of 10.4, that's the first OSX
5588 # release with Intel support.
5589 cur_target="10.4"
5590 fi
5591 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592 fi
5593 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5594
5595 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5596 # environment with a value that is the same as what we'll use
5597 # in the Makefile to ensure that we'll get the same compiler
5598 # environment during configure and build time.
5599 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5600 export MACOSX_DEPLOYMENT_TARGET
5601 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5602
5603 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604 esac
5605 ;;
5606
5607*)
5608 case $ac_sys_system in
5609 OpenUNIX*|UnixWare*)
5610 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5611 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612 SCO_SV*)
5613 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5614 ;;
5615 esac
5616 ;;
5617esac
5618
5619if test "$Py_DEBUG" = 'true'; then
5620 :
5621else
5622 OPT="-DNDEBUG $OPT"
5623fi
5624
5625if test "$ac_arch_flags"
5626then
5627 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5628fi
5629
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630# Check whether GCC supports PyArg_ParseTuple format
5631if test "$GCC" = "yes"
5632then
Matthias Kloseb9621712010-04-24 17:59:49 +00005633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5634$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635 save_CFLAGS=$CFLAGS
5636 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638/* end confdefs.h. */
5639
5640 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641int
5642main ()
5643{
5644
5645 ;
5646 return 0;
5647}
Matthias Kloseb159a552010-04-25 21:00:44 +00005648
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005650if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651
Matthias Kloseb159a552010-04-25 21:00:44 +00005652
Matthias Kloseb9621712010-04-24 17:59:49 +00005653$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654
Matthias Kloseb159a552010-04-25 21:00:44 +00005655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005656$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005657
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658else
Matthias Kloseb159a552010-04-25 21:00:44 +00005659
5660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005661$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662
5663fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5665 CFLAGS=$save_CFLAGS
5666fi
5667
5668# On some compilers, pthreads are available without further options
5669# (e.g. MacOS X). On some of these systems, the compiler will not
5670# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5671# So we have to see first whether pthreads are available without
5672# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5674$as_echo_n "checking whether pthreads are available without options... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005675if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005676 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677else
Matthias Kloseb9621712010-04-24 17:59:49 +00005678 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 ac_cv_pthread_is_default=no
5680else
Matthias Kloseb9621712010-04-24 17:59:49 +00005681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682/* end confdefs.h. */
5683
5684#include <pthread.h>
5685
5686void* routine(void* p){return NULL;}
5687
5688int main(){
5689 pthread_t p;
5690 if(pthread_create(&p,NULL,routine,NULL)!=0)
5691 return 1;
5692 (void)pthread_detach(p);
5693 return 0;
5694}
5695
5696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005697if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698
5699 ac_cv_pthread_is_default=yes
5700 ac_cv_kthread=no
5701 ac_cv_pthread=no
5702
5703else
Matthias Kloseb9621712010-04-24 17:59:49 +00005704 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5707 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708fi
5709
5710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711fi
5712
Matthias Kloseb9621712010-04-24 17:59:49 +00005713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5714$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715
5716
5717if test $ac_cv_pthread_is_default = yes
5718then
5719 ac_cv_kpthread=no
5720else
5721# -Kpthread, if available, provides the right #defines
5722# and linker options to make pthread_create available
5723# Some compilers won't report that they do not support -Kpthread,
5724# so we need to run a program to see whether it really made the
5725# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5727$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005728if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005729 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730else
5731 ac_save_cc="$CC"
5732CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005733if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734 ac_cv_kpthread=no
5735else
Matthias Kloseb9621712010-04-24 17:59:49 +00005736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737/* end confdefs.h. */
5738
5739#include <pthread.h>
5740
5741void* routine(void* p){return NULL;}
5742
5743int main(){
5744 pthread_t p;
5745 if(pthread_create(&p,NULL,routine,NULL)!=0)
5746 return 1;
5747 (void)pthread_detach(p);
5748 return 0;
5749}
5750
5751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005752if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753 ac_cv_kpthread=yes
5754else
Matthias Kloseb9621712010-04-24 17:59:49 +00005755 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5758 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759fi
5760
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761CC="$ac_save_cc"
5762fi
5763
Matthias Kloseb9621712010-04-24 17:59:49 +00005764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5765$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766fi
5767
5768if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5769then
5770# -Kthread, if available, provides the right #defines
5771# and linker options to make pthread_create available
5772# Some compilers won't report that they do not support -Kthread,
5773# so we need to run a program to see whether it really made the
5774# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5776$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005777if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005778 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779else
5780 ac_save_cc="$CC"
5781CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005782if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783 ac_cv_kthread=no
5784else
Matthias Kloseb9621712010-04-24 17:59:49 +00005785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786/* end confdefs.h. */
5787
5788#include <pthread.h>
5789
5790void* routine(void* p){return NULL;}
5791
5792int main(){
5793 pthread_t p;
5794 if(pthread_create(&p,NULL,routine,NULL)!=0)
5795 return 1;
5796 (void)pthread_detach(p);
5797 return 0;
5798}
5799
5800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005801if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802 ac_cv_kthread=yes
5803else
Matthias Kloseb9621712010-04-24 17:59:49 +00005804 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5807 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808fi
5809
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810CC="$ac_save_cc"
5811fi
5812
Matthias Kloseb9621712010-04-24 17:59:49 +00005813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5814$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815fi
5816
5817if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5818then
5819# -pthread, if available, provides the right #defines
5820# and linker options to make pthread_create available
5821# Some compilers won't report that they do not support -pthread,
5822# so we need to run a program to see whether it really made the
5823# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5825$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005826if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005827 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828else
5829 ac_save_cc="$CC"
5830CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005831if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832 ac_cv_pthread=no
5833else
Matthias Kloseb9621712010-04-24 17:59:49 +00005834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835/* end confdefs.h. */
5836
5837#include <pthread.h>
5838
5839void* routine(void* p){return NULL;}
5840
5841int main(){
5842 pthread_t p;
5843 if(pthread_create(&p,NULL,routine,NULL)!=0)
5844 return 1;
5845 (void)pthread_detach(p);
5846 return 0;
5847}
5848
5849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005850if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851 ac_cv_pthread=yes
5852else
Matthias Kloseb9621712010-04-24 17:59:49 +00005853 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5856 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857fi
5858
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859CC="$ac_save_cc"
5860fi
5861
Matthias Kloseb9621712010-04-24 17:59:49 +00005862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5863$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864fi
5865
5866# If we have set a CC compiler flag for thread support then
5867# check if it works for CXX, too.
5868ac_cv_cxx_thread=no
5869if test ! -z "$CXX"
5870then
Matthias Kloseb9621712010-04-24 17:59:49 +00005871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5872$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873ac_save_cxx="$CXX"
5874
5875if test "$ac_cv_kpthread" = "yes"
5876then
5877 CXX="$CXX -Kpthread"
5878 ac_cv_cxx_thread=yes
5879elif test "$ac_cv_kthread" = "yes"
5880then
5881 CXX="$CXX -Kthread"
5882 ac_cv_cxx_thread=yes
5883elif test "$ac_cv_pthread" = "yes"
5884then
5885 CXX="$CXX -pthread"
5886 ac_cv_cxx_thread=yes
5887fi
5888
5889if test $ac_cv_cxx_thread = yes
5890then
5891 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5892 $CXX -c conftest.$ac_ext 2>&5
5893 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5894 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5895 then
5896 ac_cv_cxx_thread=yes
5897 else
5898 ac_cv_cxx_thread=no
5899 fi
5900 rm -fr conftest*
5901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5903$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904fi
5905CXX="$ac_save_cxx"
5906
5907
5908# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5910$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005911if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005912 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913else
Matthias Kloseb9621712010-04-24 17:59:49 +00005914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915/* end confdefs.h. */
5916#include <stdlib.h>
5917#include <stdarg.h>
5918#include <string.h>
5919#include <float.h>
5920
5921int
5922main ()
5923{
5924
5925 ;
5926 return 0;
5927}
5928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005929if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930 ac_cv_header_stdc=yes
5931else
Matthias Kloseb9621712010-04-24 17:59:49 +00005932 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5935
5936if test $ac_cv_header_stdc = yes; then
5937 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939/* end confdefs.h. */
5940#include <string.h>
5941
5942_ACEOF
5943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005944 $EGREP "memchr" >/dev/null 2>&1; then :
5945
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946else
5947 ac_cv_header_stdc=no
5948fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005949rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950
5951fi
5952
5953if test $ac_cv_header_stdc = yes; then
5954 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956/* end confdefs.h. */
5957#include <stdlib.h>
5958
5959_ACEOF
5960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005961 $EGREP "free" >/dev/null 2>&1; then :
5962
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963else
5964 ac_cv_header_stdc=no
5965fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005966rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967
5968fi
5969
5970if test $ac_cv_header_stdc = yes; then
5971 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005972 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973 :
5974else
Matthias Kloseb9621712010-04-24 17:59:49 +00005975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976/* end confdefs.h. */
5977#include <ctype.h>
5978#include <stdlib.h>
5979#if ((' ' & 0x0FF) == 0x020)
5980# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5981# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5982#else
5983# define ISLOWER(c) \
5984 (('a' <= (c) && (c) <= 'i') \
5985 || ('j' <= (c) && (c) <= 'r') \
5986 || ('s' <= (c) && (c) <= 'z'))
5987# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5988#endif
5989
5990#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5991int
5992main ()
5993{
5994 int i;
5995 for (i = 0; i < 256; i++)
5996 if (XOR (islower (i), ISLOWER (i))
5997 || toupper (i) != TOUPPER (i))
5998 return 2;
5999 return 0;
6000}
6001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006002if ac_fn_c_try_run "$LINENO"; then :
6003
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004else
Matthias Kloseb9621712010-04-24 17:59:49 +00006005 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006007rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6008 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009fi
6010
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011fi
6012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6014$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015if test $ac_cv_header_stdc = yes; then
6016
Matthias Kloseb9621712010-04-24 17:59:49 +00006017$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018
6019fi
6020
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006021for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6022fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006023ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006024shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006025unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006026sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6027sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006028sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6029sys/stat.h sys/termio.h sys/time.h \
6030sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
6031libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006032bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006033do :
6034 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6035ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006036eval as_val=\$$as_ac_Header
6037 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006038 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006039#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006040_ACEOF
6041
6042fi
6043
Guido van Rossum627b2d71993-12-24 10:39:16 +00006044done
6045
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006046ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006047for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006048 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6050$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006051if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006052 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006053else
Matthias Kloseb9621712010-04-24 17:59:49 +00006054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006055/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006056#include <sys/types.h>
6057#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006058
Martin v. Löwis11437992002-04-12 09:54:03 +00006059int
6060main ()
6061{
6062if ((DIR *) 0)
6063return 0;
6064 ;
6065 return 0;
6066}
6067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006068if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006069 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006070else
Matthias Kloseb9621712010-04-24 17:59:49 +00006071 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006075eval ac_res=\$$as_ac_Header
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6077$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006078eval as_val=\$$as_ac_Header
6079 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006080 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006081#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006082_ACEOF
6083
6084ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006085fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006087done
6088# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6089if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6091$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006092if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006093 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006094else
Martin v. Löwis11437992002-04-12 09:54:03 +00006095 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006097/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006098
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006099/* Override any GCC internal prototype to avoid an error.
6100 Use char because int might match the return type of a GCC
6101 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006102#ifdef __cplusplus
6103extern "C"
6104#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006105char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006106int
6107main ()
6108{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006109return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006110 ;
6111 return 0;
6112}
6113_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006114for ac_lib in '' dir; do
6115 if test -z "$ac_lib"; then
6116 ac_res="none required"
6117 else
6118 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006119 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006120 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006121 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006122 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006124rm -f core conftest.err conftest.$ac_objext \
6125 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006126 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006127 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006129done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006130if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006132else
6133 ac_cv_search_opendir=no
6134fi
6135rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006136LIBS=$ac_func_search_save_LIBS
6137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6139$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006140ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006141if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006142 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006143
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006144fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006145
Michael W. Hudson54241132001-12-07 15:38:26 +00006146else
Matthias Kloseb9621712010-04-24 17:59:49 +00006147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6148$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006149if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006150 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006151else
6152 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006156/* Override any GCC internal prototype to avoid an error.
6157 Use char because int might match the return type of a GCC
6158 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006159#ifdef __cplusplus
6160extern "C"
6161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006162char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006163int
6164main ()
6165{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006166return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006167 ;
6168 return 0;
6169}
6170_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006171for ac_lib in '' x; do
6172 if test -z "$ac_lib"; then
6173 ac_res="none required"
6174 else
6175 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006176 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006177 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006178 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006179 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006181rm -f core conftest.err conftest.$ac_objext \
6182 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006183 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006184 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006186done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006187if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006189else
6190 ac_cv_search_opendir=no
6191fi
6192rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006193LIBS=$ac_func_search_save_LIBS
6194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6196$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006197ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006198if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006199 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006200
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006201fi
6202
6203fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006204
Matthias Kloseb9621712010-04-24 17:59:49 +00006205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6206$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006207if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006208 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006209else
Matthias Kloseb9621712010-04-24 17:59:49 +00006210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006211/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006212#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213int
6214main ()
6215{
6216return makedev(0, 0);
6217 ;
6218 return 0;
6219}
6220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006221if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222 ac_cv_header_sys_types_h_makedev=yes
6223else
Matthias Kloseb9621712010-04-24 17:59:49 +00006224 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006226rm -f core conftest.err conftest.$ac_objext \
6227 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006228
6229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6231$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232
6233if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006234ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006235if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006236
Matthias Kloseb9621712010-04-24 17:59:49 +00006237$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238
6239fi
6240
6241
6242
6243 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006244 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006245if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006246
Matthias Kloseb9621712010-04-24 17:59:49 +00006247$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248
6249fi
6250
6251
6252 fi
6253fi
6254
Michael W. Hudson54241132001-12-07 15:38:26 +00006255
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006256# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006257for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006258do :
6259 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006260#ifdef HAVE_CURSES_H
6261#include <curses.h>
6262#endif
6263
Matthias Kloseb9621712010-04-24 17:59:49 +00006264"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006265if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006266 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006267#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006268_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006269
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006270fi
6271
6272done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006273
6274
Martin v. Löwis11017b12006-01-14 18:12:57 +00006275# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006276for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006277do :
6278 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 +00006279#ifdef HAVE_ASM_TYPES_H
6280#include <asm/types.h>
6281#endif
6282#ifdef HAVE_SYS_SOCKET_H
6283#include <sys/socket.h>
6284#endif
6285
Matthias Kloseb9621712010-04-24 17:59:49 +00006286"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006287if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006288 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006289#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006290_ACEOF
6291
6292fi
6293
6294done
6295
6296
Guido van Rossum627b2d71993-12-24 10:39:16 +00006297# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006298was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6300$as_echo_n "checking for clock_t in time.h... " >&6; }
6301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006302/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006303#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006304
6305_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006306if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006307 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006308 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006309else
Martin v. Löwis11437992002-04-12 09:54:03 +00006310
6311
Matthias Kloseb9621712010-04-24 17:59:49 +00006312$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006313
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006314
Guido van Rossum627b2d71993-12-24 10:39:16 +00006315fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006316rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006317
Matthias Kloseb9621712010-04-24 17:59:49 +00006318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6319$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006320
Matthias Kloseb9621712010-04-24 17:59:49 +00006321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6322$as_echo_n "checking for makedev... " >&6; }
6323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006324/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006325
Jesus Cea740f53a2010-04-28 11:35:30 +00006326#if defined(MAJOR_IN_MKDEV)
6327#include <sys/mkdev.h>
6328#elif defined(MAJOR_IN_SYSMACROS)
6329#include <sys/sysmacros.h>
6330#else
6331#include <sys/types.h>
6332#endif
6333
Neal Norwitz11690112002-07-30 01:08:28 +00006334int
6335main ()
6336{
Jesus Cea740f53a2010-04-28 11:35:30 +00006337
6338 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006339 ;
6340 return 0;
6341}
Matthias Kloseb159a552010-04-25 21:00:44 +00006342
Neal Norwitz11690112002-07-30 01:08:28 +00006343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006344if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006345 ac_cv_has_makedev=yes
6346else
Matthias Kloseb9621712010-04-24 17:59:49 +00006347 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006349rm -f core conftest.err conftest.$ac_objext \
6350 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6352$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006353if test "$ac_cv_has_makedev" = "yes"; then
6354
Matthias Kloseb9621712010-04-24 17:59:49 +00006355$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006356
6357fi
6358
Martin v. Löwis399a6892002-10-04 10:22:02 +00006359# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6360# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6361# defined, but the compiler does not support pragma redefine_extname,
6362# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6363# structures (such as rlimit64) without declaring them. As a
6364# work-around, disable LFS on such configurations
6365
6366use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6368$as_echo_n "checking Solaris LFS bug... " >&6; }
6369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006370/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006371
6372#define _LARGEFILE_SOURCE 1
6373#define _FILE_OFFSET_BITS 64
6374#include <sys/resource.h>
6375
Martin v. Löwis399a6892002-10-04 10:22:02 +00006376int
6377main ()
6378{
6379struct rlimit foo;
6380 ;
6381 return 0;
6382}
6383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006384if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006385 sol_lfs_bug=no
6386else
Matthias Kloseb9621712010-04-24 17:59:49 +00006387 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6391$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006392if test "$sol_lfs_bug" = "yes"; then
6393 use_lfs=no
6394fi
6395
6396if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006397# Two defines needed to enable largefile support on various platforms
6398# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006399case $ac_sys_system/$ac_sys_release in
6400AIX*)
6401
6402$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6403
6404 ;;
6405esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006406
Matthias Kloseb9621712010-04-24 17:59:49 +00006407$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006408
6409
Matthias Kloseb9621712010-04-24 17:59:49 +00006410$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006411
Martin v. Löwis399a6892002-10-04 10:22:02 +00006412fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006413
Guido van Rossum84e7b241996-08-19 21:59:00 +00006414# Add some code to confdefs.h so that the test for off_t works on SCO
6415cat >> confdefs.h <<\EOF
6416#if defined(SCO_DS)
6417#undef _OFF_T
6418#endif
6419EOF
6420
Guido van Rossumef2255b2000-03-10 22:30:29 +00006421# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006422ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006423if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006424
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006425else
Martin v. Löwis11437992002-04-12 09:54:03 +00006426
6427cat >>confdefs.h <<_ACEOF
6428#define mode_t int
6429_ACEOF
6430
6431fi
6432
Matthias Kloseb9621712010-04-24 17:59:49 +00006433ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006434if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006435
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006436else
Martin v. Löwis11437992002-04-12 09:54:03 +00006437
6438cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006439#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006440_ACEOF
6441
6442fi
6443
Matthias Kloseb9621712010-04-24 17:59:49 +00006444ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006445if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006446
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006447else
Martin v. Löwis11437992002-04-12 09:54:03 +00006448
6449cat >>confdefs.h <<_ACEOF
6450#define pid_t int
6451_ACEOF
6452
6453fi
6454
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006455
Martin v. Löwis11437992002-04-12 09:54:03 +00006456cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006457#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006458_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006459
Matthias Kloseb9621712010-04-24 17:59:49 +00006460ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006461if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006462
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006463else
Martin v. Löwis11437992002-04-12 09:54:03 +00006464
6465cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006466#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006467_ACEOF
6468
6469fi
6470
Matthias Kloseb9621712010-04-24 17:59:49 +00006471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6472$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006473if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006474 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006475else
Matthias Kloseb9621712010-04-24 17:59:49 +00006476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006477/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006478#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006479
6480_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006481if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006482 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006483 ac_cv_type_uid_t=yes
6484else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006485 ac_cv_type_uid_t=no
6486fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006487rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006488
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6491$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006492if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006493
Matthias Kloseb9621712010-04-24 17:59:49 +00006494$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006495
6496
Matthias Kloseb9621712010-04-24 17:59:49 +00006497$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006498
6499fi
6500
Matthias Kloseb9621712010-04-24 17:59:49 +00006501ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6502case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006503 no|yes) ;; #(
6504 *)
6505
Matthias Kloseb9621712010-04-24 17:59:49 +00006506$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006507
6508
6509cat >>confdefs.h <<_ACEOF
6510#define uint32_t $ac_cv_c_uint32_t
6511_ACEOF
6512;;
6513 esac
6514
Matthias Kloseb9621712010-04-24 17:59:49 +00006515ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6516case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006517 no|yes) ;; #(
6518 *)
6519
Matthias Kloseb9621712010-04-24 17:59:49 +00006520$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006521
6522
6523cat >>confdefs.h <<_ACEOF
6524#define uint64_t $ac_cv_c_uint64_t
6525_ACEOF
6526;;
6527 esac
6528
Matthias Kloseb9621712010-04-24 17:59:49 +00006529ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6530case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006531 no|yes) ;; #(
6532 *)
6533
6534cat >>confdefs.h <<_ACEOF
6535#define int32_t $ac_cv_c_int32_t
6536_ACEOF
6537;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006538esac
6539
Matthias Kloseb9621712010-04-24 17:59:49 +00006540ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6541case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006542 no|yes) ;; #(
6543 *)
6544
6545cat >>confdefs.h <<_ACEOF
6546#define int64_t $ac_cv_c_int64_t
6547_ACEOF
6548;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006549esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006550
Matthias Kloseb9621712010-04-24 17:59:49 +00006551ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006552if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006553
Matthias Kloseb9621712010-04-24 17:59:49 +00006554$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006555
6556fi
6557
Jack Jansendd19cf82001-12-06 22:36:17 +00006558
Michael W. Hudson54241132001-12-07 15:38:26 +00006559# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006560# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006561# The cast to long int works around a bug in the HP C Compiler
6562# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6563# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6564# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6566$as_echo_n "checking size of int... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006567if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006568 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006569else
Matthias Kloseb9621712010-04-24 17:59:49 +00006570 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 +00006571
Martin v. Löwis11437992002-04-12 09:54:03 +00006572else
Matthias Kloseb9621712010-04-24 17:59:49 +00006573 if test "$ac_cv_type_int" = yes; then
6574 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6575$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006576{ as_fn_set_status 77
6577as_fn_error "cannot compute sizeof (int)
6578See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006579 else
6580 ac_cv_sizeof_int=0
6581 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006583
Martin v. Löwis11437992002-04-12 09:54:03 +00006584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6586$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006587
6588
6589
Martin v. Löwis11437992002-04-12 09:54:03 +00006590cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006591#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006592_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006593
6594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006595# The cast to long int works around a bug in the HP C Compiler
6596# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6597# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6598# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6600$as_echo_n "checking size of long... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006601if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006602 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006603else
Matthias Kloseb9621712010-04-24 17:59:49 +00006604 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 +00006605
Martin v. Löwis11437992002-04-12 09:54:03 +00006606else
Matthias Kloseb9621712010-04-24 17:59:49 +00006607 if test "$ac_cv_type_long" = yes; then
6608 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006610{ as_fn_set_status 77
6611as_fn_error "cannot compute sizeof (long)
6612See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006613 else
6614 ac_cv_sizeof_long=0
6615 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006617
Martin v. Löwis11437992002-04-12 09:54:03 +00006618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6620$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006621
6622
6623
Martin v. Löwis11437992002-04-12 09:54:03 +00006624cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006625#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006626_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006627
6628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006629# The cast to long int works around a bug in the HP C Compiler
6630# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6631# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6632# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6634$as_echo_n "checking size of void *... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006635if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006636 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006637else
Matthias Kloseb9621712010-04-24 17:59:49 +00006638 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 +00006639
Martin v. Löwis11437992002-04-12 09:54:03 +00006640else
Matthias Kloseb9621712010-04-24 17:59:49 +00006641 if test "$ac_cv_type_void_p" = yes; then
6642 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006644{ as_fn_set_status 77
6645as_fn_error "cannot compute sizeof (void *)
6646See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006647 else
6648 ac_cv_sizeof_void_p=0
6649 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006651
Martin v. Löwis11437992002-04-12 09:54:03 +00006652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6654$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006655
6656
6657
Martin v. Löwis11437992002-04-12 09:54:03 +00006658cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006659#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006660_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006661
6662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006663# The cast to long int works around a bug in the HP C Compiler
6664# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6665# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6666# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6668$as_echo_n "checking size of short... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006669if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006670 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006671else
Matthias Kloseb9621712010-04-24 17:59:49 +00006672 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 +00006673
Martin v. Löwis11437992002-04-12 09:54:03 +00006674else
Matthias Kloseb9621712010-04-24 17:59:49 +00006675 if test "$ac_cv_type_short" = yes; then
6676 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006678{ as_fn_set_status 77
6679as_fn_error "cannot compute sizeof (short)
6680See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006681 else
6682 ac_cv_sizeof_short=0
6683 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006685
Martin v. Löwis11437992002-04-12 09:54:03 +00006686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6688$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006689
6690
6691
Martin v. Löwis11437992002-04-12 09:54:03 +00006692cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006693#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006694_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006695
6696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006697# The cast to long int works around a bug in the HP C Compiler
6698# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6699# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6700# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6702$as_echo_n "checking size of float... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006703if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006704 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006705else
Matthias Kloseb9621712010-04-24 17:59:49 +00006706 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 +00006707
Martin v. Löwis11437992002-04-12 09:54:03 +00006708else
Matthias Kloseb9621712010-04-24 17:59:49 +00006709 if test "$ac_cv_type_float" = yes; then
6710 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6711$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006712{ as_fn_set_status 77
6713as_fn_error "cannot compute sizeof (float)
6714See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006715 else
6716 ac_cv_sizeof_float=0
6717 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006719
Martin v. Löwis11437992002-04-12 09:54:03 +00006720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6722$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006723
6724
6725
Martin v. Löwis11437992002-04-12 09:54:03 +00006726cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006727#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006728_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006729
6730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006731# The cast to long int works around a bug in the HP C Compiler
6732# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6733# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6734# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6736$as_echo_n "checking size of double... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006737if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006738 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006739else
Matthias Kloseb9621712010-04-24 17:59:49 +00006740 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 +00006741
Martin v. Löwis11437992002-04-12 09:54:03 +00006742else
Matthias Kloseb9621712010-04-24 17:59:49 +00006743 if test "$ac_cv_type_double" = yes; then
6744 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6745$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006746{ as_fn_set_status 77
6747as_fn_error "cannot compute sizeof (double)
6748See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006749 else
6750 ac_cv_sizeof_double=0
6751 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006753
Martin v. Löwis11437992002-04-12 09:54:03 +00006754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6756$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006757
6758
6759
Martin v. Löwis11437992002-04-12 09:54:03 +00006760cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006761#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006762_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006763
6764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006765# The cast to long int works around a bug in the HP C Compiler
6766# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6767# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6768# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6770$as_echo_n "checking size of fpos_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006771if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006772 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006773else
Matthias Kloseb9621712010-04-24 17:59:49 +00006774 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 +00006775
Martin v. Löwis11437992002-04-12 09:54:03 +00006776else
Matthias Kloseb9621712010-04-24 17:59:49 +00006777 if test "$ac_cv_type_fpos_t" = yes; then
6778 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006780{ as_fn_set_status 77
6781as_fn_error "cannot compute sizeof (fpos_t)
6782See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006783 else
6784 ac_cv_sizeof_fpos_t=0
6785 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006787
Martin v. Löwis11437992002-04-12 09:54:03 +00006788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6790$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006791
6792
6793
Martin v. Löwis11437992002-04-12 09:54:03 +00006794cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006795#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006796_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006797
Michael W. Hudson54241132001-12-07 15:38:26 +00006798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006799# The cast to long int works around a bug in the HP C Compiler
6800# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6801# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6802# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6804$as_echo_n "checking size of size_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006805if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006807else
Matthias Kloseb9621712010-04-24 17:59:49 +00006808 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 +00006809
Martin v. Löwis18e16552006-02-15 17:27:45 +00006810else
Matthias Kloseb9621712010-04-24 17:59:49 +00006811 if test "$ac_cv_type_size_t" = yes; then
6812 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6813$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006814{ as_fn_set_status 77
6815as_fn_error "cannot compute sizeof (size_t)
6816See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006817 else
6818 ac_cv_sizeof_size_t=0
6819 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006821
Martin v. Löwis18e16552006-02-15 17:27:45 +00006822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6824$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006825
6826
6827
Martin v. Löwis18e16552006-02-15 17:27:45 +00006828cat >>confdefs.h <<_ACEOF
6829#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6830_ACEOF
6831
6832
Christian Heimes400adb02008-02-01 08:12:03 +00006833# The cast to long int works around a bug in the HP C Compiler
6834# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6835# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6836# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6838$as_echo_n "checking size of pid_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006839if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006840 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006841else
Matthias Kloseb9621712010-04-24 17:59:49 +00006842 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00006843
Christian Heimes400adb02008-02-01 08:12:03 +00006844else
Matthias Kloseb9621712010-04-24 17:59:49 +00006845 if test "$ac_cv_type_pid_t" = yes; then
6846 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6847$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006848{ as_fn_set_status 77
6849as_fn_error "cannot compute sizeof (pid_t)
6850See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006851 else
6852 ac_cv_sizeof_pid_t=0
6853 fi
6854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006855
Christian Heimes400adb02008-02-01 08:12:03 +00006856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6858$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006859
6860
6861
6862cat >>confdefs.h <<_ACEOF
6863#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6864_ACEOF
6865
6866
Michael W. Hudson54241132001-12-07 15:38:26 +00006867
Matthias Kloseb9621712010-04-24 17:59:49 +00006868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6869$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006870have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006872/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006873
Martin v. Löwis11437992002-04-12 09:54:03 +00006874int
6875main ()
6876{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006877long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006878 ;
6879 return 0;
6880}
6881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006882if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006883
6884
Matthias Kloseb9621712010-04-24 17:59:49 +00006885$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006886
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006887 have_long_long=yes
6888
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6892$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006893if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006894# The cast to long int works around a bug in the HP C Compiler
6895# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6896# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6897# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6899$as_echo_n "checking size of long long... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006900if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006901 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006902else
Matthias Kloseb9621712010-04-24 17:59:49 +00006903 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 +00006904
Martin v. Löwis11437992002-04-12 09:54:03 +00006905else
Matthias Kloseb9621712010-04-24 17:59:49 +00006906 if test "$ac_cv_type_long_long" = yes; then
6907 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6908$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006909{ as_fn_set_status 77
6910as_fn_error "cannot compute sizeof (long long)
6911See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006912 else
6913 ac_cv_sizeof_long_long=0
6914 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006916
Martin v. Löwis11437992002-04-12 09:54:03 +00006917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6919$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006920
6921
6922
Martin v. Löwis11437992002-04-12 09:54:03 +00006923cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006924#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006925_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006926
Michael W. Hudson54241132001-12-07 15:38:26 +00006927
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006928fi
6929
Matthias Kloseb9621712010-04-24 17:59:49 +00006930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6931$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006932have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006934/* end confdefs.h. */
6935
6936int
6937main ()
6938{
6939long double x; x = (long double)0;
6940 ;
6941 return 0;
6942}
6943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006944if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006945
6946
Matthias Kloseb9621712010-04-24 17:59:49 +00006947$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006948
6949 have_long_double=yes
6950
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006951fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6954$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006955if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006956# The cast to long int works around a bug in the HP C Compiler
6957# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6958# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6959# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6961$as_echo_n "checking size of long double... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006962if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006963 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006964else
Matthias Kloseb9621712010-04-24 17:59:49 +00006965 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006966
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006967else
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 if test "$ac_cv_type_long_double" = yes; then
6969 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006971{ as_fn_set_status 77
6972as_fn_error "cannot compute sizeof (long double)
6973See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006974 else
6975 ac_cv_sizeof_long_double=0
6976 fi
6977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006978
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6981$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006982
6983
6984
6985cat >>confdefs.h <<_ACEOF
6986#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6987_ACEOF
6988
6989
6990fi
6991
6992
Matthias Kloseb9621712010-04-24 17:59:49 +00006993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6994$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006995have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006997/* end confdefs.h. */
6998
6999int
7000main ()
7001{
7002_Bool x; x = (_Bool)0;
7003 ;
7004 return 0;
7005}
7006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007007if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007008
7009
Matthias Kloseb9621712010-04-24 17:59:49 +00007010$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007011
7012 have_c99_bool=yes
7013
Thomas Woutersb2137042007-02-01 18:02:27 +00007014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7017$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007018if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007019# The cast to long int works around a bug in the HP C Compiler
7020# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7021# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7022# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7024$as_echo_n "checking size of _Bool... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007025if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007026 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007027else
Matthias Kloseb9621712010-04-24 17:59:49 +00007028 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007029
Thomas Woutersb2137042007-02-01 18:02:27 +00007030else
Matthias Kloseb9621712010-04-24 17:59:49 +00007031 if test "$ac_cv_type__Bool" = yes; then
7032 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007034{ as_fn_set_status 77
7035as_fn_error "cannot compute sizeof (_Bool)
7036See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007037 else
7038 ac_cv_sizeof__Bool=0
7039 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007041
Thomas Woutersb2137042007-02-01 18:02:27 +00007042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7044$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007045
7046
7047
Thomas Woutersb2137042007-02-01 18:02:27 +00007048cat >>confdefs.h <<_ACEOF
7049#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7050_ACEOF
7051
7052
7053fi
7054
Matthias Kloseb9621712010-04-24 17:59:49 +00007055ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007056 #include <stdint.h>
7057 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007058 #ifdef HAVE_INTTYPES_H
7059 #include <inttypes.h>
7060 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007061"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007062if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007063
7064cat >>confdefs.h <<_ACEOF
7065#define HAVE_UINTPTR_T 1
7066_ACEOF
7067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007068# The cast to long int works around a bug in the HP C Compiler
7069# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7070# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7071# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7073$as_echo_n "checking size of uintptr_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007074if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007075 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007076else
Matthias Kloseb9621712010-04-24 17:59:49 +00007077 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 +00007078
Martin v. Löwis11437992002-04-12 09:54:03 +00007079else
Matthias Kloseb9621712010-04-24 17:59:49 +00007080 if test "$ac_cv_type_uintptr_t" = yes; then
7081 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7082$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007083{ as_fn_set_status 77
7084as_fn_error "cannot compute sizeof (uintptr_t)
7085See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007086 else
7087 ac_cv_sizeof_uintptr_t=0
7088 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007090
Martin v. Löwis11437992002-04-12 09:54:03 +00007091fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7093$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007094
7095
7096
Martin v. Löwis11437992002-04-12 09:54:03 +00007097cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007098#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007099_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007100
Michael W. Hudson54241132001-12-07 15:38:26 +00007101
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007102fi
7103
Thomas Wouters89f507f2006-12-13 04:49:30 +00007104
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007105# The cast to long int works around a bug in the HP C Compiler
7106# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7107# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7108# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7110$as_echo_n "checking size of off_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007111if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007112 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007113else
Matthias Kloseb9621712010-04-24 17:59:49 +00007114 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007115#ifdef HAVE_SYS_TYPES_H
7116#include <sys/types.h>
7117#endif
7118
Matthias Kloseb9621712010-04-24 17:59:49 +00007119"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007120
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007121else
Matthias Kloseb9621712010-04-24 17:59:49 +00007122 if test "$ac_cv_type_off_t" = yes; then
7123 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7124$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007125{ as_fn_set_status 77
7126as_fn_error "cannot compute sizeof (off_t)
7127See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007128 else
7129 ac_cv_sizeof_off_t=0
7130 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007131fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007132
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7135$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007136
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007137
7138
Martin v. Löwis11437992002-04-12 09:54:03 +00007139cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007140#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007141_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007142
Michael W. Hudson54241132001-12-07 15:38:26 +00007143
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007144
Matthias Kloseb9621712010-04-24 17:59:49 +00007145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7146$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007147if test "$have_long_long" = yes
7148then
7149if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007150 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007151
Matthias Kloseb9621712010-04-24 17:59:49 +00007152$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007153
Matthias Kloseb9621712010-04-24 17:59:49 +00007154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7155$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007156else
Matthias Kloseb9621712010-04-24 17:59:49 +00007157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7158$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007159fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007160else
Matthias Kloseb9621712010-04-24 17:59:49 +00007161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7162$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007163fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007164
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007165# The cast to long int works around a bug in the HP C Compiler
7166# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7167# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7168# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7170$as_echo_n "checking size of time_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007171if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007172 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007173else
Matthias Kloseb9621712010-04-24 17:59:49 +00007174 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007175#ifdef HAVE_SYS_TYPES_H
7176#include <sys/types.h>
7177#endif
7178#ifdef HAVE_TIME_H
7179#include <time.h>
7180#endif
7181
Matthias Kloseb9621712010-04-24 17:59:49 +00007182"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007183
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007184else
Matthias Kloseb9621712010-04-24 17:59:49 +00007185 if test "$ac_cv_type_time_t" = yes; then
7186 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7187$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007188{ as_fn_set_status 77
7189as_fn_error "cannot compute sizeof (time_t)
7190See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007191 else
7192 ac_cv_sizeof_time_t=0
7193 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007195
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007196fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7198$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007199
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007200
7201
Martin v. Löwis11437992002-04-12 09:54:03 +00007202cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007203#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007204_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007205
Michael W. Hudson54241132001-12-07 15:38:26 +00007206
7207
Trent Mick635f6fb2000-08-23 21:33:05 +00007208# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007209ac_save_cc="$CC"
7210if test "$ac_cv_kpthread" = "yes"
7211then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007212elif test "$ac_cv_kthread" = "yes"
7213then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007214elif test "$ac_cv_pthread" = "yes"
7215then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007216fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007217
Matthias Kloseb9621712010-04-24 17:59:49 +00007218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7219$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007220have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007222/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007223
7224 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007225int
7226main ()
7227{
Guido van Rossum12580492000-09-24 16:47:19 +00007228pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007229 ;
7230 return 0;
7231}
Matthias Kloseb159a552010-04-25 21:00:44 +00007232
Martin v. Löwis11437992002-04-12 09:54:03 +00007233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007234if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007235 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7239$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007240if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007241 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007242# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7243# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7244# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7246$as_echo_n "checking size of pthread_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007247if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007248 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007249else
Matthias Kloseb9621712010-04-24 17:59:49 +00007250 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007251#ifdef HAVE_PTHREAD_H
7252#include <pthread.h>
7253#endif
7254
Matthias Kloseb9621712010-04-24 17:59:49 +00007255"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007256
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007257else
Matthias Kloseb9621712010-04-24 17:59:49 +00007258 if test "$ac_cv_type_pthread_t" = yes; then
7259 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7260$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007261{ as_fn_set_status 77
7262as_fn_error "cannot compute sizeof (pthread_t)
7263See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007264 else
7265 ac_cv_sizeof_pthread_t=0
7266 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007268
Trent Mick635f6fb2000-08-23 21:33:05 +00007269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7271$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007272
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007273
7274
Martin v. Löwis11437992002-04-12 09:54:03 +00007275cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007276#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007277_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007278
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007279
Trent Mick635f6fb2000-08-23 21:33:05 +00007280fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007281CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007282
Michael W. Hudson54241132001-12-07 15:38:26 +00007283
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007284case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007285 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007286 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7287 ;;
7288 Darwin/*)
7289 OTHER_LIBTOOL_OPT=""
7290 ;;
7291esac
7292
7293
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007294ARCH_RUN_32BIT=""
7295
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007296case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007297 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007298 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7299 if test "${enable_universalsdk}"; then
7300 :
7301 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007302 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007303 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007304 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007305 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007306 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007307 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007308 if test ${gcc_version} '<' 4.0
7309 then
7310 LIBTOOL_CRUFT="-lcc_dynamic"
7311 else
7312 LIBTOOL_CRUFT=""
7313 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007314 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007315 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007316else
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007318/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007319
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007320 #include <unistd.h>
7321 int main(int argc, char*argv[])
7322 {
7323 if (sizeof(long) == 4) {
7324 return 0;
7325 } else {
7326 return 1;
7327 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007328 }
7329
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007331if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007332 ac_osx_32bit=yes
7333else
Matthias Kloseb9621712010-04-24 17:59:49 +00007334 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007335fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7337 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007338fi
7339
7340
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007341 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007342 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007343 i386)
7344 MACOSX_DEFAULT_ARCH="i386"
7345 ;;
7346 ppc)
7347 MACOSX_DEFAULT_ARCH="ppc"
7348 ;;
7349 *)
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007350 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007351 ;;
7352 esac
7353 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007354 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007355 i386)
7356 MACOSX_DEFAULT_ARCH="x86_64"
7357 ;;
7358 ppc)
7359 MACOSX_DEFAULT_ARCH="ppc64"
7360 ;;
7361 *)
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007362 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007363 ;;
7364 esac
7365
7366 #ARCH_RUN_32BIT="true"
7367 fi
7368
7369 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007370 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007371 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007372esac
7373
Matthias Kloseb9621712010-04-24 17:59:49 +00007374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7375$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007376if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007377then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007378 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007379 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007380 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007381
Matthias Kloseb9621712010-04-24 17:59:49 +00007382$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007383
Matthias Kloseb9621712010-04-24 17:59:49 +00007384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7385$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007386 if test $enable_shared = "yes"
7387 then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007388 as_fn_error "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00007389 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007390else
Matthias Kloseb9621712010-04-24 17:59:49 +00007391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7392$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007393fi
7394
Matthias Kloseb9621712010-04-24 17:59:49 +00007395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7396$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007397case $ac_sys_system/$ac_sys_release in
7398 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007399
Matthias Kloseb9621712010-04-24 17:59:49 +00007400$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007401
Matthias Kloseb9621712010-04-24 17:59:49 +00007402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7403$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007404 ;;
7405 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7407$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007408 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007409esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007410
Guido van Rossum0a516c91994-09-12 10:58:40 +00007411# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007412
Michael W. Hudson54241132001-12-07 15:38:26 +00007413
7414
7415
7416
Benjamin Peterson99f03762010-04-11 22:15:28 +00007417
Thomas Wouters477c8d52006-05-27 19:21:47 +00007418
Georg Brandlb1441c72009-01-03 22:33:39 +00007419
Thomas Wouters477c8d52006-05-27 19:21:47 +00007420cat >>confdefs.h <<_ACEOF
7421#define SHLIB_EXT "$SO"
7422_ACEOF
7423
Guido van Rossum0a516c91994-09-12 10:58:40 +00007424# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007425# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007426# (Shared libraries in this instance are shared modules to be loaded into
7427# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7429$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007430if test -z "$LDSHARED"
7431then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007432 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007433 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007434 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007435 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007436 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007437 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007438 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007439 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007440 if test "$GCC" = "yes" ; then
7441 LDSHARED='$(CC) -shared'
7442 LDCXXSHARED='$(CXX) -shared'
7443 else
7444 LDSHARED='$(CC) -G'
7445 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007446 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007447 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007448 if test "$GCC" = "yes" ; then
7449 LDSHARED='$(CC) -shared'
7450 LDCXXSHARED='$(CXX) -shared'
7451 else
7452 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007453 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007454 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007455 LDSHARED='$(CC) -bundle'
7456 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007457 if test "$enable_framework" ; then
7458 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007459 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7460 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007461 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007462 else
7463 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007464 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007465 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007466 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007467 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007468 LDSHARED='$(CC) -bundle'
7469 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007470 if test "$enable_framework" ; then
7471 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007472 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7473 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007474 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007475 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007476 # No framework, use the Python app as bundle-loader
7477 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007478 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007479 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007480 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007481 Darwin/*)
7482 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7483 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007484
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007485 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007486 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007487 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007488 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007489 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007490 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7491 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007492 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007493 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007494 LDSHARED='$(CC) -bundle'
7495 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007496 if test "$enable_framework" ; then
7497 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007498 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7499 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007500 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007501 else
7502 # No framework, use the Python app as bundle-loader
7503 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7504 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007505 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007506 fi
7507 fi
7508 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007509 Linux*|GNU*|QNX*)
7510 LDSHARED='$(CC) -shared'
7511 LDCXXSHARED='$(CXX) -shared';;
7512 BSD/OS*/4*)
7513 LDSHARED="gcc -shared"
7514 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007515 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007516 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007517 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007518 LDSHARED='$(CC) -shared'
7519 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007520 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007521 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007522 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007523 OpenBSD*)
7524 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7525 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007526 LDSHARED='$(CC) -shared $(CCSHARED)'
7527 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007528 else
7529 case `uname -r` in
7530 [01].* | 2.[0-7] | 2.[0-7].*)
7531 LDSHARED="ld -Bshareable ${LDFLAGS}"
7532 ;;
7533 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007534 LDSHARED='$(CC) -shared $(CCSHARED)'
7535 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007536 ;;
7537 esac
7538 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007539 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007540 LDSHARED='$(CC) -shared'
7541 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007542 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007543 if test "$GCC" = "yes" ; then
7544 LDSHARED='$(CC) -shared'
7545 LDCXXSHARED='$(CXX) -shared'
7546 else
7547 LDSHARED='$(CC) -G'
7548 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007549 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007550 SCO_SV*)
7551 LDSHARED='$(CC) -Wl,-G,-Bexport'
7552 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7553 CYGWIN*)
7554 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7555 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007556 *) LDSHARED="ld";;
7557 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007558fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7560$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007561LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007562BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007563# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007564# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7566$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007567if test -z "$CCSHARED"
7568then
Guido van Rossum07397971997-04-29 21:49:50 +00007569 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007570 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007571 then CCSHARED="-fPIC";
7572 elif test `uname -p` = sparc;
7573 then CCSHARED="-xcode=pic32";
7574 else CCSHARED="-Kpic";
7575 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007576 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007577 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007578 else CCSHARED="+z";
7579 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007580 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007581 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007582 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007583 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007584 if test "$GCC" = "yes"
7585 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007586 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007587 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007588 SCO_SV*)
7589 if test "$GCC" = "yes"
7590 then CCSHARED="-fPIC"
7591 else CCSHARED="-Kpic -belf"
7592 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007593 IRIX*/6*) case $CC in
7594 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007595 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007596 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007597 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7600$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007601# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007602# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7604$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007605if test -z "$LINKFORSHARED"
7606then
Guido van Rossum07397971997-04-29 21:49:50 +00007607 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007608 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007609 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007610 LINKFORSHARED="-Wl,-E -Wl,+s";;
7611# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007612 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007613 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007614 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007615 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007616 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007617 if test "$enable_framework"
7618 then
Jack Jansenda49e192005-01-07 13:08:22 +00007619 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007620 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007621 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007622 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007623 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007624 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007625 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007626 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7627 then
7628 LINKFORSHARED="-Wl,--export-dynamic"
7629 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007630 SunOS/5*) case $CC in
7631 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007632 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007633 then
7634 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007635 fi;;
7636 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007637 CYGWIN*)
7638 if test $enable_shared = "no"
7639 then
7640 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7641 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007642 QNX*)
7643 # -Wl,-E causes the symbols to be added to the dynamic
7644 # symbol table so that they can be found when a module
7645 # is loaded. -N 2048K causes the stack size to be set
7646 # to 2048 kilobytes so that the stack doesn't overflow
7647 # when running test_compile.py.
7648 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007649 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7652$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007653
Michael W. Hudson54241132001-12-07 15:38:26 +00007654
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007655
Matthias Kloseb9621712010-04-24 17:59:49 +00007656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7657$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007658if test ! "$LIBRARY" = "$LDLIBRARY"
7659then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007660 case $ac_sys_system in
7661 CYGWIN*)
7662 # Cygwin needs CCSHARED when building extension DLLs
7663 # but not when building the interpreter DLL.
7664 CFLAGSFORSHARED='';;
7665 *)
7666 CFLAGSFORSHARED='$(CCSHARED)'
7667 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7670$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007671
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007672# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7673# library (with --enable-shared).
7674# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007675# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7676# if it is not required, since it creates a dependency of the shared library
7677# to LIBS. This, in turn, means that applications linking the shared libpython
7678# don't need to link LIBS explicitly. The default should be only changed
7679# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007680
Matthias Kloseb9621712010-04-24 17:59:49 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7682$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007683case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007684 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007685 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007686esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7688$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007689
7690
Guido van Rossum627b2d71993-12-24 10:39:16 +00007691# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7693$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007694if test "${ac_cv_lib_sendfile_sendfile+set}" = set; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007695 $as_echo_n "(cached) " >&6
7696else
7697 ac_check_lib_save_LIBS=$LIBS
7698LIBS="-lsendfile $LIBS"
7699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7700/* end confdefs.h. */
7701
7702/* Override any GCC internal prototype to avoid an error.
7703 Use char because int might match the return type of a GCC
7704 builtin and then its argument prototype would still apply. */
7705#ifdef __cplusplus
7706extern "C"
7707#endif
7708char sendfile ();
7709int
7710main ()
7711{
7712return sendfile ();
7713 ;
7714 return 0;
7715}
7716_ACEOF
7717if ac_fn_c_try_link "$LINENO"; then :
7718 ac_cv_lib_sendfile_sendfile=yes
7719else
7720 ac_cv_lib_sendfile_sendfile=no
7721fi
7722rm -f core conftest.err conftest.$ac_objext \
7723 conftest$ac_exeext conftest.$ac_ext
7724LIBS=$ac_check_lib_save_LIBS
7725fi
7726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7727$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007728if test "x$ac_cv_lib_sendfile_sendfile" = x""yes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007729 cat >>confdefs.h <<_ACEOF
7730#define HAVE_LIBSENDFILE 1
7731_ACEOF
7732
7733 LIBS="-lsendfile $LIBS"
7734
7735fi
7736
Matthias Kloseb9621712010-04-24 17:59:49 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7738$as_echo_n "checking for dlopen in -ldl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007739if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007740 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007741else
Martin v. Löwis11437992002-04-12 09:54:03 +00007742 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007743LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007746
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007747/* Override any GCC internal prototype to avoid an error.
7748 Use char because int might match the return type of a GCC
7749 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007750#ifdef __cplusplus
7751extern "C"
7752#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007753char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007754int
7755main ()
7756{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007757return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007758 ;
7759 return 0;
7760}
7761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007762if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007763 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007764else
Matthias Kloseb9621712010-04-24 17:59:49 +00007765 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007767rm -f core conftest.err conftest.$ac_objext \
7768 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007769LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7772$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007773if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007774 cat >>confdefs.h <<_ACEOF
7775#define HAVE_LIBDL 1
7776_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007777
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007778 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007779
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007780fi
7781 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7783$as_echo_n "checking for shl_load in -ldld... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007784if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007786else
Martin v. Löwis11437992002-04-12 09:54:03 +00007787 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007788LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007792/* Override any GCC internal prototype to avoid an error.
7793 Use char because int might match the return type of a GCC
7794 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007795#ifdef __cplusplus
7796extern "C"
7797#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007798char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007799int
7800main ()
7801{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007803 ;
7804 return 0;
7805}
7806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007807if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007808 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007809else
Matthias Kloseb9621712010-04-24 17:59:49 +00007810 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007812rm -f core conftest.err conftest.$ac_objext \
7813 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007814LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7817$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007818if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 cat >>confdefs.h <<_ACEOF
7820#define HAVE_LIBDLD 1
7821_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007822
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007823 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007824
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007825fi
7826 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007827
Georg Brandlb1441c72009-01-03 22:33:39 +00007828# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007829if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7831$as_echo_n "checking for library containing sem_init... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007832if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007833 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007834else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007835 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007837/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839/* Override any GCC internal prototype to avoid an error.
7840 Use char because int might match the return type of a GCC
7841 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007842#ifdef __cplusplus
7843extern "C"
7844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007845char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007846int
7847main ()
7848{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007850 ;
7851 return 0;
7852}
7853_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854for ac_lib in '' pthread rt posix4; do
7855 if test -z "$ac_lib"; then
7856 ac_res="none required"
7857 else
7858 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007859 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007864rm -f core conftest.err conftest.$ac_objext \
7865 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007866 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007870if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872else
7873 ac_cv_search_sem_init=no
7874fi
7875rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007876LIBS=$ac_func_search_save_LIBS
7877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7879$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007881if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007883
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007884fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007885 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007886 # posix4 on Solaris 2.6
7887 # pthread (first!) on Linux
7888fi
7889
Martin v. Löwis19d17342003-06-14 21:03:05 +00007890# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7892$as_echo_n "checking for textdomain in -lintl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007893if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007894 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007895else
7896 ac_check_lib_save_LIBS=$LIBS
7897LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007899/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007900
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901/* Override any GCC internal prototype to avoid an error.
7902 Use char because int might match the return type of a GCC
7903 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007904#ifdef __cplusplus
7905extern "C"
7906#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007907char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007908int
7909main ()
7910{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007911return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007912 ;
7913 return 0;
7914}
7915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007916if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007917 ac_cv_lib_intl_textdomain=yes
7918else
Matthias Kloseb9621712010-04-24 17:59:49 +00007919 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007921rm -f core conftest.err conftest.$ac_objext \
7922 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007923LIBS=$ac_check_lib_save_LIBS
7924fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7926$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007927if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007928
Matthias Kloseb9621712010-04-24 17:59:49 +00007929$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007930
Brett Cannonc6d936e2009-06-07 20:09:53 +00007931 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007932fi
7933
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007934
7935# checks for system dependent C++ extensions support
7936case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007937 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7938$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007940/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007941
Georg Brandl59e87bd2011-02-15 19:48:59 +00007942 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007943int
7944main ()
7945{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007946loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007947 ;
7948 return 0;
7949}
Matthias Kloseb159a552010-04-25 21:00:44 +00007950
Martin v. Löwis11437992002-04-12 09:54:03 +00007951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007952if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007953
Matthias Kloseb159a552010-04-25 21:00:44 +00007954
Matthias Kloseb9621712010-04-24 17:59:49 +00007955$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007956
Matthias Kloseb159a552010-04-25 21:00:44 +00007957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007958$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007959
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007960else
Matthias Kloseb159a552010-04-25 21:00:44 +00007961
7962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007963$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007964
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007966rm -f core conftest.err conftest.$ac_objext \
7967 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007968 *) ;;
7969esac
7970
Guido van Rossum70c7f481998-03-26 18:44:10 +00007971# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7973$as_echo_n "checking for t_open in -lnsl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007974if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007975 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007976else
Martin v. Löwis11437992002-04-12 09:54:03 +00007977 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007978LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007980/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007982/* Override any GCC internal prototype to avoid an error.
7983 Use char because int might match the return type of a GCC
7984 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007985#ifdef __cplusplus
7986extern "C"
7987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007988char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007989int
7990main ()
7991{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007993 ;
7994 return 0;
7995}
7996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007997if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007998 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007999else
Matthias Kloseb9621712010-04-24 17:59:49 +00008000 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002rm -f core conftest.err conftest.$ac_objext \
8003 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008004LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8007$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008008if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008009 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008010fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008011 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8013$as_echo_n "checking for socket in -lsocket... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008014if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008015 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008016else
Martin v. Löwis11437992002-04-12 09:54:03 +00008017 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008018LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008020/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008021
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008022/* Override any GCC internal prototype to avoid an error.
8023 Use char because int might match the return type of a GCC
8024 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008025#ifdef __cplusplus
8026extern "C"
8027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008028char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008029int
8030main ()
8031{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008033 ;
8034 return 0;
8035}
8036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008037if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008038 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008039else
Matthias Kloseb9621712010-04-24 17:59:49 +00008040 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008042rm -f core conftest.err conftest.$ac_objext \
8043 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008044LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8047$as_echo "$ac_cv_lib_socket_socket" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008048if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008049 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008050fi
8051 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008052
Matthias Kloseb9621712010-04-24 17:59:49 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8054$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008057if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8060$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008061LIBS="$withval $LIBS"
8062
8063else
Matthias Kloseb9621712010-04-24 17:59:49 +00008064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8065$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066fi
8067
Guido van Rossum7f43da71994-08-01 12:15:30 +00008068
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008069if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008070 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8071set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8073$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008074if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008076else
8077 case $PKG_CONFIG in
8078 [\\/]* | ?:[\\/]*)
8079 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8080 ;;
8081 *)
8082 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8083for as_dir in $PATH
8084do
8085 IFS=$as_save_IFS
8086 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008088 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8089 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008090 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008091 break 2
8092 fi
8093done
Matthias Kloseb9621712010-04-24 17:59:49 +00008094 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008095IFS=$as_save_IFS
8096
8097 ;;
8098esac
8099fi
8100PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8101if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8103$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008104else
Matthias Kloseb9621712010-04-24 17:59:49 +00008105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8106$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008107fi
8108
8109
8110fi
8111if test -z "$ac_cv_path_PKG_CONFIG"; then
8112 ac_pt_PKG_CONFIG=$PKG_CONFIG
8113 # Extract the first word of "pkg-config", so it can be a program name with args.
8114set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8116$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008117if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008118 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008119else
8120 case $ac_pt_PKG_CONFIG in
8121 [\\/]* | ?:[\\/]*)
8122 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8123 ;;
8124 *)
8125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8126for as_dir in $PATH
8127do
8128 IFS=$as_save_IFS
8129 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008131 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8132 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008134 break 2
8135 fi
8136done
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008138IFS=$as_save_IFS
8139
8140 ;;
8141esac
8142fi
8143ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8144if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8146$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008147else
Matthias Kloseb9621712010-04-24 17:59:49 +00008148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8149$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008150fi
8151
8152 if test "x$ac_pt_PKG_CONFIG" = x; then
8153 PKG_CONFIG=""
8154 else
8155 case $cross_compiling:$ac_tool_warned in
8156yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008157{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8158$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008159ac_tool_warned=yes ;;
8160esac
8161 PKG_CONFIG=$ac_pt_PKG_CONFIG
8162 fi
8163else
8164 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8165fi
8166
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008167
8168# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8170$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008171
8172# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008173if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008174 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008175else
8176 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008177fi
8178
8179
Matthias Kloseb9621712010-04-24 17:59:49 +00008180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8181$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008182
8183# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8185$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008186
8187# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008188if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008189 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008190else
8191 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008192fi
8193
8194
8195if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008196 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8197else
8198 LIBFFI_INCLUDEDIR=""
8199fi
8200
8201
Matthias Kloseb9621712010-04-24 17:59:49 +00008202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8203$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008204
Benjamin Peterson076ed002010-10-31 17:11:02 +00008205# Check for support for loadable sqlite extensions
8206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8207$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8208# Check whether --enable-loadable-sqlite-extensions was given.
8209if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8210 enableval=$enable_loadable_sqlite_extensions;
8211else
8212 enable_loadable_sqlite_extensions="no"
8213fi
8214
8215
8216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8217$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8218
Matthias Klose55708cc2009-04-30 08:06:49 +00008219# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8221$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008222
8223# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008224if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008225 withval=$with_dbmliborder;
8226if test x$with_dbmliborder = xyes
8227then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008228as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008229else
8230 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8231 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8232 then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008233 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008234 fi
8235 done
8236fi
8237fi
8238
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8240$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008241
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008242# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008243
8244
Matthias Kloseb9621712010-04-24 17:59:49 +00008245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8246$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008247
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008248# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008249if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250 withval=$with_signal_module;
8251fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008252
8253
8254if test -z "$with_signal_module"
8255then with_signal_module="yes"
8256fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8258$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008259
8260if test "${with_signal_module}" = "yes"; then
8261 USE_SIGNAL_MODULE=""
8262 SIGNAL_OBJS=""
8263else
8264 USE_SIGNAL_MODULE="#"
8265 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8266fi
8267
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008268# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008269
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008270USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008272
Martin v. Löwis11437992002-04-12 09:54:03 +00008273
8274# Templates for things AC_DEFINEd more than once.
8275# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008276
8277
Martin v. Löwis11437992002-04-12 09:54:03 +00008278
8279
Matthias Kloseb9621712010-04-24 17:59:49 +00008280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8281$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008282
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008283# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008284if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008285 withval=$with_threads;
8286fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008287
8288
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008289# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008290
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008291# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008292if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293 withval=$with_thread; with_threads=$with_thread
8294fi
8295
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008296
8297if test -z "$with_threads"
8298then with_threads="yes"
8299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8301$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008302
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008303
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008304if test "$with_threads" = "no"
8305then
8306 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008307elif test "$ac_cv_pthread_is_default" = yes
8308then
Matthias Kloseb9621712010-04-24 17:59:49 +00008309 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008310
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008311 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008313
8314 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008315 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008316elif test "$ac_cv_kpthread" = "yes"
8317then
8318 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008319 if test "$ac_cv_cxx_thread" = "yes"; then
8320 CXX="$CXX -Kpthread"
8321 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008322 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008323
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008324 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008325 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008326elif test "$ac_cv_kthread" = "yes"
8327then
8328 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008329 if test "$ac_cv_cxx_thread" = "yes"; then
8330 CXX="$CXX -Kthread"
8331 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008332 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008333
8334 posix_threads=yes
8335 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008336elif test "$ac_cv_pthread" = "yes"
8337then
8338 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008339 if test "$ac_cv_cxx_thread" = "yes"; then
8340 CXX="$CXX -pthread"
8341 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008342 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008343
8344 posix_threads=yes
8345 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008346else
8347 if test ! -z "$with_threads" -a -d "$with_threads"
8348 then LDFLAGS="$LDFLAGS -L$with_threads"
8349 fi
8350 if test ! -z "$withval" -a -d "$withval"
8351 then LDFLAGS="$LDFLAGS -L$withval"
8352 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008353
8354 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008355 # define _POSIX_THREADS in unistd.h. Some apparently don't
8356 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8358$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008360/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008361
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008362#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008363#ifdef _POSIX_THREADS
8364yes
8365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008366
8367_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008368if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008370 unistd_defines_pthreads=yes
8371else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008372 unistd_defines_pthreads=no
8373fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008374rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008375
Matthias Kloseb9621712010-04-24 17:59:49 +00008376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8377$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008378
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008380
Matthias Kloseb9621712010-04-24 17:59:49 +00008381 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008382if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008383 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008384
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008386
Martin v. Löwis11437992002-04-12 09:54:03 +00008387
Matthias Kloseb9621712010-04-24 17:59:49 +00008388$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008389
8390 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008391 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008392else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008393
Matthias Kloseb9621712010-04-24 17:59:49 +00008394 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008395if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008397
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008399
Martin v. Löwis11437992002-04-12 09:54:03 +00008400
Matthias Kloseb9621712010-04-24 17:59:49 +00008401$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008402
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008403 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008404else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008405
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008406 # Just looking for pthread_create in libpthread is not enough:
8407 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8408 # So we really have to include pthread.h, and then link.
8409 _libs=$LIBS
8410 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8412$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008414/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008415#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008416
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008417void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008418int
8419main ()
8420{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008421
8422pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008423 ;
8424 return 0;
8425}
8426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008427if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008428
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8430$as_echo "yes" >&6; }
8431 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008432
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008433 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008434 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008435else
Martin v. Löwis11437992002-04-12 09:54:03 +00008436
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008437 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008438 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008439if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008440 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008441
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008442 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008443 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008444else
Guido van Rossumad678af1998-10-02 14:42:15 +00008445
Matthias Kloseb9621712010-04-24 17:59:49 +00008446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8447$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008448if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008450else
Martin v. Löwis11437992002-04-12 09:54:03 +00008451 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008452LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008456/* Override any GCC internal prototype to avoid an error.
8457 Use char because int might match the return type of a GCC
8458 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008459#ifdef __cplusplus
8460extern "C"
8461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008462char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008463int
8464main ()
8465{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008466return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008467 ;
8468 return 0;
8469}
8470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008471if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008472 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008473else
Matthias Kloseb9621712010-04-24 17:59:49 +00008474 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008476rm -f core conftest.err conftest.$ac_objext \
8477 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008478LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8481$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008482if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008483 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008484
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008485 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008486 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008487 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008488else
Greg Steinadf63d62000-07-05 10:38:09 +00008489
Matthias Kloseb9621712010-04-24 17:59:49 +00008490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8491$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008492if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008494else
Martin v. Löwis11437992002-04-12 09:54:03 +00008495 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008496LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008499
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008500/* Override any GCC internal prototype to avoid an error.
8501 Use char because int might match the return type of a GCC
8502 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008503#ifdef __cplusplus
8504extern "C"
8505#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008506char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008507int
8508main ()
8509{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008510return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008511 ;
8512 return 0;
8513}
8514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008515if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008516 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008517else
Matthias Kloseb9621712010-04-24 17:59:49 +00008518 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008520rm -f core conftest.err conftest.$ac_objext \
8521 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008522LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8525$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008526if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008527 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008528
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008529 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008530 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008531 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008532else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008533
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8535$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008536if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008538else
Martin v. Löwis11437992002-04-12 09:54:03 +00008539 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008540LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008543
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544/* Override any GCC internal prototype to avoid an error.
8545 Use char because int might match the return type of a GCC
8546 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008547#ifdef __cplusplus
8548extern "C"
8549#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008550char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008551int
8552main ()
8553{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008554return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008555 ;
8556 return 0;
8557}
8558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008559if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008561else
Matthias Kloseb9621712010-04-24 17:59:49 +00008562 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008564rm -f core conftest.err conftest.$ac_objext \
8565 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008566LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8569$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008570if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008571 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008572
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008573 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008574 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008575 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008576else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008577
Matthias Kloseb9621712010-04-24 17:59:49 +00008578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8579$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008580if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008581 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008582else
Martin v. Löwis11437992002-04-12 09:54:03 +00008583 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008584LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008588/* Override any GCC internal prototype to avoid an error.
8589 Use char because int might match the return type of a GCC
8590 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008591#ifdef __cplusplus
8592extern "C"
8593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008594char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008595int
8596main ()
8597{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008598return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008599 ;
8600 return 0;
8601}
8602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008603if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008604 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008605else
Matthias Kloseb9621712010-04-24 17:59:49 +00008606 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008608rm -f core conftest.err conftest.$ac_objext \
8609 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008610LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8613$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008614if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008615 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008616
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008617 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008618 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008619 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008620else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008621
Martin v. Löwis130fb172001-07-19 11:00:41 +00008622 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008623fi
8624
Guido van Rossum627b2d71993-12-24 10:39:16 +00008625
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008626fi
8627
Guido van Rossum0be3e491997-05-22 20:33:33 +00008628fi
8629
Guido van Rossum49545951997-12-02 19:28:29 +00008630fi
8631
Guido van Rossumb93a8621998-05-07 13:27:32 +00008632fi
8633
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008635rm -f core conftest.err conftest.$ac_objext \
8636 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008637fi
8638
Martin v. Löwis11437992002-04-12 09:54:03 +00008639
8640fi
8641
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008642
Michael W. Hudson54241132001-12-07 15:38:26 +00008643
Matthias Kloseb9621712010-04-24 17:59:49 +00008644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8645$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008646if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008647 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008648else
Martin v. Löwis11437992002-04-12 09:54:03 +00008649 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008650LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654/* Override any GCC internal prototype to avoid an error.
8655 Use char because int might match the return type of a GCC
8656 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008657#ifdef __cplusplus
8658extern "C"
8659#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008660char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008661int
8662main ()
8663{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008664return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008665 ;
8666 return 0;
8667}
8668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008669if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008671else
Matthias Kloseb9621712010-04-24 17:59:49 +00008672 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008674rm -f core conftest.err conftest.$ac_objext \
8675 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008676LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8679$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008680if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008681 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008682
Martin v. Löwis130fb172001-07-19 11:00:41 +00008683 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008684 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008685 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008686fi
8687
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008688
Neal Norwitza978ab02002-11-02 16:58:05 +00008689 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8691$as_echo_n "checking for thr_create in -lthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008692if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008694else
Martin v. Löwis11437992002-04-12 09:54:03 +00008695 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008696LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008700/* Override any GCC internal prototype to avoid an error.
8701 Use char because int might match the return type of a GCC
8702 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008703#ifdef __cplusplus
8704extern "C"
8705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008706char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008707int
8708main ()
8709{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008710return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008711 ;
8712 return 0;
8713}
8714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008715if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008716 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008717else
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008720rm -f core conftest.err conftest.$ac_objext \
8721 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008722LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8725$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008726if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008727 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008728
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008729 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008730 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008731 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008732fi
8733
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008734 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008735fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008736
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008737if test "$posix_threads" = "yes"; then
8738 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008739
Matthias Kloseb9621712010-04-24 17:59:49 +00008740$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008741
8742 fi
8743
8744 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8745 case $ac_sys_system/$ac_sys_release in
8746 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008747$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008748
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008749 ;;
8750 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008751$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008752
8753 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008754 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008755$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008756
8757 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008758 AIX/6)
8759$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8760
8761 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008762 esac
8763
Matthias Kloseb9621712010-04-24 17:59:49 +00008764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8765$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008766 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008767 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008768else
Matthias Kloseb9621712010-04-24 17:59:49 +00008769 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008770 ac_cv_pthread_system_supported=no
8771else
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008773/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008774#include <pthread.h>
8775 void *foo(void *parm) {
8776 return NULL;
8777 }
8778 main() {
8779 pthread_attr_t attr;
8780 pthread_t id;
8781 if (pthread_attr_init(&attr)) exit(-1);
8782 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8783 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8784 exit(0);
8785 }
8786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008787if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008788 ac_cv_pthread_system_supported=yes
8789else
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008794fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008796
Guido van Rossum627b2d71993-12-24 10:39:16 +00008797fi
8798
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8800$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008801 if test "$ac_cv_pthread_system_supported" = "yes"; then
8802
Matthias Kloseb9621712010-04-24 17:59:49 +00008803$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008804
8805 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 for ac_func in pthread_sigmask
8807do :
8808 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008809if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008810 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008811#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008812_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008813 case $ac_sys_system in
8814 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008815
Matthias Kloseb9621712010-04-24 17:59:49 +00008816$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008817
8818 ;;
8819 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008820fi
8821done
8822
8823fi
8824
8825
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008826# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008827
Matthias Kloseb9621712010-04-24 17:59:49 +00008828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8829$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008830# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008831if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008832 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008833 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8835$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008836 ipv6=no
8837 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8839$as_echo "yes" >&6; }
8840 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008841
8842 ipv6=yes
8843 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008845else
Martin v. Löwis11437992002-04-12 09:54:03 +00008846
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008848
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8850$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008851 ipv6=no
8852
8853else
Matthias Kloseb9621712010-04-24 17:59:49 +00008854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008855/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008856 /* AF_INET6 available check */
8857#include <sys/types.h>
8858#include <sys/socket.h>
8859main()
8860{
8861 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8862 exit(1);
8863 else
8864 exit(0);
8865}
8866
Martin v. Löwis11437992002-04-12 09:54:03 +00008867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008868if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008869
Matthias Kloseb9621712010-04-24 17:59:49 +00008870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8871$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008872 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008873
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008874else
Matthias Kloseb159a552010-04-25 21:00:44 +00008875
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8877$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008878 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008879
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8882 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008883fi
8884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008885
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008886if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8888$as_echo_n "checking if RFC2553 API is available... " >&6; }
8889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008890/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008891
8892 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008893#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008894int
8895main ()
8896{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008897struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008898 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008899 ;
8900 return 0;
8901}
Matthias Kloseb159a552010-04-25 21:00:44 +00008902
Martin v. Löwis11437992002-04-12 09:54:03 +00008903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008904if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008905
8906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008907$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008908 ipv6=yes
8909
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008910else
Matthias Kloseb159a552010-04-25 21:00:44 +00008911
8912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008913$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008914 ipv6=no
8915
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008918fi
8919
8920if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008921 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008922
8923fi
8924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008925fi
8926
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008927
8928ipv6type=unknown
8929ipv6lib=none
8930ipv6trylibc=no
8931
8932if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8934$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008935 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8936 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008937 case $i in
8938 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008940/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008941
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008942#include <netinet/in.h>
8943#ifdef IPV6_INRIA_VERSION
8944yes
8945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008946_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008947if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008948 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008949 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008950fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008951rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008952
8953 ;;
8954 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008956/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008957
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008958#include <netinet/in.h>
8959#ifdef __KAME__
8960yes
8961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008962_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008963if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008964 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008965 ipv6type=$i;
8966 ipv6lib=inet6
8967 ipv6libdir=/usr/local/v6/lib
8968 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008969fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008970rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971
8972 ;;
8973 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008975/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008976
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008977#include <features.h>
8978#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8979yes
8980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008981_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008983 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008984 ipv6type=$i;
8985 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008986fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008987rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988
8989 ;;
8990 linux-inet6)
8991 if test -d /usr/inet6; then
8992 ipv6type=$i
8993 ipv6lib=inet6
8994 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008995 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996 fi
8997 ;;
8998 solaris)
8999 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009000 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001 ipv6type=$i
9002 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003 fi
9004 fi
9005 ;;
9006 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009008/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009009
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009010#include <sys/param.h>
9011#ifdef _TOSHIBA_INET6
9012yes
9013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009014_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009016 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009017 ipv6type=$i;
9018 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009019 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009020fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009021rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022
9023 ;;
9024 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009026/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009027
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009028#include </usr/local/v6/include/sys/v6config.h>
9029#ifdef __V6D__
9030yes
9031#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009032_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009035 ipv6type=$i;
9036 ipv6lib=v6;
9037 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009038 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009039fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009040rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009041
9042 ;;
9043 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009045/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009046
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009047#include <sys/param.h>
9048#ifdef _ZETA_MINAMI_INET6
9049yes
9050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009051_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009052if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009054 ipv6type=$i;
9055 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009056 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009057fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009058rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009059
9060 ;;
9061 esac
9062 if test "$ipv6type" != "unknown"; then
9063 break
9064 fi
9065 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9067$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068fi
9069
9070if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9071 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9072 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9073 echo "using lib$ipv6lib"
9074 else
9075 if test $ipv6trylibc = "yes"; then
9076 echo "using libc"
9077 else
9078 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9079 echo "You need to fetch lib$ipv6lib.a from appropriate"
9080 echo 'ipv6 kit and compile beforehand.'
9081 exit 1
9082 fi
9083 fi
9084fi
9085
Matthias Kloseb9621712010-04-24 17:59:49 +00009086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9087$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009089/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009090
9091 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009092int
9093main ()
9094{
9095FSIORefNum fRef = 0
9096 ;
9097 return 0;
9098}
Matthias Kloseb159a552010-04-25 21:00:44 +00009099
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009101if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009102
Matthias Kloseb159a552010-04-25 21:00:44 +00009103
Matthias Kloseb9621712010-04-24 17:59:49 +00009104$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009105
Matthias Kloseb9621712010-04-24 17:59:49 +00009106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9107$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009108
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009109else
Matthias Kloseb159a552010-04-25 21:00:44 +00009110
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9112$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009113
9114fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9116
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009117# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9119$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009121# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009122if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009123 withval=$with_doc_strings;
9124fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009125
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009126
9127if test -z "$with_doc_strings"
9128then with_doc_strings="yes"
9129fi
9130if test "$with_doc_strings" != "no"
9131then
9132
Matthias Kloseb9621712010-04-24 17:59:49 +00009133$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009134
9135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9137$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009138
Antoine Pitrou042b1282010-08-13 21:15:58 +00009139# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9141$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009143# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009144if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009145 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009146if test "$withval" != no
9147then
9148
Matthias Kloseb9621712010-04-24 17:59:49 +00009149$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009150
Matthias Kloseb9621712010-04-24 17:59:49 +00009151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9152$as_echo "yes" >&6; }
9153else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9154$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009155fi
9156else
Matthias Kloseb9621712010-04-24 17:59:49 +00009157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9158$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009159fi
9160
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009161
9162# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9164$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009165
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009166# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009167if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009168 withval=$with_pymalloc;
9169fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009170
Neil Schemenauera35c6882001-02-27 04:45:05 +00009171
Neil Schemenauer16c22972002-03-22 15:34:49 +00009172if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009173then
9174 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009175 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009176fi
9177if test "$with_pymalloc" != "no"
9178then
Martin v. Löwis11437992002-04-12 09:54:03 +00009179
Matthias Kloseb9621712010-04-24 17:59:49 +00009180$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009181
9182fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9184$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009185
Benjamin Peterson05159c42009-12-03 03:01:27 +00009186# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9188$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009189
9190# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009191if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009192 withval=$with_valgrind;
9193else
9194 with_valgrind=no
9195fi
9196
Matthias Kloseb9621712010-04-24 17:59:49 +00009197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9198$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009199if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009200 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009201if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009202
Matthias Kloseb9621712010-04-24 17:59:49 +00009203$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009204
9205else
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009206 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009207
9208fi
9209
9210
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009211 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009212fi
9213
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009214# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009215
Guido van Rossum98935bf2001-09-05 19:13:16 +00009216DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009217
Guido van Rossume97ee181999-12-20 21:27:22 +00009218# the dlopen() function means we might want to use dynload_shlib.o. some
9219# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009220for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009221do :
9222 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009223if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009225#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009226_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009227
Guido van Rossume97ee181999-12-20 21:27:22 +00009228fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009229done
Guido van Rossume97ee181999-12-20 21:27:22 +00009230
Michael W. Hudson54241132001-12-07 15:38:26 +00009231
Guido van Rossume97ee181999-12-20 21:27:22 +00009232# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9233# loading of modules.
9234
Matthias Kloseb9621712010-04-24 17:59:49 +00009235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9236$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009237if test -z "$DYNLOADFILE"
9238then
9239 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009240 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9241 if test "$ac_cv_func_dlopen" = yes
9242 then DYNLOADFILE="dynload_shlib.o"
9243 else DYNLOADFILE="dynload_aix.o"
9244 fi
9245 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009246 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009247 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9248 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009249 *)
9250 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9251 # out any dynamic loading
9252 if test "$ac_cv_func_dlopen" = yes
9253 then DYNLOADFILE="dynload_shlib.o"
9254 else DYNLOADFILE="dynload_stub.o"
9255 fi
9256 ;;
9257 esac
9258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9260$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009261if test "$DYNLOADFILE" != "dynload_stub.o"
9262then
Martin v. Löwis11437992002-04-12 09:54:03 +00009263
Matthias Kloseb9621712010-04-24 17:59:49 +00009264$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009265
9266fi
9267
Neil Schemenauer4e425612001-06-19 15:44:15 +00009268# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9269
Michael W. Hudson54241132001-12-07 15:38:26 +00009270
Matthias Kloseb9621712010-04-24 17:59:49 +00009271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9272$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009273if test -z "$MACHDEP_OBJS"
9274then
Jack Jansene578a632001-08-15 01:27:14 +00009275 MACHDEP_OBJS=$extra_machdep_objs
9276else
9277 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9280$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009281
Guido van Rossum627b2d71993-12-24 10:39:16 +00009282# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009283for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009284 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009285 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
9286 futimens futimes \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009287 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009288 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009289 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009290 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009291 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009292 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009293 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009294 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009295 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009296 sigaction sigaltstack siginterrupt sigpending \
9297 sigrelse sigwait snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009298 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009299 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9300 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009301do :
9302 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9303ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009304eval as_val=\$$as_ac_var
9305 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009306 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009307#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009308_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009309
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009310fi
9311done
9312
Michael W. Hudson54241132001-12-07 15:38:26 +00009313
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009314# For some functions, having a definition is not sufficient, since
9315# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9317$as_echo_n "checking for chroot... " >&6; }
9318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009319/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009320#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009321int
9322main ()
9323{
9324void *x=chroot
9325 ;
9326 return 0;
9327}
9328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009329if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009330
Matthias Kloseb9621712010-04-24 17:59:49 +00009331$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009332
Matthias Kloseb159a552010-04-25 21:00:44 +00009333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009334$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009335else
Matthias Kloseb9621712010-04-24 17:59:49 +00009336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9337$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009338
9339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9342$as_echo_n "checking for link... " >&6; }
9343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009344/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009345#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009346int
9347main ()
9348{
9349void *x=link
9350 ;
9351 return 0;
9352}
9353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009354if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009355
Matthias Kloseb9621712010-04-24 17:59:49 +00009356$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009357
Matthias Kloseb159a552010-04-25 21:00:44 +00009358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009359$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009360else
Matthias Kloseb9621712010-04-24 17:59:49 +00009361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9362$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009363
9364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9367$as_echo_n "checking for symlink... " >&6; }
9368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009369/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009370#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009371int
9372main ()
9373{
9374void *x=symlink
9375 ;
9376 return 0;
9377}
9378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009379if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009380
Matthias Kloseb9621712010-04-24 17:59:49 +00009381$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009382
Matthias Kloseb159a552010-04-25 21:00:44 +00009383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009384$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009385else
Matthias Kloseb9621712010-04-24 17:59:49 +00009386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9387$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009388
9389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9392$as_echo_n "checking for fchdir... " >&6; }
9393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009394/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009395#include <unistd.h>
9396int
9397main ()
9398{
9399void *x=fchdir
9400 ;
9401 return 0;
9402}
9403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009404if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009405
Matthias Kloseb9621712010-04-24 17:59:49 +00009406$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009407
Matthias Kloseb159a552010-04-25 21:00:44 +00009408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009409$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009410else
Matthias Kloseb9621712010-04-24 17:59:49 +00009411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9412$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009413
9414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9417$as_echo_n "checking for fsync... " >&6; }
9418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009419/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009420#include <unistd.h>
9421int
9422main ()
9423{
9424void *x=fsync
9425 ;
9426 return 0;
9427}
9428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009429if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009430
Matthias Kloseb9621712010-04-24 17:59:49 +00009431$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009432
Matthias Kloseb159a552010-04-25 21:00:44 +00009433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009434$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009435else
Matthias Kloseb9621712010-04-24 17:59:49 +00009436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9437$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009438
9439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9442$as_echo_n "checking for fdatasync... " >&6; }
9443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009444/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009445#include <unistd.h>
9446int
9447main ()
9448{
9449void *x=fdatasync
9450 ;
9451 return 0;
9452}
9453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009454if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009455
Matthias Kloseb9621712010-04-24 17:59:49 +00009456$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009457
Matthias Kloseb159a552010-04-25 21:00:44 +00009458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009459$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009460else
Matthias Kloseb9621712010-04-24 17:59:49 +00009461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9462$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009463
9464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9467$as_echo_n "checking for epoll... " >&6; }
9468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009469/* end confdefs.h. */
9470#include <sys/epoll.h>
9471int
9472main ()
9473{
9474void *x=epoll_create
9475 ;
9476 return 0;
9477}
9478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009479if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009480
Matthias Kloseb9621712010-04-24 17:59:49 +00009481$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009482
Matthias Kloseb159a552010-04-25 21:00:44 +00009483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009484$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009485else
Matthias Kloseb9621712010-04-24 17:59:49 +00009486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9487$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009488
9489fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9492$as_echo_n "checking for kqueue... " >&6; }
9493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009494/* end confdefs.h. */
9495
9496#include <sys/types.h>
9497#include <sys/event.h>
9498
9499int
9500main ()
9501{
9502int x=kqueue()
9503 ;
9504 return 0;
9505}
9506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009507if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009508
Matthias Kloseb9621712010-04-24 17:59:49 +00009509$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009510
Matthias Kloseb159a552010-04-25 21:00:44 +00009511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009512$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009513else
Matthias Kloseb9621712010-04-24 17:59:49 +00009514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9515$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009516
9517fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009519# On some systems (eg. FreeBSD 5), we would find a definition of the
9520# functions ctermid_r, setgroups in the library, but no prototype
9521# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9522# address to avoid compiler warnings and potential miscompilations
9523# because of the missing prototypes.
9524
Matthias Kloseb9621712010-04-24 17:59:49 +00009525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9526$as_echo_n "checking for ctermid_r... " >&6; }
9527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009528/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009529
Martin v. Löwisd5843682002-11-21 20:41:28 +00009530#include <stdio.h>
9531
Martin v. Löwisd5843682002-11-21 20:41:28 +00009532int
9533main ()
9534{
9535void* p = ctermid_r
9536 ;
9537 return 0;
9538}
9539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009540if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009541
Matthias Kloseb9621712010-04-24 17:59:49 +00009542$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009543
Matthias Kloseb159a552010-04-25 21:00:44 +00009544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009545$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009546else
Matthias Kloseb9621712010-04-24 17:59:49 +00009547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9548$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009549
9550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9552
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9554$as_echo_n "checking for flock declaration... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009555if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009556 $as_echo_n "(cached) " >&6
9557else
9558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009559/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009560#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009561int
9562main ()
9563{
9564void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009565
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009566 ;
9567 return 0;
9568}
9569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009570if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009571 ac_cv_flock_decl=yes
9572else
9573 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009574
9575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009577
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009578fi
9579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9580$as_echo "$ac_cv_flock_decl" >&6; }
9581if test "x${ac_cv_flock_decl}" = xyes; then
9582 for ac_func in flock
9583do :
9584 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009585if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009586 cat >>confdefs.h <<_ACEOF
9587#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009588_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009589
Antoine Pitroua3000072010-09-07 14:52:42 +00009590else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009592$as_echo_n "checking for flock in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009593if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009594 $as_echo_n "(cached) " >&6
9595else
9596 ac_check_lib_save_LIBS=$LIBS
9597LIBS="-lbsd $LIBS"
9598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9599/* end confdefs.h. */
9600
9601/* Override any GCC internal prototype to avoid an error.
9602 Use char because int might match the return type of a GCC
9603 builtin and then its argument prototype would still apply. */
9604#ifdef __cplusplus
9605extern "C"
9606#endif
9607char flock ();
9608int
9609main ()
9610{
9611return flock ();
9612 ;
9613 return 0;
9614}
9615_ACEOF
9616if ac_fn_c_try_link "$LINENO"; then :
9617 ac_cv_lib_bsd_flock=yes
9618else
9619 ac_cv_lib_bsd_flock=no
9620fi
9621rm -f core conftest.err conftest.$ac_objext \
9622 conftest$ac_exeext conftest.$ac_ext
9623LIBS=$ac_check_lib_save_LIBS
9624fi
9625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9626$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009627if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009628 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009629
9630
9631$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9632
9633
9634fi
9635
9636
9637fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009638done
9639
Antoine Pitroua3000072010-09-07 14:52:42 +00009640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009641
Matthias Kloseb9621712010-04-24 17:59:49 +00009642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9643$as_echo_n "checking for getpagesize... " >&6; }
9644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009645/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009646
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009647#include <unistd.h>
9648
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009649int
9650main ()
9651{
9652void* p = getpagesize
9653 ;
9654 return 0;
9655}
9656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009657if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009658
Matthias Kloseb9621712010-04-24 17:59:49 +00009659$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009660
Matthias Kloseb159a552010-04-25 21:00:44 +00009661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009662$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009663else
Matthias Kloseb9621712010-04-24 17:59:49 +00009664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9665$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009666
9667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009669
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9671$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9673/* end confdefs.h. */
9674
9675#include <malloc.h>
9676
9677int
9678main ()
9679{
9680mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9681 ;
9682 return 0;
9683}
9684_ACEOF
9685if ac_fn_c_try_compile "$LINENO"; then :
9686
9687$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9688
9689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9690$as_echo "yes" >&6; }
9691else
9692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9693$as_echo "no" >&6; }
9694
9695fi
9696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9697
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009698for ac_prog in true
9699do
9700 # Extract the first word of "$ac_prog", so it can be a program name with args.
9701set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9703$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009704if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009706else
9707 if test -n "$TRUE"; then
9708 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9709else
9710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9711for as_dir in $PATH
9712do
9713 IFS=$as_save_IFS
9714 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009715 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009716 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 +00009717 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009718 $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 +00009719 break 2
9720 fi
9721done
Matthias Kloseb9621712010-04-24 17:59:49 +00009722 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009723IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009724
9725fi
9726fi
9727TRUE=$ac_cv_prog_TRUE
9728if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9730$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009731else
Matthias Kloseb9621712010-04-24 17:59:49 +00009732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9733$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009734fi
9735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009737 test -n "$TRUE" && break
9738done
9739test -n "$TRUE" || TRUE="/bin/true"
9740
9741
Matthias Kloseb9621712010-04-24 17:59:49 +00009742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9743$as_echo_n "checking for inet_aton in -lc... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009744if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009745 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009746else
9747 ac_check_lib_save_LIBS=$LIBS
9748LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009750/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009752/* Override any GCC internal prototype to avoid an error.
9753 Use char because int might match the return type of a GCC
9754 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009755#ifdef __cplusplus
9756extern "C"
9757#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009758char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009759int
9760main ()
9761{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009762return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009763 ;
9764 return 0;
9765}
9766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009767if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009768 ac_cv_lib_c_inet_aton=yes
9769else
Matthias Kloseb9621712010-04-24 17:59:49 +00009770 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009772rm -f core conftest.err conftest.$ac_objext \
9773 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009774LIBS=$ac_check_lib_save_LIBS
9775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9777$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009778if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009779 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009780else
Matthias Kloseb9621712010-04-24 17:59:49 +00009781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9782$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009783if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009785else
9786 ac_check_lib_save_LIBS=$LIBS
9787LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009789/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009791/* Override any GCC internal prototype to avoid an error.
9792 Use char because int might match the return type of a GCC
9793 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009794#ifdef __cplusplus
9795extern "C"
9796#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009797char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009798int
9799main ()
9800{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009801return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009802 ;
9803 return 0;
9804}
9805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009806if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009807 ac_cv_lib_resolv_inet_aton=yes
9808else
Matthias Kloseb9621712010-04-24 17:59:49 +00009809 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009811rm -f core conftest.err conftest.$ac_objext \
9812 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009813LIBS=$ac_check_lib_save_LIBS
9814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9816$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009817if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009818 cat >>confdefs.h <<_ACEOF
9819#define HAVE_LIBRESOLV 1
9820_ACEOF
9821
9822 LIBS="-lresolv $LIBS"
9823
9824fi
9825
9826
9827fi
9828
9829
Christian Heimesd0764e22007-12-04 15:00:33 +00009830# On Tru64, chflags seems to be present, but calling it will
9831# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9833$as_echo_n "checking for chflags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009834if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009835 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009836else
Matthias Kloseb9621712010-04-24 17:59:49 +00009837 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009838 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009839else
Matthias Kloseb9621712010-04-24 17:59:49 +00009840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009841/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009842[
Christian Heimesd0764e22007-12-04 15:00:33 +00009843#include <sys/stat.h>
9844#include <unistd.h>
9845int main(int argc, char*argv[])
9846{
9847 if(chflags(argv[0], 0) != 0)
9848 return 1;
9849 return 0;
9850}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009851]
Christian Heimesd0764e22007-12-04 15:00:33 +00009852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009853if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009854 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009855else
Matthias Kloseb9621712010-04-24 17:59:49 +00009856 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9859 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009860fi
9861
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009862
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9865$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009866if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009867 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009868if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009869 ac_cv_have_chflags="yes"
9870else
9871 ac_cv_have_chflags="no"
9872fi
9873
9874fi
9875if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009876
Matthias Kloseb9621712010-04-24 17:59:49 +00009877$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009878
9879fi
9880
Matthias Kloseb9621712010-04-24 17:59:49 +00009881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9882$as_echo_n "checking for lchflags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009883if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009884 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009885else
Matthias Kloseb9621712010-04-24 17:59:49 +00009886 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009887 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009888else
Matthias Kloseb9621712010-04-24 17:59:49 +00009889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009890/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009891[
Christian Heimesd0764e22007-12-04 15:00:33 +00009892#include <sys/stat.h>
9893#include <unistd.h>
9894int main(int argc, char*argv[])
9895{
9896 if(lchflags(argv[0], 0) != 0)
9897 return 1;
9898 return 0;
9899}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009900]
Christian Heimesd0764e22007-12-04 15:00:33 +00009901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009902if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009903 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009904else
Matthias Kloseb9621712010-04-24 17:59:49 +00009905 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009907rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9908 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009909fi
9910
9911
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9914$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009915if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009916 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009917if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009918 ac_cv_have_lchflags="yes"
9919else
9920 ac_cv_have_lchflags="no"
9921fi
9922
9923fi
9924if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009925
Matthias Kloseb9621712010-04-24 17:59:49 +00009926$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009927
9928fi
9929
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009930case $ac_sys_system/$ac_sys_release in
9931Darwin/*)
9932 _CUR_CFLAGS="${CFLAGS}"
9933 _CUR_LDFLAGS="${LDFLAGS}"
9934 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9935 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9936 ;;
9937esac
9938
Matthias Kloseb9621712010-04-24 17:59:49 +00009939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9940$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009941if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009942 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009943else
9944 ac_check_lib_save_LIBS=$LIBS
9945LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009947/* end confdefs.h. */
9948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009949/* Override any GCC internal prototype to avoid an error.
9950 Use char because int might match the return type of a GCC
9951 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009952#ifdef __cplusplus
9953extern "C"
9954#endif
9955char inflateCopy ();
9956int
9957main ()
9958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009959return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009960 ;
9961 return 0;
9962}
9963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009964if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009965 ac_cv_lib_z_inflateCopy=yes
9966else
Matthias Kloseb9621712010-04-24 17:59:49 +00009967 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009969rm -f core conftest.err conftest.$ac_objext \
9970 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009971LIBS=$ac_check_lib_save_LIBS
9972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9974$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009975if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009976
Matthias Kloseb9621712010-04-24 17:59:49 +00009977$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009978
9979fi
9980
9981
9982case $ac_sys_system/$ac_sys_release in
9983Darwin/*)
9984 CFLAGS="${_CUR_CFLAGS}"
9985 LDFLAGS="${_CUR_LDFLAGS}"
9986 ;;
9987esac
9988
Matthias Kloseb9621712010-04-24 17:59:49 +00009989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9990$as_echo_n "checking for hstrerror... " >&6; }
9991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009992/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009993
Martin v. Löwise9416172003-05-03 10:12:45 +00009994#include <netdb.h>
9995
Martin v. Löwise9416172003-05-03 10:12:45 +00009996int
9997main ()
9998{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009999void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010000 ;
10001 return 0;
10002}
10003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010004if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010005
Matthias Kloseb9621712010-04-24 17:59:49 +000010006$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010007
Matthias Kloseb159a552010-04-25 21:00:44 +000010008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010009$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010010else
Matthias Kloseb9621712010-04-24 17:59:49 +000010011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10012$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010013
10014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010015rm -f core conftest.err conftest.$ac_objext \
10016 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010017
Matthias Kloseb9621712010-04-24 17:59:49 +000010018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10019$as_echo_n "checking for inet_aton... " >&6; }
10020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010021/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010022
Martin v. Löwis86d66262006-02-17 08:40:11 +000010023#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010024#include <sys/socket.h>
10025#include <netinet/in.h>
10026#include <arpa/inet.h>
10027
Martin v. Löwise9416172003-05-03 10:12:45 +000010028int
10029main ()
10030{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010031void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010032 ;
10033 return 0;
10034}
10035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010036if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010037
Matthias Kloseb9621712010-04-24 17:59:49 +000010038$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010039
Matthias Kloseb159a552010-04-25 21:00:44 +000010040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010041$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010042else
Matthias Kloseb9621712010-04-24 17:59:49 +000010043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10044$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010045
10046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010047rm -f core conftest.err conftest.$ac_objext \
10048 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010049
Matthias Kloseb9621712010-04-24 17:59:49 +000010050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10051$as_echo_n "checking for inet_pton... " >&6; }
10052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010053/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010054
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010055#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010056#include <sys/socket.h>
10057#include <netinet/in.h>
10058#include <arpa/inet.h>
10059
Martin v. Löwise9416172003-05-03 10:12:45 +000010060int
10061main ()
10062{
10063void* p = inet_pton
10064 ;
10065 return 0;
10066}
10067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010068if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010069
Matthias Kloseb9621712010-04-24 17:59:49 +000010070$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010071
Matthias Kloseb159a552010-04-25 21:00:44 +000010072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010073$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010074else
Matthias Kloseb9621712010-04-24 17:59:49 +000010075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10076$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010077
10078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010080
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010081# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10083$as_echo_n "checking for setgroups... " >&6; }
10084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010085/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010086
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010087#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010088#ifdef HAVE_GRP_H
10089#include <grp.h>
10090#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010091
Martin v. Löwisd5843682002-11-21 20:41:28 +000010092int
10093main ()
10094{
10095void* p = setgroups
10096 ;
10097 return 0;
10098}
10099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010100if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010101
Matthias Kloseb9621712010-04-24 17:59:49 +000010102$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010103
Matthias Kloseb159a552010-04-25 21:00:44 +000010104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010105$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010106else
Matthias Kloseb9621712010-04-24 17:59:49 +000010107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10108$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010109
10110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010112
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010113# check for openpty and forkpty
10114
10115for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010116do :
10117 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010118if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010119 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010120#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010121_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010122
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010123else
Matthias Kloseb9621712010-04-24 17:59:49 +000010124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10125$as_echo_n "checking for openpty in -lutil... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010126if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010127 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010128else
Martin v. Löwis11437992002-04-12 09:54:03 +000010129 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010130LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134/* Override any GCC internal prototype to avoid an error.
10135 Use char because int might match the return type of a GCC
10136 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010137#ifdef __cplusplus
10138extern "C"
10139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010140char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010141int
10142main ()
10143{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010144return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010145 ;
10146 return 0;
10147}
10148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010149if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010150 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010151else
Matthias Kloseb9621712010-04-24 17:59:49 +000010152 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010154rm -f core conftest.err conftest.$ac_objext \
10155 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010156LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10159$as_echo "$ac_cv_lib_util_openpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010160if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010161 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010162 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010163else
Matthias Kloseb9621712010-04-24 17:59:49 +000010164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10165$as_echo_n "checking for openpty in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010166if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010167 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010168else
10169 ac_check_lib_save_LIBS=$LIBS
10170LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010172/* end confdefs.h. */
10173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174/* Override any GCC internal prototype to avoid an error.
10175 Use char because int might match the return type of a GCC
10176 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010177#ifdef __cplusplus
10178extern "C"
10179#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010180char openpty ();
10181int
10182main ()
10183{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010184return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010185 ;
10186 return 0;
10187}
10188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010189if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010190 ac_cv_lib_bsd_openpty=yes
10191else
Matthias Kloseb9621712010-04-24 17:59:49 +000010192 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010194rm -f core conftest.err conftest.$ac_objext \
10195 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010196LIBS=$ac_check_lib_save_LIBS
10197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10199$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010200if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010202 LIBS="$LIBS -lbsd"
10203fi
10204
10205
10206fi
10207
Fred Drake8cef4cf2000-06-28 16:40:38 +000010208
10209fi
10210done
10211
10212for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010213do :
10214 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010215if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010217#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010218_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010219
Fred Drake8cef4cf2000-06-28 16:40:38 +000010220else
Matthias Kloseb9621712010-04-24 17:59:49 +000010221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10222$as_echo_n "checking for forkpty in -lutil... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010223if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010224 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010225else
Martin v. Löwis11437992002-04-12 09:54:03 +000010226 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010227LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010229/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010231/* Override any GCC internal prototype to avoid an error.
10232 Use char because int might match the return type of a GCC
10233 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010234#ifdef __cplusplus
10235extern "C"
10236#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010237char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010238int
10239main ()
10240{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010241return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010242 ;
10243 return 0;
10244}
10245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010246if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010248else
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010251rm -f core conftest.err conftest.$ac_objext \
10252 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010253LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10256$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010257if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010259 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010260else
Matthias Kloseb9621712010-04-24 17:59:49 +000010261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10262$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010263if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010264 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010265else
10266 ac_check_lib_save_LIBS=$LIBS
10267LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010269/* end confdefs.h. */
10270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010271/* Override any GCC internal prototype to avoid an error.
10272 Use char because int might match the return type of a GCC
10273 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010274#ifdef __cplusplus
10275extern "C"
10276#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010277char forkpty ();
10278int
10279main ()
10280{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010282 ;
10283 return 0;
10284}
10285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010286if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010287 ac_cv_lib_bsd_forkpty=yes
10288else
Matthias Kloseb9621712010-04-24 17:59:49 +000010289 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010290fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010291rm -f core conftest.err conftest.$ac_objext \
10292 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010293LIBS=$ac_check_lib_save_LIBS
10294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10296$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010297if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010298 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010299 LIBS="$LIBS -lbsd"
10300fi
10301
10302
10303fi
10304
Fred Drake8cef4cf2000-06-28 16:40:38 +000010305
10306fi
10307done
10308
Jack Jansendd19cf82001-12-06 22:36:17 +000010309
Christian Heimesb186d002008-03-18 15:15:01 +000010310# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010311for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010312do :
10313 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010314if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010315 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010316#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010317_ACEOF
10318
10319fi
10320done
10321
10322
Michael W. Hudson54241132001-12-07 15:38:26 +000010323# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010324for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010325do :
10326 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10327ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010328eval as_val=\$$as_ac_var
10329 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010331#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010332_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010333
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010334fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010335done
10336
Michael W. Hudson54241132001-12-07 15:38:26 +000010337
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010338for ac_func in dup2 getcwd strdup
10339do :
10340 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10341ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10342eval as_val=\$$as_ac_var
10343 if test "x$as_val" = x""yes; then :
10344 cat >>confdefs.h <<_ACEOF
10345#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10346_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010347
Martin v. Löwis1142de32002-03-29 16:28:31 +000010348else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010349 case " $LIBOBJS " in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010350 *" $ac_func.$ac_objext "* ) ;;
10351 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010352 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010353esac
10354
Martin v. Löwis1142de32002-03-29 16:28:31 +000010355fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010356done
Martin v. Löwis1142de32002-03-29 16:28:31 +000010357
10358
10359for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010360do :
10361 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010362if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010364#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010367/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010368#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010369int
10370main ()
10371{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010372getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010373 ;
10374 return 0;
10375}
10376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010377if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010378
Matthias Kloseb9621712010-04-24 17:59:49 +000010379$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010380
Guido van Rossum627b2d71993-12-24 10:39:16 +000010381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010383
Guido van Rossum627b2d71993-12-24 10:39:16 +000010384fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010385done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010386
Jack Jansen150753c2003-03-29 22:07:47 +000010387for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010388do :
10389 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010390if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010391 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010392#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010395/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010396#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010397int
10398main ()
10399{
10400setpgrp(0,0);
10401 ;
10402 return 0;
10403}
10404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010405if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010406
Matthias Kloseb9621712010-04-24 17:59:49 +000010407$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010408
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010411
10412fi
10413done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010414
Thomas Wouters3a584202000-08-05 23:28:51 +000010415for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010416do :
10417 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010418if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010419 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010420#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010423/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010424#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010425int
10426main ()
10427{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010428gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010429 ;
10430 return 0;
10431}
10432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010433if ac_fn_c_try_compile "$LINENO"; then :
10434
Guido van Rossum627b2d71993-12-24 10:39:16 +000010435else
Skip Montanaro6dead952003-09-25 14:50:04 +000010436
Matthias Kloseb9621712010-04-24 17:59:49 +000010437$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010438
Martin v. Löwis11437992002-04-12 09:54:03 +000010439
Guido van Rossum627b2d71993-12-24 10:39:16 +000010440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010442
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010443fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010444done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010445
Michael W. Hudson54241132001-12-07 15:38:26 +000010446
Matthias Kloseb9621712010-04-24 17:59:49 +000010447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10448$as_echo_n "checking for major... " >&6; }
10449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010450/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010451
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010452#if defined(MAJOR_IN_MKDEV)
10453#include <sys/mkdev.h>
10454#elif defined(MAJOR_IN_SYSMACROS)
10455#include <sys/sysmacros.h>
10456#else
10457#include <sys/types.h>
10458#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010459
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010460int
10461main ()
10462{
10463
10464 makedev(major(0),minor(0));
10465
10466 ;
10467 return 0;
10468}
10469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010470if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010471
10472
Matthias Kloseb9621712010-04-24 17:59:49 +000010473$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010474
Matthias Kloseb9621712010-04-24 17:59:49 +000010475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10476$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010477
10478else
Skip Montanaro6dead952003-09-25 14:50:04 +000010479
Matthias Kloseb9621712010-04-24 17:59:49 +000010480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10481$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010482
10483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010484rm -f core conftest.err conftest.$ac_objext \
10485 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010486
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010487# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010488# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10490$as_echo_n "checking for getaddrinfo... " >&6; }
10491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010492/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010493
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010494#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010495#include <sys/socket.h>
10496#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010497#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010498
Martin v. Löwis11437992002-04-12 09:54:03 +000010499int
10500main ()
10501{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010502getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010503 ;
10504 return 0;
10505}
10506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010507if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010508 have_getaddrinfo=yes
10509else
Matthias Kloseb9621712010-04-24 17:59:49 +000010510 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010512rm -f core conftest.err conftest.$ac_objext \
10513 conftest$ac_exeext conftest.$ac_ext
10514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10515$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010516if test $have_getaddrinfo = yes
10517then
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10519$as_echo_n "checking getaddrinfo bug... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010520 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010521 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010522else
Matthias Kloseb9621712010-04-24 17:59:49 +000010523 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010524 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010525else
Matthias Kloseb9621712010-04-24 17:59:49 +000010526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010527/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010528
10529#include <sys/types.h>
10530#include <netdb.h>
10531#include <string.h>
10532#include <sys/socket.h>
10533#include <netinet/in.h>
10534
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010535int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010536{
10537 int passive, gaierr, inet4 = 0, inet6 = 0;
10538 struct addrinfo hints, *ai, *aitop;
10539 char straddr[INET6_ADDRSTRLEN], strport[16];
10540
10541 for (passive = 0; passive <= 1; passive++) {
10542 memset(&hints, 0, sizeof(hints));
10543 hints.ai_family = AF_UNSPEC;
10544 hints.ai_flags = passive ? AI_PASSIVE : 0;
10545 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010546 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010547 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10548 (void)gai_strerror(gaierr);
10549 goto bad;
10550 }
10551 for (ai = aitop; ai; ai = ai->ai_next) {
10552 if (ai->ai_addr == NULL ||
10553 ai->ai_addrlen == 0 ||
10554 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10555 straddr, sizeof(straddr), strport, sizeof(strport),
10556 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10557 goto bad;
10558 }
10559 switch (ai->ai_family) {
10560 case AF_INET:
10561 if (strcmp(strport, "54321") != 0) {
10562 goto bad;
10563 }
10564 if (passive) {
10565 if (strcmp(straddr, "0.0.0.0") != 0) {
10566 goto bad;
10567 }
10568 } else {
10569 if (strcmp(straddr, "127.0.0.1") != 0) {
10570 goto bad;
10571 }
10572 }
10573 inet4++;
10574 break;
10575 case AF_INET6:
10576 if (strcmp(strport, "54321") != 0) {
10577 goto bad;
10578 }
10579 if (passive) {
10580 if (strcmp(straddr, "::") != 0) {
10581 goto bad;
10582 }
10583 } else {
10584 if (strcmp(straddr, "::1") != 0) {
10585 goto bad;
10586 }
10587 }
10588 inet6++;
10589 break;
10590 case AF_UNSPEC:
10591 goto bad;
10592 break;
10593 default:
10594 /* another family support? */
10595 break;
10596 }
10597 }
10598 }
10599
10600 if (!(inet4 == 0 || inet4 == 2))
10601 goto bad;
10602 if (!(inet6 == 0 || inet6 == 2))
10603 goto bad;
10604
10605 if (aitop)
10606 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010607 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010608
10609 bad:
10610 if (aitop)
10611 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010612 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010613}
10614
Martin v. Löwis11437992002-04-12 09:54:03 +000010615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010616if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010617 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010618else
Matthias Kloseb9621712010-04-24 17:59:49 +000010619 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010620fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10622 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010625fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010626
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010628
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10630$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10631
Mark Dickinson2df5d282009-12-31 21:22:50 +000010632if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010633then
10634 if test $ipv6 = yes
10635 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010636 echo 'Fatal: You must get working getaddrinfo() function.'
10637 echo ' or you can specify "--disable-ipv6"'.
10638 exit 1
10639 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010640else
Martin v. Löwis11437992002-04-12 09:54:03 +000010641
Matthias Kloseb9621712010-04-24 17:59:49 +000010642$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010643
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010644fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010645
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010646for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010647do :
10648 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010649if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010650 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010651#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010652_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010653
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010654fi
10655done
10656
Michael W. Hudson54241132001-12-07 15:38:26 +000010657
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010658# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10660$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010661if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010662 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010663else
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010666#include <sys/types.h>
10667#include <sys/time.h>
10668#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010669
Martin v. Löwis11437992002-04-12 09:54:03 +000010670int
10671main ()
10672{
10673if ((struct tm *) 0)
10674return 0;
10675 ;
10676 return 0;
10677}
10678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010679if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010680 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010681else
Matthias Kloseb9621712010-04-24 17:59:49 +000010682 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010685fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10687$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010688if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010689
Matthias Kloseb9621712010-04-24 17:59:49 +000010690$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010691
10692fi
10693
Matthias Kloseb9621712010-04-24 17:59:49 +000010694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10695$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010696if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010698else
Matthias Kloseb9621712010-04-24 17:59:49 +000010699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010700/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010701#include <sys/types.h>
10702#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010703
Martin v. Löwis11437992002-04-12 09:54:03 +000010704int
10705main ()
10706{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707struct tm tm;
10708 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010710 ;
10711 return 0;
10712}
10713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010714if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010715 ac_cv_struct_tm=time.h
10716else
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10722$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010723if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010724
Matthias Kloseb9621712010-04-24 17:59:49 +000010725$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010726
10727fi
10728
Matthias Kloseb9621712010-04-24 17:59:49 +000010729ac_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 +000010730#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010731
Matthias Kloseb9621712010-04-24 17:59:49 +000010732"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010733if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010734
10735cat >>confdefs.h <<_ACEOF
10736#define HAVE_STRUCT_TM_TM_ZONE 1
10737_ACEOF
10738
10739
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010740fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010741
Martin v. Löwis11437992002-04-12 09:54:03 +000010742if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10743
Matthias Kloseb9621712010-04-24 17:59:49 +000010744$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010745
10746else
Matthias Kloseb9621712010-04-24 17:59:49 +000010747 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10748"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010749if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010750 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010751else
Matthias Kloseb9621712010-04-24 17:59:49 +000010752 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010753fi
10754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010755cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010756#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010757_ACEOF
10758
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10760$as_echo_n "checking for tzname... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010761if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010762 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010763else
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010765/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010766#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010767#if !HAVE_DECL_TZNAME
10768extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010770
Martin v. Löwis11437992002-04-12 09:54:03 +000010771int
10772main ()
10773{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010774return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010775 ;
10776 return 0;
10777}
10778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010779if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010780 ac_cv_var_tzname=yes
10781else
Matthias Kloseb9621712010-04-24 17:59:49 +000010782 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010784rm -f core conftest.err conftest.$ac_objext \
10785 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010786fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10788$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010789 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010790
Matthias Kloseb9621712010-04-24 17:59:49 +000010791$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010792
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010793 fi
10794fi
10795
Matthias Kloseb9621712010-04-24 17:59:49 +000010796ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010797if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010798
10799cat >>confdefs.h <<_ACEOF
10800#define HAVE_STRUCT_STAT_ST_RDEV 1
10801_ACEOF
10802
10803
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010804fi
10805
Matthias Kloseb9621712010-04-24 17:59:49 +000010806ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010807if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010808
Martin v. Löwis11437992002-04-12 09:54:03 +000010809cat >>confdefs.h <<_ACEOF
10810#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10811_ACEOF
10812
10813
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010814fi
10815
Matthias Kloseb9621712010-04-24 17:59:49 +000010816ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010817if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010818
10819cat >>confdefs.h <<_ACEOF
10820#define HAVE_STRUCT_STAT_ST_FLAGS 1
10821_ACEOF
10822
10823
10824fi
10825
Matthias Kloseb9621712010-04-24 17:59:49 +000010826ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010827if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010828
10829cat >>confdefs.h <<_ACEOF
10830#define HAVE_STRUCT_STAT_ST_GEN 1
10831_ACEOF
10832
10833
10834fi
10835
Matthias Kloseb9621712010-04-24 17:59:49 +000010836ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010837if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010838
10839cat >>confdefs.h <<_ACEOF
10840#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10841_ACEOF
10842
10843
10844fi
10845
Matthias Kloseb9621712010-04-24 17:59:49 +000010846ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010847if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010848
Martin v. Löwis11437992002-04-12 09:54:03 +000010849cat >>confdefs.h <<_ACEOF
10850#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10851_ACEOF
10852
10853
Matthias Kloseb9621712010-04-24 17:59:49 +000010854$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010855
10856else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010857 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010858 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010859 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10860 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010861esac
10862
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010863fi
10864
Michael W. Hudson54241132001-12-07 15:38:26 +000010865
Martin v. Löwis11437992002-04-12 09:54:03 +000010866
Matthias Kloseb9621712010-04-24 17:59:49 +000010867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10868$as_echo_n "checking for time.h that defines altzone... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010869if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010870 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010871else
Matthias Kloseb159a552010-04-25 21:00:44 +000010872
Matthias Kloseb9621712010-04-24 17:59:49 +000010873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010874/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010875#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010876int
10877main ()
10878{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010879return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010880 ;
10881 return 0;
10882}
10883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010884if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010885 ac_cv_header_time_altzone=yes
10886else
Matthias Kloseb9621712010-04-24 17:59:49 +000010887 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010891fi
10892
Matthias Kloseb9621712010-04-24 17:59:49 +000010893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10894$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010895if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010896
Matthias Kloseb9621712010-04-24 17:59:49 +000010897$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010898
10899fi
10900
Guido van Rossumda88dad1995-01-26 00:46:29 +000010901was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10903$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010905/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010906
10907#include <sys/types.h>
10908#include <sys/select.h>
10909#include <sys/time.h>
10910
Martin v. Löwis11437992002-04-12 09:54:03 +000010911int
10912main ()
10913{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010914;
Martin v. Löwis11437992002-04-12 09:54:03 +000010915 ;
10916 return 0;
10917}
10918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010919if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010920
10921
Matthias Kloseb9621712010-04-24 17:59:49 +000010922$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010923
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010924 was_it_defined=yes
10925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10929$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010930
Matthias Kloseb9621712010-04-24 17:59:49 +000010931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10932$as_echo_n "checking for addrinfo... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010933if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010934 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010935else
Matthias Kloseb9621712010-04-24 17:59:49 +000010936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010937/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010938#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010939int
10940main ()
10941{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010942struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010943 ;
10944 return 0;
10945}
10946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010947if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010948 ac_cv_struct_addrinfo=yes
10949else
Matthias Kloseb9621712010-04-24 17:59:49 +000010950 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10953fi
10954
Matthias Kloseb9621712010-04-24 17:59:49 +000010955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10956$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010957if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010958
Matthias Kloseb9621712010-04-24 17:59:49 +000010959$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010960
10961fi
10962
Matthias Kloseb9621712010-04-24 17:59:49 +000010963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10964$as_echo_n "checking for sockaddr_storage... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010965if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010967else
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010969/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010970
10971# include <sys/types.h>
10972# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010973int
10974main ()
10975{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010976struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010977 ;
10978 return 0;
10979}
10980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010981if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010982 ac_cv_struct_sockaddr_storage=yes
10983else
Matthias Kloseb9621712010-04-24 17:59:49 +000010984 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10987fi
10988
Matthias Kloseb9621712010-04-24 17:59:49 +000010989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10990$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010991if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010992
Matthias Kloseb9621712010-04-24 17:59:49 +000010993$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010994
10995fi
10996
Guido van Rossum627b2d71993-12-24 10:39:16 +000010997# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010998
Matthias Kloseb9621712010-04-24 17:59:49 +000010999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11000$as_echo_n "checking whether char is unsigned... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011001if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011002 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011003else
Matthias Kloseb9621712010-04-24 17:59:49 +000011004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011006$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011007int
11008main ()
11009{
11010static int test_array [1 - 2 * !(((char) -1) < 0)];
11011test_array [0] = 0
11012
11013 ;
11014 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011015}
Martin v. Löwis11437992002-04-12 09:54:03 +000011016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011017if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011018 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011019else
Matthias Kloseb9621712010-04-24 17:59:49 +000011020 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11025$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011026if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011028
11029fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011030
Matthias Kloseb9621712010-04-24 17:59:49 +000011031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11032$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011033if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011034 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011035else
Matthias Kloseb9621712010-04-24 17:59:49 +000011036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011037/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011038
Martin v. Löwis11437992002-04-12 09:54:03 +000011039int
11040main ()
11041{
11042/* FIXME: Include the comments suggested by Paul. */
11043#ifndef __cplusplus
11044 /* Ultrix mips cc rejects this. */
11045 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011046 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011047 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011048 char const *const *pcpcc;
11049 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011050 /* NEC SVR4.0.2 mips cc rejects this. */
11051 struct point {int x, y;};
11052 static struct point const zero = {0,0};
11053 /* AIX XL C 1.02.0.0 rejects this.
11054 It does not let you subtract one const X* pointer from another in
11055 an arm of an if-expression whose if-part is not a constant
11056 expression */
11057 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011058 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011059 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011060 ++pcpcc;
11061 ppc = (char**) pcpcc;
11062 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011063 { /* SCO 3.2v4 cc rejects this. */
11064 char *t;
11065 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011066
Martin v. Löwis11437992002-04-12 09:54:03 +000011067 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011068 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011069 }
11070 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11071 int x[] = {25, 17};
11072 const int *foo = &x[0];
11073 ++foo;
11074 }
11075 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11076 typedef const int *iptr;
11077 iptr p = 0;
11078 ++p;
11079 }
11080 { /* AIX XL C 1.02.0.0 rejects this saying
11081 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11082 struct s { int j; const int *ap[3]; };
11083 struct s *b; b->j = 5;
11084 }
11085 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11086 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011087 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011088 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011089 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011090#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011091
Martin v. Löwis11437992002-04-12 09:54:03 +000011092 ;
11093 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011094}
Martin v. Löwis11437992002-04-12 09:54:03 +000011095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011096if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011097 ac_cv_c_const=yes
11098else
Matthias Kloseb9621712010-04-24 17:59:49 +000011099 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11104$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011105if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011106
Matthias Kloseb9621712010-04-24 17:59:49 +000011107$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011108
11109fi
11110
Michael W. Hudson54241132001-12-07 15:38:26 +000011111
Guido van Rossumda88dad1995-01-26 00:46:29 +000011112works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11114$as_echo_n "checking for working volatile... " >&6; }
11115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011116/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011117
Martin v. Löwis11437992002-04-12 09:54:03 +000011118int
11119main ()
11120{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011121volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 ;
11123 return 0;
11124}
11125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011126if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011127 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011128else
Skip Montanaro6dead952003-09-25 14:50:04 +000011129
Matthias Kloseb9621712010-04-24 17:59:49 +000011130$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011131
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011132
Guido van Rossum627b2d71993-12-24 10:39:16 +000011133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11136$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011137
Guido van Rossumda88dad1995-01-26 00:46:29 +000011138works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11140$as_echo_n "checking for working signed char... " >&6; }
11141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011142/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011143
Martin v. Löwis11437992002-04-12 09:54:03 +000011144int
11145main ()
11146{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011147signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011148 ;
11149 return 0;
11150}
11151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011152if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011153 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011154else
Skip Montanaro6dead952003-09-25 14:50:04 +000011155
Matthias Kloseb9621712010-04-24 17:59:49 +000011156$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011157
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011158
Guido van Rossum7f43da71994-08-01 12:15:30 +000011159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11162$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011163
Guido van Rossumda88dad1995-01-26 00:46:29 +000011164have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11166$as_echo_n "checking for prototypes... " >&6; }
11167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011168/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011169int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011170int
11171main ()
11172{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011173return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011174 ;
11175 return 0;
11176}
11177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011178if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011179
Matthias Kloseb9621712010-04-24 17:59:49 +000011180$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011181
Matthias Kloseb159a552010-04-25 21:00:44 +000011182 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11186$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011187
Guido van Rossumda88dad1995-01-26 00:46:29 +000011188works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11190$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011192/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011193
11194#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011195int foo(int x, ...) {
11196 va_list va;
11197 va_start(va, x);
11198 va_arg(va, int);
11199 va_arg(va, char *);
11200 va_arg(va, double);
11201 return 0;
11202}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011203
Martin v. Löwis11437992002-04-12 09:54:03 +000011204int
11205main ()
11206{
Guido van Rossum90eea071996-08-30 20:58:57 +000011207return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011208 ;
11209 return 0;
11210}
11211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011212if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011213
11214
Matthias Kloseb9621712010-04-24 17:59:49 +000011215$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011216
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011217 works=yes
11218
Guido van Rossum627b2d71993-12-24 10:39:16 +000011219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11222$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011223
Martin v. Löwisd6320502004-08-12 13:45:08 +000011224# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11226$as_echo_n "checking for socketpair... " >&6; }
11227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011228/* end confdefs.h. */
11229
11230#include <sys/types.h>
11231#include <sys/socket.h>
11232
11233int
11234main ()
11235{
11236void *x=socketpair
11237 ;
11238 return 0;
11239}
11240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011241if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011242
Matthias Kloseb9621712010-04-24 17:59:49 +000011243$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011244
Matthias Kloseb159a552010-04-25 21:00:44 +000011245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011246$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011247else
Matthias Kloseb9621712010-04-24 17:59:49 +000011248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11249$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011250
11251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011253
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011254# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11256$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011258/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011259#include <sys/types.h>
11260#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011261int
11262main ()
11263{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011264struct sockaddr x;
11265x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011266 ;
11267 return 0;
11268}
11269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011270if ac_fn_c_try_compile "$LINENO"; then :
11271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11272$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011273
Matthias Kloseb9621712010-04-24 17:59:49 +000011274$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011275
11276else
Matthias Kloseb9621712010-04-24 17:59:49 +000011277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11278$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011279
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011282
Guido van Rossumda88dad1995-01-26 00:46:29 +000011283va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11285$as_echo_n "checking whether va_list is an array... " >&6; }
11286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011287/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011288
11289#ifdef HAVE_STDARG_PROTOTYPES
11290#include <stdarg.h>
11291#else
11292#include <varargs.h>
11293#endif
11294
Martin v. Löwis11437992002-04-12 09:54:03 +000011295int
11296main ()
11297{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011298va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 ;
11300 return 0;
11301}
11302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011303if ac_fn_c_try_compile "$LINENO"; then :
11304
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011305else
Skip Montanaro6dead952003-09-25 14:50:04 +000011306
Martin v. Löwis11437992002-04-12 09:54:03 +000011307
Matthias Kloseb9621712010-04-24 17:59:49 +000011308$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011309
Guido van Rossumda88dad1995-01-26 00:46:29 +000011310 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011311
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11315$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011316
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011317# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011318
11319
Matthias Kloseb9621712010-04-24 17:59:49 +000011320ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011321if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011322
Matthias Kloseb9621712010-04-24 17:59:49 +000011323 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011324
Matthias Kloseb9621712010-04-24 17:59:49 +000011325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11326$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011327 OLD_CFLAGS=$CFLAGS
11328 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011330/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011331
11332# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011333
Martin v. Löwis11437992002-04-12 09:54:03 +000011334int
11335main ()
11336{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011337
11338 char *name;
11339 struct hostent *he, *res;
11340 char buffer[2048];
11341 int buflen = 2048;
11342 int h_errnop;
11343
11344 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011345
11346 ;
11347 return 0;
11348}
11349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011350if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011351
Matthias Kloseb9621712010-04-24 17:59:49 +000011352 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011353
Martin v. Löwis11437992002-04-12 09:54:03 +000011354
Matthias Kloseb9621712010-04-24 17:59:49 +000011355$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011356
Matthias Kloseb9621712010-04-24 17:59:49 +000011357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11358$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011359
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011360else
Skip Montanaro6dead952003-09-25 14:50:04 +000011361
Matthias Kloseb9621712010-04-24 17:59:49 +000011362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11363$as_echo "no" >&6; }
11364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11365$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011367/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011368
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011369# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011370
Martin v. Löwis11437992002-04-12 09:54:03 +000011371int
11372main ()
11373{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011374
11375 char *name;
11376 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011377 char buffer[2048];
11378 int buflen = 2048;
11379 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011380
Matthias Kloseb159a552010-04-25 21:00:44 +000011381 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011382
11383 ;
11384 return 0;
11385}
11386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011388
Matthias Kloseb9621712010-04-24 17:59:49 +000011389 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011390
Martin v. Löwis11437992002-04-12 09:54:03 +000011391
Matthias Kloseb159a552010-04-25 21:00:44 +000011392$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011393
Matthias Kloseb9621712010-04-24 17:59:49 +000011394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11395$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011396
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011397else
Skip Montanaro6dead952003-09-25 14:50:04 +000011398
Matthias Kloseb9621712010-04-24 17:59:49 +000011399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11400$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11402$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11404/* end confdefs.h. */
11405
11406# include <netdb.h>
11407
11408int
11409main ()
11410{
11411
11412 char *name;
11413 struct hostent *he;
11414 struct hostent_data data;
11415
11416 (void) gethostbyname_r(name, he, &data);
11417
11418 ;
11419 return 0;
11420}
11421_ACEOF
11422if ac_fn_c_try_compile "$LINENO"; then :
11423
11424 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11425
11426
11427$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11428
11429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11430$as_echo "yes" >&6; }
11431
11432else
11433
11434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11435$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011436
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011439
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011442
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011445 CFLAGS=$OLD_CFLAGS
11446
11447else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011448
Matthias Kloseb9621712010-04-24 17:59:49 +000011449 for ac_func in gethostbyname
11450do :
11451 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011452if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011453 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011454#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011455_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011456
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011457fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011458done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011459
Michael W. Hudson54241132001-12-07 15:38:26 +000011460
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011461fi
11462
Michael W. Hudson54241132001-12-07 15:38:26 +000011463
11464
11465
11466
11467
11468
Guido van Rossum627b2d71993-12-24 10:39:16 +000011469# checks for system services
11470# (none yet)
11471
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011472# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011473ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011474if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011475
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011476else
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11478$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011479if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011480 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011481else
Martin v. Löwis11437992002-04-12 09:54:03 +000011482 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011483LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011485/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011487/* Override any GCC internal prototype to avoid an error.
11488 Use char because int might match the return type of a GCC
11489 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011490#ifdef __cplusplus
11491extern "C"
11492#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011493char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011494int
11495main ()
11496{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011498 ;
11499 return 0;
11500}
11501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011502if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011503 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011504else
Matthias Kloseb9621712010-04-24 17:59:49 +000011505 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011507rm -f core conftest.err conftest.$ac_objext \
11508 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011509LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11512$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011513if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 cat >>confdefs.h <<_ACEOF
11515#define HAVE_LIBIEEE 1
11516_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011517
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011518 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011519
Guido van Rossum627b2d71993-12-24 10:39:16 +000011520fi
11521
Michael W. Hudson54241132001-12-07 15:38:26 +000011522
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011523fi
11524
Michael W. Hudson54241132001-12-07 15:38:26 +000011525
Guido van Rossum7f253911997-05-09 02:42:48 +000011526# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11528$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011530# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011531if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011533if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011534then
11535
Matthias Kloseb9621712010-04-24 17:59:49 +000011536$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011537
Matthias Kloseb9621712010-04-24 17:59:49 +000011538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11539$as_echo "yes" >&6; }
11540else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11541$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011542fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011543else
Matthias Kloseb9621712010-04-24 17:59:49 +000011544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11545$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011546fi
11547
Guido van Rossum7f253911997-05-09 02:42:48 +000011548
Guido van Rossum7f43da71994-08-01 12:15:30 +000011549# check for --with-libm=...
11550
Guido van Rossum563e7081996-09-10 18:20:48 +000011551case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011552Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011553*) LIBM=-lm
11554esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11556$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011558# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011559if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011561if test "$withval" = no
11562then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11564$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011565elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011566then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11568$as_echo "set LIBM=\"$withval\"" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011569else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011570fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011571else
Matthias Kloseb9621712010-04-24 17:59:49 +000011572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11573$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011574fi
11575
Guido van Rossum7f43da71994-08-01 12:15:30 +000011576
11577# check for --with-libc=...
11578
Matthias Kloseb9621712010-04-24 17:59:49 +000011579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11580$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011582# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011583if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011584 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011585if test "$withval" = no
11586then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11588$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011589elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011590then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11592$as_echo "set LIBC=\"$withval\"" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011593else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011594fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011595else
Matthias Kloseb9621712010-04-24 17:59:49 +000011596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11597$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011598fi
11599
Guido van Rossum7f43da71994-08-01 12:15:30 +000011600
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011601# **************************************************
11602# * Check for various properties of floating point *
11603# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011604
Matthias Kloseb9621712010-04-24 17:59:49 +000011605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11606$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011607if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011608 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011609else
11610
Matthias Kloseb9621712010-04-24 17:59:49 +000011611if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011612 ac_cv_little_endian_double=no
11613else
Matthias Kloseb9621712010-04-24 17:59:49 +000011614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011615/* end confdefs.h. */
11616
11617#include <string.h>
11618int main() {
11619 double x = 9006104071832581.0;
11620 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11621 return 0;
11622 else
11623 return 1;
11624}
11625
11626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011627if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011628 ac_cv_little_endian_double=yes
11629else
Matthias Kloseb9621712010-04-24 17:59:49 +000011630 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011632rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11633 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011634fi
11635
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011636fi
11637
Matthias Kloseb9621712010-04-24 17:59:49 +000011638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11639$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011640if test "$ac_cv_little_endian_double" = yes
11641then
11642
Matthias Kloseb9621712010-04-24 17:59:49 +000011643$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011644
11645fi
11646
Matthias Kloseb9621712010-04-24 17:59:49 +000011647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11648$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011649if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011651else
11652
Matthias Kloseb9621712010-04-24 17:59:49 +000011653if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011654 ac_cv_big_endian_double=no
11655else
Matthias Kloseb9621712010-04-24 17:59:49 +000011656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011657/* end confdefs.h. */
11658
11659#include <string.h>
11660int main() {
11661 double x = 9006104071832581.0;
11662 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11663 return 0;
11664 else
11665 return 1;
11666}
11667
11668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011669if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011670 ac_cv_big_endian_double=yes
11671else
Matthias Kloseb9621712010-04-24 17:59:49 +000011672 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011673fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011674rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11675 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011676fi
11677
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011678fi
11679
Matthias Kloseb9621712010-04-24 17:59:49 +000011680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11681$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011682if test "$ac_cv_big_endian_double" = yes
11683then
11684
Matthias Kloseb9621712010-04-24 17:59:49 +000011685$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011686
11687fi
11688
11689# Some ARM platforms use a mixed-endian representation for doubles.
11690# While Python doesn't currently have full support for these platforms
11691# (see e.g., issue 1762561), we can at least make sure that float <-> string
11692# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11694$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011695if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011696 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011697else
11698
Matthias Kloseb9621712010-04-24 17:59:49 +000011699if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011700 ac_cv_mixed_endian_double=no
11701else
Matthias Kloseb9621712010-04-24 17:59:49 +000011702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011703/* end confdefs.h. */
11704
11705#include <string.h>
11706int main() {
11707 double x = 9006104071832581.0;
11708 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11709 return 0;
11710 else
11711 return 1;
11712}
11713
11714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011715if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011716 ac_cv_mixed_endian_double=yes
11717else
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011720rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11721 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011722fi
11723
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011724fi
11725
Matthias Kloseb9621712010-04-24 17:59:49 +000011726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11727$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011728if test "$ac_cv_mixed_endian_double" = yes
11729then
11730
Matthias Kloseb9621712010-04-24 17:59:49 +000011731$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011732
11733fi
11734
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011735# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011736# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011737# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011738# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011739# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011740# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011741
11742# This inline assembler syntax may also work for suncc and icc,
11743# so we try it on all platforms.
11744
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11746$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011748/* end confdefs.h. */
11749
11750int
11751main ()
11752{
11753
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011754 unsigned short cw;
11755 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11756 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011757
11758 ;
11759 return 0;
11760}
11761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011762if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011763 have_gcc_asm_for_x87=yes
11764else
Matthias Kloseb9621712010-04-24 17:59:49 +000011765 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011766fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11769$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011770if test "$have_gcc_asm_for_x87" = yes
11771then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011772
Matthias Kloseb9621712010-04-24 17:59:49 +000011773$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011774
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011775fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011776
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011777# Detect whether system arithmetic is subject to x87-style double
11778# rounding issues. The result of this test has little meaning on non
11779# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11780# mode is round-to-nearest and double rounding issues are present, and
11781# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11783$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011784# $BASECFLAGS may affect the result
11785ac_save_cc="$CC"
11786CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011787if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011788 ac_cv_x87_double_rounding=no
11789else
Matthias Kloseb9621712010-04-24 17:59:49 +000011790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011791/* end confdefs.h. */
11792
11793#include <stdlib.h>
11794#include <math.h>
11795int main() {
11796 volatile double x, y, z;
11797 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11798 x = 0.99999999999999989; /* 1-2**-53 */
11799 y = 1./x;
11800 if (y != 1.)
11801 exit(0);
11802 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11803 x = 1e16;
11804 y = 2.99999;
11805 z = x + y;
11806 if (z != 1e16+4.)
11807 exit(0);
11808 /* both tests show evidence of double rounding */
11809 exit(1);
11810}
11811
11812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011813if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011814 ac_cv_x87_double_rounding=no
11815else
Matthias Kloseb9621712010-04-24 17:59:49 +000011816 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11819 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011820fi
11821
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011822CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11824$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011825if test "$ac_cv_x87_double_rounding" = yes
11826then
11827
Matthias Kloseb9621712010-04-24 17:59:49 +000011828$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011829
11830fi
11831
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011832# ************************************
11833# * Check for mathematical functions *
11834# ************************************
11835
11836LIBS_SAVE=$LIBS
11837LIBS="$LIBS $LIBM"
11838
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011839for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11840do :
11841 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11842ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011843eval as_val=\$$as_ac_var
11844 if test "x$as_val" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011845 cat >>confdefs.h <<_ACEOF
11846#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11847_ACEOF
11848
11849fi
11850done
11851
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011852for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011853do :
11854 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11855ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011856eval as_val=\$$as_ac_var
11857 if test "x$as_val" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011858 cat >>confdefs.h <<_ACEOF
11859#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11860_ACEOF
11861
11862fi
11863done
11864
11865ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11866"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011867if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011868 ac_have_decl=1
11869else
11870 ac_have_decl=0
11871fi
11872
11873cat >>confdefs.h <<_ACEOF
11874#define HAVE_DECL_ISINF $ac_have_decl
11875_ACEOF
11876ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11877"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011878if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011879 ac_have_decl=1
11880else
11881 ac_have_decl=0
11882fi
11883
11884cat >>confdefs.h <<_ACEOF
11885#define HAVE_DECL_ISNAN $ac_have_decl
11886_ACEOF
11887ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11888"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011889if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011890 ac_have_decl=1
11891else
11892 ac_have_decl=0
11893fi
11894
11895cat >>confdefs.h <<_ACEOF
11896#define HAVE_DECL_ISFINITE $ac_have_decl
11897_ACEOF
11898
11899
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011900# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11901# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11903$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011904if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011905 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011906else
11907
Matthias Kloseb9621712010-04-24 17:59:49 +000011908if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011909 ac_cv_tanh_preserves_zero_sign=no
11910else
Matthias Kloseb9621712010-04-24 17:59:49 +000011911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011912/* end confdefs.h. */
11913
11914#include <math.h>
11915#include <stdlib.h>
11916int main() {
11917 /* return 0 if either negative zeros don't exist
11918 on this platform or if negative zeros exist
11919 and tanh(-0.) == -0. */
11920 if (atan2(0., -1.) == atan2(-0., -1.) ||
11921 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11922 else exit(1);
11923}
11924
11925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011926if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011927 ac_cv_tanh_preserves_zero_sign=yes
11928else
Matthias Kloseb9621712010-04-24 17:59:49 +000011929 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11932 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011933fi
11934
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011935fi
11936
Matthias Kloseb9621712010-04-24 17:59:49 +000011937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11938$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011939if test "$ac_cv_tanh_preserves_zero_sign" = yes
11940then
11941
Matthias Kloseb9621712010-04-24 17:59:49 +000011942$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011943
11944fi
11945
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011946if test "$ac_cv_func_log1p" = yes
11947then
11948 # On some versions of AIX, log1p(-0.) returns 0. instead of
11949 # -0. See issue #9920.
11950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11951$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011952 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011953 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011954else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011955
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011956 if test "$cross_compiling" = yes; then :
11957 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011958else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11960/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011961
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011962 #include <math.h>
11963 #include <stdlib.h>
11964 int main() {
11965 /* Fail if the signs of log1p(-0.) and -0. can be
11966 distinguished. */
11967 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11968 return 0;
11969 else
11970 return 1;
11971 }
11972
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011973_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011974if ac_fn_c_try_run "$LINENO"; then :
11975 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011976else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011977 ac_cv_log1p_drops_zero_sign=yes
11978fi
11979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11980 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011981fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011982
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011983fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011984
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
11986$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
11987fi
11988if test "$ac_cv_log1p_drops_zero_sign" = yes
11989then
11990
11991$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
11992
11993fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011994
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011995LIBS=$LIBS_SAVE
11996
Mark Dickinsona614f042009-11-28 12:48:43 +000011997# For multiprocessing module, check that sem_open
11998# actually works. For FreeBSD versions <= 7.2,
11999# the kernel module that provides POSIX semaphores
12000# isn't loaded by default, so an attempt to call
12001# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12003$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012004if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012006else
Matthias Kloseb9621712010-04-24 17:59:49 +000012007 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012008 ac_cv_posix_semaphores_enabled=yes
12009else
Matthias Kloseb9621712010-04-24 17:59:49 +000012010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012011/* end confdefs.h. */
12012
12013#include <unistd.h>
12014#include <fcntl.h>
12015#include <stdio.h>
12016#include <semaphore.h>
12017#include <sys/stat.h>
12018
12019int main(void) {
12020 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12021 if (a == SEM_FAILED) {
12022 perror("sem_open");
12023 return 1;
12024 }
12025 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012026 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012027 return 0;
12028}
12029
12030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012031if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012032 ac_cv_posix_semaphores_enabled=yes
12033else
Matthias Kloseb9621712010-04-24 17:59:49 +000012034 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12037 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012038fi
12039
12040
Mark Dickinsona614f042009-11-28 12:48:43 +000012041fi
12042
Matthias Kloseb9621712010-04-24 17:59:49 +000012043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12044$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012045if test $ac_cv_posix_semaphores_enabled = no
12046then
12047
Matthias Kloseb9621712010-04-24 17:59:49 +000012048$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012049
12050fi
12051
Mark Dickinson10683072009-04-18 21:18:19 +000012052# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12054$as_echo_n "checking for broken sem_getvalue... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012055if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012056 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012057else
Matthias Kloseb9621712010-04-24 17:59:49 +000012058 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012059 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012060else
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012062/* end confdefs.h. */
12063
12064#include <unistd.h>
12065#include <fcntl.h>
12066#include <stdio.h>
12067#include <semaphore.h>
12068#include <sys/stat.h>
12069
12070int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012071 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012072 int count;
12073 int res;
12074 if(a==SEM_FAILED){
12075 perror("sem_open");
12076 return 1;
12077
12078 }
12079 res = sem_getvalue(a, &count);
12080 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012081 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012082 return res==-1 ? 1 : 0;
12083}
12084
Mark Dickinson10683072009-04-18 21:18:19 +000012085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012086if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012087 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012088else
Matthias Kloseb9621712010-04-24 17:59:49 +000012089 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12092 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012093fi
12094
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012095
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012096fi
12097
Matthias Kloseb9621712010-04-24 17:59:49 +000012098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12099$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012100if test $ac_cv_broken_sem_getvalue = yes
12101then
12102
Matthias Kloseb9621712010-04-24 17:59:49 +000012103$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012104
12105fi
12106
Mark Dickinsonbd792642009-03-18 20:06:12 +000012107# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12109$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012110# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012111if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012112 enableval=$enable_big_digits; case $enable_big_digits in
12113yes)
12114 enable_big_digits=30 ;;
12115no)
12116 enable_big_digits=15 ;;
1211715|30)
12118 ;;
12119*)
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012120 as_fn_error "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonbd792642009-03-18 20:06:12 +000012121esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12123$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012124
12125cat >>confdefs.h <<_ACEOF
12126#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12127_ACEOF
12128
12129
12130else
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12132$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012133fi
12134
12135
Guido van Rossumef2255b2000-03-10 22:30:29 +000012136# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012137ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012138if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012139
12140
Matthias Kloseb9621712010-04-24 17:59:49 +000012141$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012142
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012143 wchar_h="yes"
12144
Guido van Rossumef2255b2000-03-10 22:30:29 +000012145else
Martin v. Löwis11437992002-04-12 09:54:03 +000012146 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012147
12148fi
12149
Michael W. Hudson54241132001-12-07 15:38:26 +000012150
Martin v. Löwis11437992002-04-12 09:54:03 +000012151
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012152# determine wchar_t size
12153if test "$wchar_h" = yes
12154then
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012156# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12157# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12158# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12160$as_echo_n "checking size of wchar_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012161if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012162 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012163else
Matthias Kloseb9621712010-04-24 17:59:49 +000012164 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12165"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012166
Martin v. Löwis11437992002-04-12 09:54:03 +000012167else
Matthias Kloseb9621712010-04-24 17:59:49 +000012168 if test "$ac_cv_type_wchar_t" = yes; then
12169 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012171{ as_fn_set_status 77
12172as_fn_error "cannot compute sizeof (wchar_t)
12173See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012174 else
12175 ac_cv_sizeof_wchar_t=0
12176 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012178
Martin v. Löwis11437992002-04-12 09:54:03 +000012179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12181$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012182
12183
12184
Martin v. Löwis11437992002-04-12 09:54:03 +000012185cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012186#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012187_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012188
Michael W. Hudson54241132001-12-07 15:38:26 +000012189
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012190fi
12191
Matthias Kloseb9621712010-04-24 17:59:49 +000012192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12193$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012194have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012196/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012197
12198#include <tcl.h>
12199#if TCL_UTF_MAX != 6
12200# error "NOT UCS4_TCL"
12201#endif
12202int
12203main ()
12204{
12205
12206 ;
12207 return 0;
12208}
12209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012210if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012211
12212
Matthias Kloseb9621712010-04-24 17:59:49 +000012213$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012214
12215 have_ucs4_tcl=yes
12216
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12220$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012221
Skip Montanaro6dead952003-09-25 14:50:04 +000012222# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012223if test "$wchar_h" = yes
12224then
12225 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12227$as_echo_n "checking whether wchar_t is signed... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012228 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012229 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012230else
12231
Matthias Kloseb9621712010-04-24 17:59:49 +000012232 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012233 ac_cv_wchar_t_signed=yes
12234else
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012236/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012237
12238 #include <wchar.h>
12239 int main()
12240 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012241 /* Success: exit code 0 */
12242 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012243 }
12244
12245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012246if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012247 ac_cv_wchar_t_signed=yes
12248else
Matthias Kloseb9621712010-04-24 17:59:49 +000012249 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12252 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012253fi
12254
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012255fi
12256
Matthias Kloseb9621712010-04-24 17:59:49 +000012257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12258$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259fi
12260
Matthias Kloseb9621712010-04-24 17:59:49 +000012261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12262$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012263
12264# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012265if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012266 withval=$with_wide_unicode;
12267if test "$withval" != no
12268then unicode_size="4"
12269else unicode_size="2"
12270fi
12271
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012272else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012273
Georg Brandl52d168a2008-01-07 18:10:24 +000012274case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012275 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012276 *) unicode_size="2" ;;
12277esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012278
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012279fi
12280
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012281
12282
Georg Brandl52d168a2008-01-07 18:10:24 +000012283case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012284 4)
12285 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12286
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012287 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012288 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012289 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012290 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012291esac
12292
Michael W. Hudson54241132001-12-07 15:38:26 +000012293
Martin v. Löwis11437992002-04-12 09:54:03 +000012294
Georg Brandl52d168a2008-01-07 18:10:24 +000012295# wchar_t is only usable if it maps to an unsigned type
12296if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012297 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012298then
12299 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012300
Matthias Kloseb9621712010-04-24 17:59:49 +000012301$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012302
Matthias Kloseb9621712010-04-24 17:59:49 +000012303 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012304
Georg Brandl52d168a2008-01-07 18:10:24 +000012305elif test "$ac_cv_sizeof_short" = "$unicode_size"
12306then
12307 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012308 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012309
Georg Brandl52d168a2008-01-07 18:10:24 +000012310elif test "$ac_cv_sizeof_long" = "$unicode_size"
12311then
12312 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012313 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012314
Georg Brandl52d168a2008-01-07 18:10:24 +000012315else
12316 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12319$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012320
12321# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12323$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012324if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012325 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012326else
Matthias Kloseb9621712010-04-24 17:59:49 +000012327 ac_cv_c_bigendian=unknown
12328 # See if we're dealing with a universal compiler.
12329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12330/* end confdefs.h. */
12331#ifndef __APPLE_CC__
12332 not a universal capable compiler
12333 #endif
12334 typedef int dummy;
12335
Skip Montanaro6dead952003-09-25 14:50:04 +000012336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012337if ac_fn_c_try_compile "$LINENO"; then :
12338
12339 # Check for potential -arch flags. It is not universal unless
12340 # there are at least two -arch flags with different values.
12341 ac_arch=
12342 ac_prev=
12343 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12344 if test -n "$ac_prev"; then
12345 case $ac_word in
12346 i?86 | x86_64 | ppc | ppc64)
12347 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12348 ac_arch=$ac_word
12349 else
12350 ac_cv_c_bigendian=universal
12351 break
12352 fi
12353 ;;
12354 esac
12355 ac_prev=
12356 elif test "x$ac_word" = "x-arch"; then
12357 ac_prev=arch
12358 fi
12359 done
12360fi
12361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12362 if test $ac_cv_c_bigendian = unknown; then
12363 # See if sys/param.h defines the BYTE_ORDER macro.
12364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012365/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012366#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012367 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012368
Martin v. Löwis11437992002-04-12 09:54:03 +000012369int
12370main ()
12371{
Matthias Kloseb9621712010-04-24 17:59:49 +000012372#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12373 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12374 && LITTLE_ENDIAN)
12375 bogus endian macros
12376 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012377
12378 ;
12379 return 0;
12380}
12381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012382if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012383 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012385/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012386#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012388
Martin v. Löwis11437992002-04-12 09:54:03 +000012389int
12390main ()
12391{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012392#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012393 not big endian
12394 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012395
12396 ;
12397 return 0;
12398}
12399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012400if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012401 ac_cv_c_bigendian=yes
12402else
Matthias Kloseb9621712010-04-24 17:59:49 +000012403 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012406fi
12407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12408 fi
12409 if test $ac_cv_c_bigendian = unknown; then
12410 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012412/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012413#include <limits.h>
12414
Martin v. Löwis11437992002-04-12 09:54:03 +000012415int
12416main ()
12417{
Matthias Kloseb9621712010-04-24 17:59:49 +000012418#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12419 bogus endian macros
12420 #endif
12421
Martin v. Löwis11437992002-04-12 09:54:03 +000012422 ;
12423 return 0;
12424}
12425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012426if ac_fn_c_try_compile "$LINENO"; then :
12427 # It does; now see whether it defined to _BIG_ENDIAN or not.
12428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12429/* end confdefs.h. */
12430#include <limits.h>
12431
12432int
12433main ()
12434{
12435#ifndef _BIG_ENDIAN
12436 not big endian
12437 #endif
12438
12439 ;
12440 return 0;
12441}
12442_ACEOF
12443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012444 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012445else
Matthias Kloseb9621712010-04-24 17:59:49 +000012446 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12449fi
12450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12451 fi
12452 if test $ac_cv_c_bigendian = unknown; then
12453 # Compile a test program.
12454 if test "$cross_compiling" = yes; then :
12455 # Try to guess by grepping values from an object file.
12456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12457/* end confdefs.h. */
12458short int ascii_mm[] =
12459 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12460 short int ascii_ii[] =
12461 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12462 int use_ascii (int i) {
12463 return ascii_mm[i] + ascii_ii[i];
12464 }
12465 short int ebcdic_ii[] =
12466 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12467 short int ebcdic_mm[] =
12468 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12469 int use_ebcdic (int i) {
12470 return ebcdic_mm[i] + ebcdic_ii[i];
12471 }
12472 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012473
Matthias Kloseb9621712010-04-24 17:59:49 +000012474int
12475main ()
12476{
12477return use_ascii (foo) == use_ebcdic (foo);
12478 ;
12479 return 0;
12480}
12481_ACEOF
12482if ac_fn_c_try_compile "$LINENO"; then :
12483 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12484 ac_cv_c_bigendian=yes
12485 fi
12486 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12487 if test "$ac_cv_c_bigendian" = unknown; then
12488 ac_cv_c_bigendian=no
12489 else
12490 # finding both strings is unlikely to happen, but who knows?
12491 ac_cv_c_bigendian=unknown
12492 fi
12493 fi
12494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012496else
Matthias Kloseb9621712010-04-24 17:59:49 +000012497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012498/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012499$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012500int
12501main ()
12502{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012503
Matthias Kloseb9621712010-04-24 17:59:49 +000012504 /* Are we little or big endian? From Harbison&Steele. */
12505 union
12506 {
12507 long int l;
12508 char c[sizeof (long int)];
12509 } u;
12510 u.l = 1;
12511 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012512
12513 ;
12514 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012515}
Martin v. Löwis11437992002-04-12 09:54:03 +000012516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012517if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012518 ac_cv_c_bigendian=no
12519else
Matthias Kloseb9621712010-04-24 17:59:49 +000012520 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012521fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12523 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525
Matthias Kloseb9621712010-04-24 17:59:49 +000012526 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12529$as_echo "$ac_cv_c_bigendian" >&6; }
12530 case $ac_cv_c_bigendian in #(
12531 yes)
12532 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12533;; #(
12534 no)
12535 ;; #(
12536 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012537
Matthias Kloseb9621712010-04-24 17:59:49 +000012538$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012539
Matthias Kloseb9621712010-04-24 17:59:49 +000012540 ;; #(
12541 *)
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012542 as_fn_error "unknown endianness
Antoine Pitrouc2244582011-01-02 19:34:03 +000012543 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012544 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012545
Michael W. Hudson54241132001-12-07 15:38:26 +000012546
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012547# ABI version string for Python extension modules. This appears between the
12548# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12549# from the following attributes which affect the ABI of this Python build (in
12550# this order):
12551#
12552# * The Python implementation (always 'cpython-' for us)
12553# * The major and minor version numbers
12554# * --with-pydebug (adds a 'd')
12555# * --with-pymalloc (adds a 'm')
12556# * --with-wide-unicode (adds a 'u')
12557#
12558# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012559# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12560# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012561
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12563$as_echo_n "checking ABIFLAGS... " >&6; }
12564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12565$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12567$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012568SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12570$as_echo "$SOABI" >&6; }
12571
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12573$as_echo_n "checking LDVERSION... " >&6; }
12574LDVERSION='$(VERSION)$(ABIFLAGS)'
12575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12576$as_echo "$LDVERSION" >&6; }
12577
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012578# SO is the extension of shared libraries `(including the dot!)
12579# -- usually .so, .sl on HP-UX, .dll on Cygwin
12580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12581$as_echo_n "checking SO... " >&6; }
12582if test -z "$SO"
12583then
12584 case $ac_sys_system in
12585 hp*|HP*)
12586 case `uname -m` in
12587 ia64) SO=.so;;
12588 *) SO=.sl;;
12589 esac
12590 ;;
12591 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012592 Linux*|GNU*)
12593 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012594 *) SO=.so;;
12595 esac
12596else
12597 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012598 echo
12599 echo '====================================================================='
12600 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012601 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012602 echo '+ Do you really mean to change the extension for shared libraries? +'
12603 echo '+ Continuing in 10 seconds to let you to ponder. +'
12604 echo '+ +'
12605 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012606 sleep 10
12607fi
12608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12609$as_echo "$SO" >&6; }
12610
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012611# Check whether right shifting a negative integer extends the sign bit
12612# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12614$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012615if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012616 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012617else
Martin v. Löwis11437992002-04-12 09:54:03 +000012618
Matthias Kloseb9621712010-04-24 17:59:49 +000012619if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012620 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012621else
Matthias Kloseb9621712010-04-24 17:59:49 +000012622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012623/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012624
12625int main()
12626{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012627 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012628}
12629
Martin v. Löwis11437992002-04-12 09:54:03 +000012630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012631if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012632 ac_cv_rshift_extends_sign=yes
12633else
Matthias Kloseb9621712010-04-24 17:59:49 +000012634 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012636rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12637 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012638fi
12639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012640fi
12641
Matthias Kloseb9621712010-04-24 17:59:49 +000012642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12643$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012644if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012645then
Martin v. Löwis11437992002-04-12 09:54:03 +000012646
Matthias Kloseb9621712010-04-24 17:59:49 +000012647$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012648
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012649fi
12650
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012651# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12653$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012654if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012655 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012656else
Martin v. Löwis11437992002-04-12 09:54:03 +000012657
Matthias Kloseb9621712010-04-24 17:59:49 +000012658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012659/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012660#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012661int
12662main ()
12663{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012664
12665 FILE *f = fopen("/dev/null", "r");
12666 flockfile(f);
12667 getc_unlocked(f);
12668 funlockfile(f);
12669
Martin v. Löwis11437992002-04-12 09:54:03 +000012670 ;
12671 return 0;
12672}
12673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012674if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012675 ac_cv_have_getc_unlocked=yes
12676else
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 ac_cv_have_getc_unlocked=no
12678fi
12679rm -f core conftest.err conftest.$ac_objext \
12680 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012682
Matthias Kloseb9621712010-04-24 17:59:49 +000012683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12684$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012685if test "$ac_cv_have_getc_unlocked" = yes
12686then
Martin v. Löwis11437992002-04-12 09:54:03 +000012687
Matthias Kloseb9621712010-04-24 17:59:49 +000012688$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012689
12690fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012691
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012692# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012693# save the value of LIBS so we don't actually link Python with readline
12694LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012695
Gregory P. Smith18820942008-09-07 06:24:49 +000012696# On some systems we need to link readline to a termcap compatible
12697# library. NOTE: Keep the precedence of listed libraries synchronised
12698# with setup.py.
12699py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12701$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012702for py_libtermcap in "" ncursesw ncurses curses termcap; do
12703 if test -z "$py_libtermcap"; then
12704 READLINE_LIBS="-lreadline"
12705 else
12706 READLINE_LIBS="-lreadline -l$py_libtermcap"
12707 fi
12708 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012710/* end confdefs.h. */
12711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712/* Override any GCC internal prototype to avoid an error.
12713 Use char because int might match the return type of a GCC
12714 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012715#ifdef __cplusplus
12716extern "C"
12717#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012718char readline ();
12719int
12720main ()
12721{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012722return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012723 ;
12724 return 0;
12725}
12726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012727if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012728 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012730rm -f core conftest.err conftest.$ac_objext \
12731 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012732 if test $py_cv_lib_readline = yes; then
12733 break
12734 fi
12735done
12736# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12737#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012738if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12740$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012741else
Matthias Kloseb9621712010-04-24 17:59:49 +000012742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12743$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012744
Matthias Kloseb9621712010-04-24 17:59:49 +000012745$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012746
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012747fi
12748
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012749# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12751$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012752if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012754else
12755 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012756LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012758/* end confdefs.h. */
12759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012760/* Override any GCC internal prototype to avoid an error.
12761 Use char because int might match the return type of a GCC
12762 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012763#ifdef __cplusplus
12764extern "C"
12765#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012766char rl_callback_handler_install ();
12767int
12768main ()
12769{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012771 ;
12772 return 0;
12773}
12774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012775if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012776 ac_cv_lib_readline_rl_callback_handler_install=yes
12777else
Matthias Kloseb9621712010-04-24 17:59:49 +000012778 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012780rm -f core conftest.err conftest.$ac_objext \
12781 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012782LIBS=$ac_check_lib_save_LIBS
12783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12785$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012786if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012787
Matthias Kloseb9621712010-04-24 17:59:49 +000012788$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012789
12790fi
12791
12792
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012793# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012795/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012796#include <readline/readline.h>
12797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012798if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012799 have_readline=yes
12800else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012801 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012802
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012803fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012804rm -f conftest.err conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012805if test $have_readline = yes
12806then
Matthias Kloseb9621712010-04-24 17:59:49 +000012807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012808/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012809#include <readline/readline.h>
12810
12811_ACEOF
12812if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012814
Matthias Kloseb9621712010-04-24 17:59:49 +000012815$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012816
12817fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012818rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012819
Matthias Kloseb9621712010-04-24 17:59:49 +000012820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012821/* end confdefs.h. */
12822#include <readline/readline.h>
12823
12824_ACEOF
12825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012826 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012827
Matthias Kloseb9621712010-04-24 17:59:49 +000012828$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012829
12830fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012831rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012832
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012833fi
12834
Martin v. Löwis0daad592001-09-30 21:09:59 +000012835# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12837$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012838if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012839 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012840else
Martin v. Löwis11437992002-04-12 09:54:03 +000012841 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012842LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012846/* Override any GCC internal prototype to avoid an error.
12847 Use char because int might match the return type of a GCC
12848 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012849#ifdef __cplusplus
12850extern "C"
12851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012852char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012853int
12854main ()
12855{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012856return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012857 ;
12858 return 0;
12859}
12860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012861if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012862 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012863else
Matthias Kloseb9621712010-04-24 17:59:49 +000012864 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012865fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012866rm -f core conftest.err conftest.$ac_objext \
12867 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012868LIBS=$ac_check_lib_save_LIBS
12869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12871$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012872if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012873
Matthias Kloseb9621712010-04-24 17:59:49 +000012874$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012875
Martin v. Löwis0daad592001-09-30 21:09:59 +000012876fi
12877
Michael W. Hudson54241132001-12-07 15:38:26 +000012878
Thomas Wouters89d996e2007-09-08 17:39:28 +000012879# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12881$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012882if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012883 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012884else
12885 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012886LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012888/* end confdefs.h. */
12889
12890/* Override any GCC internal prototype to avoid an error.
12891 Use char because int might match the return type of a GCC
12892 builtin and then its argument prototype would still apply. */
12893#ifdef __cplusplus
12894extern "C"
12895#endif
12896char rl_completion_display_matches_hook ();
12897int
12898main ()
12899{
12900return rl_completion_display_matches_hook ();
12901 ;
12902 return 0;
12903}
12904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012905if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012906 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12907else
Matthias Kloseb9621712010-04-24 17:59:49 +000012908 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012910rm -f core conftest.err conftest.$ac_objext \
12911 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012912LIBS=$ac_check_lib_save_LIBS
12913fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12915$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012916if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012917
Matthias Kloseb9621712010-04-24 17:59:49 +000012918$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012919
12920fi
12921
12922
Martin v. Löwis0daad592001-09-30 21:09:59 +000012923# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12925$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012926if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012928else
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012930LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934/* Override any GCC internal prototype to avoid an error.
12935 Use char because int might match the return type of a GCC
12936 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012937#ifdef __cplusplus
12938extern "C"
12939#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012940char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012941int
12942main ()
12943{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012944return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012945 ;
12946 return 0;
12947}
12948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012949if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012950 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012951else
Matthias Kloseb9621712010-04-24 17:59:49 +000012952 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012954rm -f core conftest.err conftest.$ac_objext \
12955 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012956LIBS=$ac_check_lib_save_LIBS
12957fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12959$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012960if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012961
Matthias Kloseb9621712010-04-24 17:59:49 +000012962$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012963
Guido van Rossum353ae582001-07-10 16:45:32 +000012964fi
12965
Jack Jansendd19cf82001-12-06 22:36:17 +000012966
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012967# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012969/* end confdefs.h. */
12970#include <readline/readline.h>
12971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012972if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012973 have_readline=yes
12974else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012975 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012976
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012977fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012978rm -f conftest.err conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012979if test $have_readline = yes
12980then
Matthias Kloseb9621712010-04-24 17:59:49 +000012981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012982/* end confdefs.h. */
12983#include <readline/readline.h>
12984
12985_ACEOF
12986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012987 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012988
Matthias Kloseb9621712010-04-24 17:59:49 +000012989$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012990
12991fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012992rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012993
12994fi
12995
Martin v. Löwis82bca632006-02-10 20:49:30 +000012996# End of readline checks: restore LIBS
12997LIBS=$LIBS_no_readline
12998
Matthias Kloseb9621712010-04-24 17:59:49 +000012999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13000$as_echo_n "checking for broken nice()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013001if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013002 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013003else
Martin v. Löwis11437992002-04-12 09:54:03 +000013004
Matthias Kloseb9621712010-04-24 17:59:49 +000013005if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013006 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013007else
Matthias Kloseb9621712010-04-24 17:59:49 +000013008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013009/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013010
13011int main()
13012{
13013 int val1 = nice(1);
13014 if (val1 != -1 && val1 == nice(2))
13015 exit(0);
13016 exit(1);
13017}
13018
Martin v. Löwis11437992002-04-12 09:54:03 +000013019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013020if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013021 ac_cv_broken_nice=yes
13022else
Matthias Kloseb9621712010-04-24 17:59:49 +000013023 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13026 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013027fi
13028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013029fi
13030
Matthias Kloseb9621712010-04-24 17:59:49 +000013031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13032$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013033if test "$ac_cv_broken_nice" = yes
13034then
Martin v. Löwis11437992002-04-12 09:54:03 +000013035
Matthias Kloseb9621712010-04-24 17:59:49 +000013036$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013037
13038fi
13039
Matthias Kloseb9621712010-04-24 17:59:49 +000013040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13041$as_echo_n "checking for broken poll()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013042if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013043 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013044else
Matthias Kloseb9621712010-04-24 17:59:49 +000013045 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013046 ac_cv_broken_poll=no
13047else
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013049/* end confdefs.h. */
13050
13051#include <poll.h>
13052
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013053int main()
13054{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013055 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013056 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013057
13058 close (42);
13059
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013060 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013061 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013062 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013063 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013064 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013065 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013066 return 1;
13067}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013068
13069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013070if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013071 ac_cv_broken_poll=yes
13072else
Matthias Kloseb9621712010-04-24 17:59:49 +000013073 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13076 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013078
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013079fi
13080
Matthias Kloseb9621712010-04-24 17:59:49 +000013081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13082$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013083if test "$ac_cv_broken_poll" = yes
13084then
13085
Matthias Kloseb9621712010-04-24 17:59:49 +000013086$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013087
13088fi
13089
Brett Cannon43802422005-02-10 20:48:03 +000013090# 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 +000013091# (which is not required by ISO C or UNIX spec) and/or if we support
13092# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013093ac_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 +000013094#include <$ac_cv_struct_tm>
13095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013097if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013098
13099cat >>confdefs.h <<_ACEOF
13100#define HAVE_STRUCT_TM_TM_ZONE 1
13101_ACEOF
13102
13103
13104fi
13105
13106if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13107
Matthias Kloseb9621712010-04-24 17:59:49 +000013108$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013109
13110else
Matthias Kloseb9621712010-04-24 17:59:49 +000013111 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13112"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013113if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013114 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013115else
Matthias Kloseb9621712010-04-24 17:59:49 +000013116 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013117fi
13118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013119cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013120#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013121_ACEOF
13122
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13124$as_echo_n "checking for tzname... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013125if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013127else
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013129/* end confdefs.h. */
13130#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013131#if !HAVE_DECL_TZNAME
13132extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013133#endif
13134
13135int
13136main ()
13137{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013138return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013139 ;
13140 return 0;
13141}
13142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013143if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013144 ac_cv_var_tzname=yes
13145else
Matthias Kloseb9621712010-04-24 17:59:49 +000013146 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013148rm -f core conftest.err conftest.$ac_objext \
13149 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13152$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013153 if test $ac_cv_var_tzname = yes; then
13154
Matthias Kloseb9621712010-04-24 17:59:49 +000013155$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013156
13157 fi
13158fi
13159
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013160
Martin v. Löwis1d459062005-03-14 21:23:33 +000013161# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13163$as_echo_n "checking for working tzset()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013164if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013165 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013166else
13167
Matthias Kloseb9621712010-04-24 17:59:49 +000013168if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013169 ac_cv_working_tzset=no
13170else
Matthias Kloseb9621712010-04-24 17:59:49 +000013171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013172/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013173
13174#include <stdlib.h>
13175#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013176#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013177
13178#if HAVE_TZNAME
13179extern char *tzname[];
13180#endif
13181
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013182int main()
13183{
Brett Cannon18367812003-09-19 00:59:16 +000013184 /* Note that we need to ensure that not only does tzset(3)
13185 do 'something' with localtime, but it works as documented
13186 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013187 This includes making sure that tzname is set properly if
13188 tm->tm_zone does not exist since it is the alternative way
13189 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013190
13191 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013192 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013193 */
13194
Martin v. Löwis1d459062005-03-14 21:23:33 +000013195 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013196 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13197
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013198 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013199 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013200 if (localtime(&groundhogday)->tm_hour != 0)
13201 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013202#if HAVE_TZNAME
13203 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13204 if (strcmp(tzname[0], "UTC") ||
13205 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13206 exit(1);
13207#endif
Brett Cannon18367812003-09-19 00:59:16 +000013208
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013209 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013210 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013211 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013212 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013213#if HAVE_TZNAME
13214 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13215 exit(1);
13216#endif
Brett Cannon18367812003-09-19 00:59:16 +000013217
13218 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13219 tzset();
13220 if (localtime(&groundhogday)->tm_hour != 11)
13221 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013222#if HAVE_TZNAME
13223 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13224 exit(1);
13225#endif
13226
13227#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013228 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13229 exit(1);
13230 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13231 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013232#endif
Brett Cannon18367812003-09-19 00:59:16 +000013233
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013234 exit(0);
13235}
13236
13237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013238if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013239 ac_cv_working_tzset=yes
13240else
Matthias Kloseb9621712010-04-24 17:59:49 +000013241 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13244 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013245fi
13246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013247fi
13248
Matthias Kloseb9621712010-04-24 17:59:49 +000013249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13250$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013251if test "$ac_cv_working_tzset" = yes
13252then
13253
Matthias Kloseb9621712010-04-24 17:59:49 +000013254$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013255
13256fi
13257
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013258# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13260$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013261if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013262 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013263else
Matthias Kloseb9621712010-04-24 17:59:49 +000013264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013265/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013266#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013267int
13268main ()
13269{
13270
13271struct stat st;
13272st.st_mtim.tv_nsec = 1;
13273
13274 ;
13275 return 0;
13276}
13277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013278if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013279 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013280else
Matthias Kloseb9621712010-04-24 17:59:49 +000013281 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13284fi
13285
Matthias Kloseb9621712010-04-24 17:59:49 +000013286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13287$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013288if test "$ac_cv_stat_tv_nsec" = yes
13289then
13290
Matthias Kloseb9621712010-04-24 17:59:49 +000013291$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013292
13293fi
13294
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013295# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13297$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013298if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013300else
Matthias Kloseb9621712010-04-24 17:59:49 +000013301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013302/* end confdefs.h. */
13303#include <sys/stat.h>
13304int
13305main ()
13306{
13307
13308struct stat st;
13309st.st_mtimespec.tv_nsec = 1;
13310
13311 ;
13312 return 0;
13313}
13314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013315if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013316 ac_cv_stat_tv_nsec2=yes
13317else
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13321fi
13322
Matthias Kloseb9621712010-04-24 17:59:49 +000013323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13324$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013325if test "$ac_cv_stat_tv_nsec2" = yes
13326then
13327
Matthias Kloseb9621712010-04-24 17:59:49 +000013328$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013329
13330fi
13331
Jack Jansen666b1e72001-10-31 12:11:48 +000013332# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13334$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013335if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013336 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013337else
Matthias Kloseb9621712010-04-24 17:59:49 +000013338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013339/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013340#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013341int
13342main ()
13343{
Jack Jansen666b1e72001-10-31 12:11:48 +000013344
13345 int rtn;
13346 rtn = mvwdelch(0,0,0);
13347
Martin v. Löwis11437992002-04-12 09:54:03 +000013348 ;
13349 return 0;
13350}
13351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013352if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013353 ac_cv_mvwdelch_is_expression=yes
13354else
Matthias Kloseb9621712010-04-24 17:59:49 +000013355 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13358fi
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13361$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013362
13363if test "$ac_cv_mvwdelch_is_expression" = yes
13364then
Martin v. Löwis11437992002-04-12 09:54:03 +000013365
Matthias Kloseb9621712010-04-24 17:59:49 +000013366$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013367
13368fi
13369
Matthias Kloseb9621712010-04-24 17:59:49 +000013370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13371$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013372if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013374else
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013376/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013377#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013378int
13379main ()
13380{
Jack Jansen666b1e72001-10-31 12:11:48 +000013381
13382 WINDOW *w;
13383 w->_flags = 0;
13384
Martin v. Löwis11437992002-04-12 09:54:03 +000013385 ;
13386 return 0;
13387}
13388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013389if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013390 ac_cv_window_has_flags=yes
13391else
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13395fi
13396
Matthias Kloseb9621712010-04-24 17:59:49 +000013397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13398$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013399
Jack Jansen666b1e72001-10-31 12:11:48 +000013400
13401if test "$ac_cv_window_has_flags" = yes
13402then
Martin v. Löwis11437992002-04-12 09:54:03 +000013403
Matthias Kloseb9621712010-04-24 17:59:49 +000013404$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013405
13406fi
13407
Matthias Kloseb9621712010-04-24 17:59:49 +000013408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13409$as_echo_n "checking for is_term_resized... " >&6; }
13410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013411/* end confdefs.h. */
13412#include <curses.h>
13413int
13414main ()
13415{
13416void *x=is_term_resized
13417 ;
13418 return 0;
13419}
13420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013421if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013422
Matthias Kloseb9621712010-04-24 17:59:49 +000013423$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013424
Matthias Kloseb159a552010-04-25 21:00:44 +000013425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013426$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013427else
Matthias Kloseb9621712010-04-24 17:59:49 +000013428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13429$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013430
13431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13433
Matthias Kloseb9621712010-04-24 17:59:49 +000013434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13435$as_echo_n "checking for resize_term... " >&6; }
13436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013437/* end confdefs.h. */
13438#include <curses.h>
13439int
13440main ()
13441{
13442void *x=resize_term
13443 ;
13444 return 0;
13445}
13446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013447if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013448
Matthias Kloseb9621712010-04-24 17:59:49 +000013449$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013450
Matthias Kloseb159a552010-04-25 21:00:44 +000013451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013452$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013453else
Matthias Kloseb9621712010-04-24 17:59:49 +000013454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13455$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013456
13457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13461$as_echo_n "checking for resizeterm... " >&6; }
13462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013463/* end confdefs.h. */
13464#include <curses.h>
13465int
13466main ()
13467{
13468void *x=resizeterm
13469 ;
13470 return 0;
13471}
13472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013473if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013474
Matthias Kloseb9621712010-04-24 17:59:49 +000013475$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013476
Matthias Kloseb159a552010-04-25 21:00:44 +000013477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013478$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013479else
Matthias Kloseb9621712010-04-24 17:59:49 +000013480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13481$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013482
13483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13485
Matthias Kloseb9621712010-04-24 17:59:49 +000013486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13487$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013488
13489if test -r /dev/ptmx
13490then
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13492$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013493
Matthias Kloseb9621712010-04-24 17:59:49 +000013494$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013495
Thomas Wouters89f507f2006-12-13 04:49:30 +000013496else
Matthias Kloseb9621712010-04-24 17:59:49 +000013497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13498$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013499fi
13500
Matthias Kloseb9621712010-04-24 17:59:49 +000013501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13502$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013503
13504if test -r /dev/ptc
13505then
Matthias Kloseb9621712010-04-24 17:59:49 +000013506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13507$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013510
Thomas Wouters89f507f2006-12-13 04:49:30 +000013511else
Matthias Kloseb9621712010-04-24 17:59:49 +000013512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13513$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013514fi
13515
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013516if test "$have_long_long" = yes
13517then
Matthias Kloseb9621712010-04-24 17:59:49 +000013518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13519$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013520 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013521 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013522else
Matthias Kloseb9621712010-04-24 17:59:49 +000013523 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013524 ac_cv_have_long_long_format=no
13525else
Matthias Kloseb9621712010-04-24 17:59:49 +000013526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013527/* end confdefs.h. */
13528
13529 #include <stdio.h>
13530 #include <stddef.h>
13531 #include <string.h>
13532
13533 #ifdef HAVE_SYS_TYPES_H
13534 #include <sys/types.h>
13535 #endif
13536
13537 int main()
13538 {
13539 char buffer[256];
13540
13541 if (sprintf(buffer, "%lld", (long long)123) < 0)
13542 return 1;
13543 if (strcmp(buffer, "123"))
13544 return 1;
13545
13546 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13547 return 1;
13548 if (strcmp(buffer, "-123"))
13549 return 1;
13550
13551 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13552 return 1;
13553 if (strcmp(buffer, "123"))
13554 return 1;
13555
13556 return 0;
13557 }
13558
13559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013560if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013561 ac_cv_have_long_long_format=yes
13562else
Matthias Kloseb9621712010-04-24 17:59:49 +000013563 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013565rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13566 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013567fi
13568
13569
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013570fi
13571
Matthias Kloseb9621712010-04-24 17:59:49 +000013572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13573$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013574fi
13575
Mark Dickinson89d7d412009-12-31 20:50:59 +000013576if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013577then
13578
Matthias Kloseb9621712010-04-24 17:59:49 +000013579$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013580
13581fi
13582
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013583if test $ac_sys_system = Darwin
13584then
13585 LIBS="$LIBS -framework CoreFoundation"
13586fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13589$as_echo_n "checking for %zd printf() format support... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013590if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013591 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013592else
Matthias Kloseb9621712010-04-24 17:59:49 +000013593 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013594 ac_cv_have_size_t_format="cross -- assuming yes"
13595
Thomas Wouters477c8d52006-05-27 19:21:47 +000013596else
Matthias Kloseb9621712010-04-24 17:59:49 +000013597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013598/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013599
Thomas Wouters477c8d52006-05-27 19:21:47 +000013600#include <stdio.h>
13601#include <stddef.h>
13602#include <string.h>
13603
Christian Heimes2c181612007-12-17 20:04:13 +000013604#ifdef HAVE_SYS_TYPES_H
13605#include <sys/types.h>
13606#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013607
13608#ifdef HAVE_SSIZE_T
13609typedef ssize_t Py_ssize_t;
13610#elif SIZEOF_VOID_P == SIZEOF_LONG
13611typedef long Py_ssize_t;
13612#else
13613typedef int Py_ssize_t;
13614#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013615
Christian Heimes2c181612007-12-17 20:04:13 +000013616int main()
13617{
13618 char buffer[256];
13619
Thomas Wouters477c8d52006-05-27 19:21:47 +000013620 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13621 return 1;
13622
Thomas Wouters89f507f2006-12-13 04:49:30 +000013623 if (strcmp(buffer, "123"))
13624 return 1;
13625
13626 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13627 return 1;
13628
13629 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013630 return 1;
13631
13632 return 0;
13633}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013634
Thomas Wouters477c8d52006-05-27 19:21:47 +000013635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013636if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013637 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013638else
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13642 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013643fi
13644
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13647$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013648if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013651
13652fi
13653
Matthias Kloseb9621712010-04-24 17:59:49 +000013654ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013655#ifdef HAVE_SYS_TYPES_H
13656#include <sys/types.h>
13657#endif
13658#ifdef HAVE_SYS_SOCKET_H
13659#include <sys/socket.h>
13660#endif
13661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013663if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013664
Martin v. Löwis11437992002-04-12 09:54:03 +000013665else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013666
Matthias Kloseb9621712010-04-24 17:59:49 +000013667$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013668
13669fi
13670
Michael W. Hudson54241132001-12-07 15:38:26 +000013671
Matthias Kloseb9621712010-04-24 17:59:49 +000013672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13673$as_echo_n "checking for broken mbstowcs... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013674if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013676else
Matthias Kloseb9621712010-04-24 17:59:49 +000013677 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013678 ac_cv_broken_mbstowcs=no
13679else
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013681/* end confdefs.h. */
13682
13683#include<stdlib.h>
13684int main() {
13685 size_t len = -1;
13686 const char *str = "text";
13687 len = mbstowcs(NULL, str, 0);
13688 return (len != 4);
13689}
13690
13691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013692if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013693 ac_cv_broken_mbstowcs=no
13694else
Matthias Kloseb9621712010-04-24 17:59:49 +000013695 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013696fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013697rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13698 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013699fi
13700
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013701fi
13702
Matthias Kloseb9621712010-04-24 17:59:49 +000013703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13704$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013705if test "$ac_cv_broken_mbstowcs" = yes
13706then
13707
Matthias Kloseb9621712010-04-24 17:59:49 +000013708$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013709
13710fi
13711
Antoine Pitrou042b1282010-08-13 21:15:58 +000013712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13713$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013714if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013715 $as_echo_n "(cached) " >&6
13716else
13717 if test "$cross_compiling" = yes; then :
13718 ac_cv_computed_gotos=no
13719else
13720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13721/* end confdefs.h. */
13722
13723int main(int argc, char **argv)
13724{
13725 static void *targets[1] = { &&LABEL1 };
13726 goto LABEL2;
13727LABEL1:
13728 return 0;
13729LABEL2:
13730 goto *targets[0];
13731 return 1;
13732}
13733
13734_ACEOF
13735if ac_fn_c_try_run "$LINENO"; then :
13736 ac_cv_computed_gotos=yes
13737else
13738 ac_cv_computed_gotos=no
13739fi
13740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13741 conftest.$ac_objext conftest.beam conftest.$ac_ext
13742fi
13743
13744fi
13745
13746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13747$as_echo "$ac_cv_computed_gotos" >&6; }
13748if test "$ac_cv_computed_gotos" = yes
13749then
13750
13751$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13752
13753fi
13754
Antoine Pitroub52ec782009-01-25 16:34:23 +000013755# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13757$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013758
13759# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013760if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013761 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013762if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013763then
13764
Matthias Kloseb9621712010-04-24 17:59:49 +000013765$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013766
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13768$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013769fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013770if test "$withval" = no
13771then
13772
13773$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13774
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13776$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013777fi
13778
Antoine Pitrou042b1282010-08-13 21:15:58 +000013779else
13780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13781$as_echo "no value specified" >&6; }
13782fi
13783
Antoine Pitroub52ec782009-01-25 16:34:23 +000013784
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013785case $ac_sys_system in
13786AIX*)
13787
13788$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13789 ;;
13790esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013791
Michael W. Hudson54241132001-12-07 15:38:26 +000013792
Gregory P. Smith138fa432010-12-13 08:00:52 +000013793ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013794if test "x$ac_cv_func_pipe2" = x""yes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013795
13796$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13797
13798fi
Jesus Cea6a792292010-05-03 21:18:48 +000013799
13800
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013801
13802
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013803for h in `(cd $srcdir;echo Python/thread_*.h)`
13804do
13805 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13806done
13807
Michael W. Hudson54241132001-12-07 15:38:26 +000013808
Neal Norwitzd24499d2005-12-18 21:36:39 +000013809SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13811$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013812for dir in $SRCDIRS; do
13813 if test ! -d $dir; then
13814 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013815 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013816done
Matthias Kloseb9621712010-04-24 17:59:49 +000013817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13818$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013819
Guido van Rossum627b2d71993-12-24 10:39:16 +000013820# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013821ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013822
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013823ac_config_files="$ac_config_files Modules/ld_so_aix"
13824
Martin v. Löwis11437992002-04-12 09:54:03 +000013825cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013826# This file is a shell script that caches the results of configure
13827# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013828# scripts and configure runs, see configure's option --config-cache.
13829# It is not useful on other systems. If it contains results you don't
13830# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013831#
Martin v. Löwis11437992002-04-12 09:54:03 +000013832# config.status only pays attention to the cache file if you give it
13833# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013834#
Skip Montanaro6dead952003-09-25 14:50:04 +000013835# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013836# loading this file, other *unset* `ac_cv_foo' will be assigned the
13837# following values.
13838
13839_ACEOF
13840
Guido van Rossumf78abae1997-01-21 22:02:36 +000013841# The following way of writing the cache mishandles newlines in values,
13842# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013843# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013844# Ultrix sh set writes to stderr and can't be redirected directly,
13845# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013846(
13847 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13848 eval ac_val=\$$ac_var
13849 case $ac_val in #(
13850 *${as_nl}*)
13851 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013852 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13853$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013854 esac
13855 case $ac_var in #(
13856 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013857 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13858 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013859 esac ;;
13860 esac
13861 done
13862
Martin v. Löwis11437992002-04-12 09:54:03 +000013863 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013864 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13865 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013866 # `set' does not quote correctly, so add quotes: double-quote
13867 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013868 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013869 "s/'/'\\\\''/g;
13870 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013871 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013872 *)
13873 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013874 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013875 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013876 esac |
13877 sort
13878) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013879 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013880 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013881 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013882 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013883 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13884 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013885 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13886 :end' >>confcache
13887if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13888 if test -w "$cache_file"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013889 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013890 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13891$as_echo "$as_me: updating cache $cache_file" >&6;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013892 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013893 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013894 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13895$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013896 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013897fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013898rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013899
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013900test "x$prefix" = xNONE && prefix=$ac_default_prefix
13901# Let make expand exec_prefix.
13902test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013903
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013904DEFS=-DHAVE_CONFIG_H
13905
Skip Montanaro6dead952003-09-25 14:50:04 +000013906ac_libobjs=
13907ac_ltlibobjs=
13908for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13909 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013910 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013911 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013912 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13913 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013914 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13915 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013916done
13917LIBOBJS=$ac_libobjs
13918
13919LTLIBOBJS=$ac_ltlibobjs
13920
13921
Martin v. Löwis11437992002-04-12 09:54:03 +000013922
Matthias Kloseb9621712010-04-24 17:59:49 +000013923
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013924: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013925ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013926ac_clean_files_save=$ac_clean_files
13927ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013928{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13929$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13930as_write_fail=0
13931cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013932#! $SHELL
13933# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013934# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013935# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013936# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013937
Martin v. Löwis11437992002-04-12 09:54:03 +000013938debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013939ac_cs_recheck=false
13940ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013941
Matthias Kloseb9621712010-04-24 17:59:49 +000013942SHELL=\${CONFIG_SHELL-$SHELL}
13943export SHELL
13944_ASEOF
13945cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13946## -------------------- ##
13947## M4sh Initialization. ##
13948## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013950# Be more Bourne compatible
13951DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013952if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013953 emulate sh
13954 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013955 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013956 # is contrary to our usage. Disable this feature.
13957 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013958 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013959else
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 case `(set -o) 2>/dev/null` in #(
13961 *posix*) :
13962 set -o posix ;; #(
13963 *) :
13964 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013966fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013967
13968
Matthias Kloseb9621712010-04-24 17:59:49 +000013969as_nl='
13970'
13971export as_nl
13972# Printing a long string crashes Solaris 7 /usr/bin/printf.
13973as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13974as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13975as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13976# Prefer a ksh shell builtin over an external printf program on Solaris,
13977# but without wasting forks for bash or zsh.
13978if test -z "$BASH_VERSION$ZSH_VERSION" \
13979 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13980 as_echo='print -r --'
13981 as_echo_n='print -rn --'
13982elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13983 as_echo='printf %s\n'
13984 as_echo_n='printf %s'
13985else
13986 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13987 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13988 as_echo_n='/usr/ucb/echo -n'
13989 else
13990 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13991 as_echo_n_body='eval
13992 arg=$1;
13993 case $arg in #(
13994 *"$as_nl"*)
13995 expr "X$arg" : "X\\(.*\\)$as_nl";
13996 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13997 esac;
13998 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13999 '
14000 export as_echo_n_body
14001 as_echo_n='sh -c $as_echo_n_body as_echo'
14002 fi
14003 export as_echo_body
14004 as_echo='sh -c $as_echo_body as_echo'
14005fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014006
14007# The user is always right.
14008if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014009 PATH_SEPARATOR=:
14010 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14011 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14012 PATH_SEPARATOR=';'
14013 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014014fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014016
14017# IFS
14018# We need space, tab and new line, in precisely that order. Quoting is
14019# there to prevent editors from complaining about space-tab.
14020# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14021# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014022IFS=" "" $as_nl"
14023
14024# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000014025case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014026 *[\\/]* ) as_myself=$0 ;;
14027 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014028for as_dir in $PATH
14029do
14030 IFS=$as_save_IFS
14031 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014032 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14033 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014034IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014036 ;;
14037esac
14038# We did not find ourselves, most probably we were run as `sh COMMAND'
14039# in which case we are not to be found in the path.
14040if test "x$as_myself" = x; then
14041 as_myself=$0
14042fi
14043if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014044 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14045 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014046fi
14047
Matthias Kloseb9621712010-04-24 17:59:49 +000014048# Unset variables that we do not need and which cause bugs (e.g. in
14049# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14050# suppresses any "Segmentation fault" message there. '((' could
14051# trigger a bug in pdksh 5.2.14.
14052for as_var in BASH_ENV ENV MAIL MAILPATH
14053do eval test x\${$as_var+set} = xset \
14054 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014055done
14056PS1='$ '
14057PS2='> '
14058PS4='+ '
14059
14060# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014061LC_ALL=C
14062export LC_ALL
14063LANGUAGE=C
14064export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014065
Matthias Kloseb9621712010-04-24 17:59:49 +000014066# CDPATH.
14067(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14068
14069
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014070# as_fn_error ERROR [LINENO LOG_FD]
14071# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014072# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14073# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014074# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014075as_fn_error ()
14076{
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014077 as_status=$?; test $as_status -eq 0 && as_status=1
14078 if test "$3"; then
14079 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14080 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +000014081 fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014082 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014083 as_fn_exit $as_status
14084} # as_fn_error
14085
14086
14087# as_fn_set_status STATUS
14088# -----------------------
14089# Set $? to STATUS, without forking.
14090as_fn_set_status ()
14091{
14092 return $1
14093} # as_fn_set_status
14094
14095# as_fn_exit STATUS
14096# -----------------
14097# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14098as_fn_exit ()
14099{
14100 set +e
14101 as_fn_set_status $1
14102 exit $1
14103} # as_fn_exit
14104
14105# as_fn_unset VAR
14106# ---------------
14107# Portably unset VAR.
14108as_fn_unset ()
14109{
14110 { eval $1=; unset $1;}
14111}
14112as_unset=as_fn_unset
14113# as_fn_append VAR VALUE
14114# ----------------------
14115# Append the text in VALUE to the end of the definition contained in VAR. Take
14116# advantage of any shell optimizations that allow amortized linear growth over
14117# repeated appends, instead of the typical quadratic growth present in naive
14118# implementations.
14119if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14120 eval 'as_fn_append ()
14121 {
14122 eval $1+=\$2
14123 }'
14124else
14125 as_fn_append ()
14126 {
14127 eval $1=\$$1\$2
14128 }
14129fi # as_fn_append
14130
14131# as_fn_arith ARG...
14132# ------------------
14133# Perform arithmetic evaluation on the ARGs, and store the result in the
14134# global $as_val. Take advantage of shells that can avoid forks. The arguments
14135# must be portable across $(()) and expr.
14136if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14137 eval 'as_fn_arith ()
14138 {
14139 as_val=$(( $* ))
14140 }'
14141else
14142 as_fn_arith ()
14143 {
14144 as_val=`expr "$@" || test $? -eq 1`
14145 }
14146fi # as_fn_arith
14147
14148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014149if expr a : '\(a\)' >/dev/null 2>&1 &&
14150 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14151 as_expr=expr
14152else
14153 as_expr=false
14154fi
14155
14156if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14157 as_basename=basename
14158else
14159 as_basename=false
14160fi
14161
Matthias Kloseb9621712010-04-24 17:59:49 +000014162if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14163 as_dirname=dirname
14164else
14165 as_dirname=false
14166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014168as_me=`$as_basename -- "$0" ||
14169$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14170 X"$0" : 'X\(//\)$' \| \
14171 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014172$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014173 sed '/^.*\/\([^/][^/]*\)\/*$/{
14174 s//\1/
14175 q
14176 }
14177 /^X\/\(\/\/\)$/{
14178 s//\1/
14179 q
14180 }
14181 /^X\/\(\/\).*/{
14182 s//\1/
14183 q
14184 }
14185 s/.*/./; q'`
14186
Matthias Kloseb9621712010-04-24 17:59:49 +000014187# Avoid depending upon Character Ranges.
14188as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14189as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14190as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14191as_cr_digits='0123456789'
14192as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014193
14194ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014195case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014196-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014197 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014199 xy) ECHO_C='\c';;
14200 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14201 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014202 esac;;
14203*)
14204 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014205esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014206
Martin v. Löwis11437992002-04-12 09:54:03 +000014207rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014208if test -d conf$$.dir; then
14209 rm -f conf$$.dir/conf$$.file
14210else
14211 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014214if (echo >conf$$.file) 2>/dev/null; then
14215 if ln -s conf$$.file conf$$ 2>/dev/null; then
14216 as_ln_s='ln -s'
14217 # ... but there are two gotchas:
14218 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14219 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14220 # In both cases, we have to default to `cp -p'.
14221 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14222 as_ln_s='cp -p'
14223 elif ln conf$$.file conf$$ 2>/dev/null; then
14224 as_ln_s=ln
14225 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014226 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014227 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014228else
14229 as_ln_s='cp -p'
14230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014231rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14232rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014233
Matthias Kloseb9621712010-04-24 17:59:49 +000014234
14235# as_fn_mkdir_p
14236# -------------
14237# Create "$as_dir" as a directory, including parents if necessary.
14238as_fn_mkdir_p ()
14239{
14240
14241 case $as_dir in #(
14242 -*) as_dir=./$as_dir;;
14243 esac
14244 test -d "$as_dir" || eval $as_mkdir_p || {
14245 as_dirs=
14246 while :; do
14247 case $as_dir in #(
14248 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14249 *) as_qdir=$as_dir;;
14250 esac
14251 as_dirs="'$as_qdir' $as_dirs"
14252 as_dir=`$as_dirname -- "$as_dir" ||
14253$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14254 X"$as_dir" : 'X\(//\)[^/]' \| \
14255 X"$as_dir" : 'X\(//\)$' \| \
14256 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14257$as_echo X"$as_dir" |
14258 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14259 s//\1/
14260 q
14261 }
14262 /^X\(\/\/\)[^/].*/{
14263 s//\1/
14264 q
14265 }
14266 /^X\(\/\/\)$/{
14267 s//\1/
14268 q
14269 }
14270 /^X\(\/\).*/{
14271 s//\1/
14272 q
14273 }
14274 s/.*/./; q'`
14275 test -d "$as_dir" && break
14276 done
14277 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014278 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014279
14280
14281} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014282if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014284else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014285 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014286 as_mkdir_p=false
14287fi
14288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014289if test -x / >/dev/null 2>&1; then
14290 as_test_x='test -x'
14291else
14292 if ls -dL / >/dev/null 2>&1; then
14293 as_ls_L_option=L
14294 else
14295 as_ls_L_option=
14296 fi
14297 as_test_x='
14298 eval sh -c '\''
14299 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014300 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014301 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014302 case $1 in #(
14303 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014304 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014305 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014306 ???[sx]*):;;*)false;;esac;fi
14307 '\'' sh
14308 '
14309fi
14310as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014311
14312# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014313as_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 +000014314
14315# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014316as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014317
14318
Martin v. Löwis11437992002-04-12 09:54:03 +000014319exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014320## ----------------------------------- ##
14321## Main body of $CONFIG_STATUS script. ##
14322## ----------------------------------- ##
14323_ASEOF
14324test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014325
Matthias Kloseb9621712010-04-24 17:59:49 +000014326cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14327# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014328# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329# values after options handling.
14330ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014331This file was extended by python $as_me 3.3, which was
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014332generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014333
14334 CONFIG_FILES = $CONFIG_FILES
14335 CONFIG_HEADERS = $CONFIG_HEADERS
14336 CONFIG_LINKS = $CONFIG_LINKS
14337 CONFIG_COMMANDS = $CONFIG_COMMANDS
14338 $ $0 $@
14339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014340on `(hostname || uname -n) 2>/dev/null | sed 1q`
14341"
14342
Martin v. Löwis11437992002-04-12 09:54:03 +000014343_ACEOF
14344
Matthias Kloseb9621712010-04-24 17:59:49 +000014345case $ac_config_files in *"
14346"*) set x $ac_config_files; shift; ac_config_files=$*;;
14347esac
14348
14349case $ac_config_headers in *"
14350"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14351esac
14352
14353
14354cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014355# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014356config_files="$ac_config_files"
14357config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014359_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014360
Matthias Kloseb9621712010-04-24 17:59:49 +000014361cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014362ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014363\`$as_me' instantiates files and other configuration actions
14364from templates according to the current configuration. Unless the files
14365and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014366
Matthias Kloseb9621712010-04-24 17:59:49 +000014367Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014368
14369 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014370 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014371 --config print configuration, then exit
14372 -q, --quiet, --silent
14373 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014374 -d, --debug don't remove temporary files
14375 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014376 --file=FILE[:TEMPLATE]
14377 instantiate the configuration file FILE
14378 --header=FILE[:TEMPLATE]
14379 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014380
14381Configuration files:
14382$config_files
14383
14384Configuration headers:
14385$config_headers
14386
Matthias Kloseb9621712010-04-24 17:59:49 +000014387Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014390cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14391ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014392ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014393python config.status 3.3
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014394configured by $0, generated by GNU Autoconf 2.65,
Matthias Kloseb9621712010-04-24 17:59:49 +000014395 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014396
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014397Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014398This config.status script is free software; the Free Software Foundation
14399gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014400
14401ac_pwd='$ac_pwd'
14402srcdir='$srcdir'
14403INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014404test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014405_ACEOF
14406
Matthias Kloseb9621712010-04-24 17:59:49 +000014407cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14408# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014409ac_need_defaults=:
14410while test $# != 0
14411do
14412 case $1 in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014413 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014414 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14415 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014416 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014417 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014418 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014419 ac_option=$1
14420 ac_optarg=$2
14421 ac_shift=shift
14422 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014423 esac
14424
Skip Montanaro6dead952003-09-25 14:50:04 +000014425 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014426 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014427 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14428 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014429 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014430 $as_echo "$ac_cs_version"; exit ;;
14431 --config | --confi | --conf | --con | --co | --c )
14432 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014433 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014434 debug=: ;;
14435 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014436 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014437 case $ac_optarg in
14438 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14439 esac
14440 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014441 ac_need_defaults=false;;
14442 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014443 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014444 case $ac_optarg in
14445 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14446 esac
14447 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014448 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014449 --he | --h)
14450 # Conflict between --help and --header
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014451 as_fn_error "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014452Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014453 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014454 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014455 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14456 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14457 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014458
14459 # This is an error.
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014460 -*) as_fn_error "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014461Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014462
Matthias Kloseb9621712010-04-24 17:59:49 +000014463 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014465
14466 esac
14467 shift
14468done
14469
Skip Montanaro6dead952003-09-25 14:50:04 +000014470ac_configure_extra_args=
14471
14472if $ac_cs_silent; then
14473 exec 6>/dev/null
14474 ac_configure_extra_args="$ac_configure_extra_args --silent"
14475fi
14476
14477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014478cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014479if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014480 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14481 shift
14482 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14483 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014484 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014485 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014486fi
14487
Martin v. Löwis11437992002-04-12 09:54:03 +000014488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014489cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014490exec 5>>config.log
14491{
14492 echo
14493 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14494## Running $as_me. ##
14495_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014496 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014497} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014500cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014501_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014502
Matthias Kloseb9621712010-04-24 17:59:49 +000014503cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504
14505# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014506for ac_config_target in $ac_config_targets
14507do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014508 case $ac_config_target in
14509 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14510 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14511 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014512 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14513 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014514 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14515 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014516 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014517 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014519 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014520 esac
14521done
14522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014523
Martin v. Löwis11437992002-04-12 09:54:03 +000014524# If the user did not use the arguments to specify the items to instantiate,
14525# then the envvar interface is used. Set only those that are not.
14526# We use the long form for the default assignment because of an extremely
14527# bizarre bug on SunOS 4.1.3.
14528if $ac_need_defaults; then
14529 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14530 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14531fi
14532
Skip Montanaro6dead952003-09-25 14:50:04 +000014533# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014534# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014535# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536# Hook for its removal unless debugging.
14537# Note that there is a small window in which the directory will not be cleaned:
14538# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014539$debug ||
14540{
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014541 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014542 trap 'exit_status=$?
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014543 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014545 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014546}
Martin v. Löwis11437992002-04-12 09:54:03 +000014547# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014548
Martin v. Löwis11437992002-04-12 09:54:03 +000014549{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014550 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014551 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014552} ||
14553{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014554 tmp=./conf$$-$RANDOM
14555 (umask 077 && mkdir "$tmp")
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014556} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014557
Matthias Kloseb9621712010-04-24 17:59:49 +000014558# Set up the scripts for CONFIG_FILES section.
14559# No need to generate them if there are no CONFIG_FILES.
14560# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014561if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014562
Matthias Kloseb9621712010-04-24 17:59:49 +000014563
14564ac_cr=`echo X | tr X '\015'`
14565# On cygwin, bash can eat \r inside `` if the user requested igncr.
14566# But we know of no other shell where ac_cr would be empty at this
14567# point, so we can use a bashism as a fallback.
14568if test "x$ac_cr" = x; then
14569 eval ac_cr=\$\'\\r\'
14570fi
14571ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14572if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014573 ac_cs_awk_cr='\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014574else
14575 ac_cs_awk_cr=$ac_cr
14576fi
14577
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014578echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014579_ACEOF
14580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014581
Matthias Kloseb9621712010-04-24 17:59:49 +000014582{
14583 echo "cat >conf$$subs.awk <<_ACEOF" &&
14584 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14585 echo "_ACEOF"
14586} >conf$$subs.sh ||
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014587 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14588ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014589ac_delim='%!_!# '
14590for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 . ./conf$$subs.sh ||
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014592 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014593
Matthias Kloseb9621712010-04-24 17:59:49 +000014594 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14595 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014596 break
14597 elif $ac_last_try; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014598 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014599 else
14600 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014601 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014602done
Matthias Kloseb9621712010-04-24 17:59:49 +000014603rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014604
Matthias Kloseb9621712010-04-24 17:59:49 +000014605cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014606cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014608sed -n '
14609h
14610s/^/S["/; s/!.*/"]=/
14611p
14612g
14613s/^[^!]*!//
14614:repl
14615t repl
14616s/'"$ac_delim"'$//
14617t delim
14618:nl
14619h
14620s/\(.\{148\}\)..*/\1/
14621t more1
14622s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14623p
14624n
14625b repl
14626:more1
14627s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14628p
14629g
14630s/.\{148\}//
14631t nl
14632:delim
14633h
14634s/\(.\{148\}\)..*/\1/
14635t more2
14636s/["\\]/\\&/g; s/^/"/; s/$/"/
14637p
14638b
14639:more2
14640s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14641p
14642g
14643s/.\{148\}//
14644t delim
14645' <conf$$subs.awk | sed '
14646/^[^""]/{
14647 N
14648 s/\n//
14649}
14650' >>$CONFIG_STATUS || ac_write_fail=1
14651rm -f conf$$subs.awk
14652cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14653_ACAWK
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014654cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014655 for (key in S) S_is_set[key] = 1
14656 FS = ""
14657
14658}
14659{
14660 line = $ 0
14661 nfields = split(line, field, "@")
14662 substed = 0
14663 len = length(field[1])
14664 for (i = 2; i < nfields; i++) {
14665 key = field[i]
14666 keylen = length(key)
14667 if (S_is_set[key]) {
14668 value = S[key]
14669 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14670 len += length(value) + length(field[++i])
14671 substed = 1
14672 } else
14673 len += 1 + keylen
14674 }
14675
14676 print line
14677}
14678
14679_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014681cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14682if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14683 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14684else
14685 cat
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014686fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14687 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014688_ACEOF
14689
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014690# VPATH may cause trouble with some makes, so we remove $(srcdir),
14691# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014692# trailing colons and then remove the whole line if VPATH becomes empty
14693# (actually we leave an empty line to preserve line numbers).
14694if test "x$srcdir" = x.; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014695 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14696s/:*\$(srcdir):*/:/
14697s/:*\${srcdir}:*/:/
14698s/:*@srcdir@:*/:/
14699s/^\([^=]*=[ ]*\):*/\1/
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014700s/:*$//
14701s/^[^=]*=[ ]*$//
14702}'
14703fi
14704
Matthias Kloseb9621712010-04-24 17:59:49 +000014705cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014706fi # test -n "$CONFIG_FILES"
14707
Matthias Kloseb9621712010-04-24 17:59:49 +000014708# Set up the scripts for CONFIG_HEADERS section.
14709# No need to generate them if there are no CONFIG_HEADERS.
14710# This happens for instance with `./config.status Makefile'.
14711if test -n "$CONFIG_HEADERS"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014712cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014713BEGIN {
14714_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014715
Matthias Kloseb9621712010-04-24 17:59:49 +000014716# Transform confdefs.h into an awk script `defines.awk', embedded as
14717# here-document in config.status, that substitutes the proper values into
14718# config.h.in to produce config.h.
14719
14720# Create a delimiter string that does not exist in confdefs.h, to ease
14721# handling of long lines.
14722ac_delim='%!_!# '
14723for ac_last_try in false false :; do
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014724 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14725 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014726 break
14727 elif $ac_last_try; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014728 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014729 else
14730 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14731 fi
14732done
14733
14734# For the awk script, D is an array of macro values keyed by name,
14735# likewise P contains macro parameters if any. Preserve backslash
14736# newline sequences.
14737
14738ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14739sed -n '
14740s/.\{148\}/&'"$ac_delim"'/g
14741t rset
14742:rset
14743s/^[ ]*#[ ]*define[ ][ ]*/ /
14744t def
14745d
14746:def
14747s/\\$//
14748t bsnl
14749s/["\\]/\\&/g
14750s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14751D["\1"]=" \3"/p
14752s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14753d
14754:bsnl
14755s/["\\]/\\&/g
14756s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14757D["\1"]=" \3\\\\\\n"\\/p
14758t cont
14759s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14760t cont
14761d
14762:cont
14763n
14764s/.\{148\}/&'"$ac_delim"'/g
14765t clear
14766:clear
14767s/\\$//
14768t bsnlc
14769s/["\\]/\\&/g; s/^/"/; s/$/"/p
14770d
14771:bsnlc
14772s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14773b cont
14774' <confdefs.h | sed '
14775s/'"$ac_delim"'/"\\\
14776"/g' >>$CONFIG_STATUS || ac_write_fail=1
14777
14778cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14779 for (key in D) D_is_set[key] = 1
14780 FS = ""
14781}
14782/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14783 line = \$ 0
14784 split(line, arg, " ")
14785 if (arg[1] == "#") {
14786 defundef = arg[2]
14787 mac1 = arg[3]
14788 } else {
14789 defundef = substr(arg[1], 2)
14790 mac1 = arg[2]
14791 }
14792 split(mac1, mac2, "(") #)
14793 macro = mac2[1]
14794 prefix = substr(line, 1, index(line, defundef) - 1)
14795 if (D_is_set[macro]) {
14796 # Preserve the white space surrounding the "#".
14797 print prefix "define", macro P[macro] D[macro]
14798 next
14799 } else {
14800 # Replace #undef with comments. This is necessary, for example,
14801 # in the case of _POSIX_SOURCE, which is predefined and required
14802 # on some systems where configure will not decide to define it.
14803 if (defundef == "undef") {
14804 print "/*", prefix defundef, macro, "*/"
14805 next
14806 }
14807 }
14808}
14809{ print }
14810_ACAWK
14811_ACEOF
14812cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014813 as_fn_error "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014814fi # test -n "$CONFIG_HEADERS"
14815
14816
14817eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14818shift
14819for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014820do
14821 case $ac_tag in
14822 :[FHLC]) ac_mode=$ac_tag; continue;;
14823 esac
14824 case $ac_mode$ac_tag in
14825 :[FHL]*:*);;
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014826 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014827 :[FH]-) ac_tag=-:-;;
14828 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14829 esac
14830 ac_save_IFS=$IFS
14831 IFS=:
14832 set x $ac_tag
14833 IFS=$ac_save_IFS
14834 shift
14835 ac_file=$1
14836 shift
14837
14838 case $ac_mode in
14839 :L) ac_source=$1;;
14840 :[FH])
14841 ac_file_inputs=
14842 for ac_f
14843 do
14844 case $ac_f in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014845 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014846 *) # Look for the file first in the build tree, then in the source tree
14847 # (if the path is not absolute). The absolute path cannot be DOS-style,
14848 # because $ac_f cannot contain `:'.
14849 test -f "$ac_f" ||
14850 case $ac_f in
14851 [\\/$]*) false;;
14852 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14853 esac ||
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014854 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014855 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014856 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14857 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014858 done
14859
14860 # Let's still pretend it is `configure' which instantiates (i.e., don't
14861 # use $as_me), people would be surprised to read:
14862 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014863 configure_input='Generated from '`
14864 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14865 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014866 if test x"$ac_file" != x-; then
14867 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014868 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14869$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014870 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 # Neutralize special characters interpreted by sed in replacement strings.
14872 case $configure_input in #(
14873 *\&* | *\|* | *\\* )
14874 ac_sed_conf_input=`$as_echo "$configure_input" |
14875 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14876 *) ac_sed_conf_input=$configure_input;;
14877 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014878
14879 case $ac_tag in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014880 *:-:* | *:-) cat >"$tmp/stdin" \
14881 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014882 esac
14883 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014884 esac
14885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014887$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014888 X"$ac_file" : 'X\(//\)[^/]' \| \
14889 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014890 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014891$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014892 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14893 s//\1/
14894 q
14895 }
14896 /^X\(\/\/\)[^/].*/{
14897 s//\1/
14898 q
14899 }
14900 /^X\(\/\/\)$/{
14901 s//\1/
14902 q
14903 }
14904 /^X\(\/\).*/{
14905 s//\1/
14906 q
14907 }
14908 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014909 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014910 ac_builddir=.
14911
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014912case "$ac_dir" in
14913.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14914*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014916 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014918 case $ac_top_builddir_sub in
14919 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14920 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14921 esac ;;
14922esac
14923ac_abs_top_builddir=$ac_pwd
14924ac_abs_builddir=$ac_pwd$ac_dir_suffix
14925# for backward compatibility:
14926ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014927
14928case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014930 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931 ac_top_srcdir=$ac_top_builddir_sub
14932 ac_abs_top_srcdir=$ac_pwd ;;
14933 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014934 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935 ac_top_srcdir=$srcdir
14936 ac_abs_top_srcdir=$srcdir ;;
14937 *) # Relative name.
14938 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14939 ac_top_srcdir=$ac_top_build_prefix$srcdir
14940 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014941esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014942ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014943
Martin v. Löwis11437992002-04-12 09:54:03 +000014944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945 case $ac_mode in
14946 :F)
14947 #
14948 # CONFIG_FILE
14949 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014950
14951 case $INSTALL in
14952 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014954 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014955_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956
Matthias Kloseb9621712010-04-24 17:59:49 +000014957cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958# If the template does not know about datarootdir, expand it.
14959# FIXME: This hack should be removed a few years after 2.60.
14960ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014961ac_sed_dataroot='
14962/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014963 p
14964 q
14965}
14966/@datadir@/p
14967/@docdir@/p
14968/@infodir@/p
14969/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014970/@mandir@/p'
14971case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972*datarootdir*) ac_datarootdir_seen=yes;;
14973*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014974 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14975$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014977cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014978 ac_datarootdir_hack='
14979 s&@datadir@&$datadir&g
14980 s&@docdir@&$docdir&g
14981 s&@infodir@&$infodir&g
14982 s&@localedir@&$localedir&g
14983 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014984 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985esac
14986_ACEOF
14987
14988# Neutralize VPATH when `$srcdir' = `.'.
14989# Shell code in configure.ac might set extrasub.
14990# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014991cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14992ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014993$extrasub
14994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014995cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014996:t
14997/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014998s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014999s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015000s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015001s&@srcdir@&$ac_srcdir&;t t
15002s&@abs_srcdir@&$ac_abs_srcdir&;t t
15003s&@top_srcdir@&$ac_top_srcdir&;t t
15004s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15005s&@builddir@&$ac_builddir&;t t
15006s&@abs_builddir@&$ac_abs_builddir&;t t
15007s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15008s&@INSTALL@&$ac_INSTALL&;t t
15009$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015010"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015011eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15012 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015014test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015015 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15016 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015017 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015018which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015019$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015020which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015021
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015022 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015023 case $ac_file in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015024 -) cat "$tmp/out" && rm -f "$tmp/out";;
15025 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 esac \
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015027 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028 ;;
15029 :H)
15030 #
15031 # CONFIG_HEADER
15032 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015034 {
15035 $as_echo "/* $configure_input */" \
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015036 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15037 } >"$tmp/config.h" \
15038 || as_fn_error "could not create $ac_file" "$LINENO" 5
15039 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015040 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15041$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015042 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015043 rm -f "$ac_file"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015044 mv "$tmp/config.h" "$ac_file" \
15045 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 fi
15047 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015048 $as_echo "/* $configure_input */" \
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015049 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
15050 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015051 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015052 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015054
15055 esac
15056
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015057
15058 case $ac_file$ac_mode in
15059 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15060
15061 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062done # for ac_tag
15063
Guido van Rossum627b2d71993-12-24 10:39:16 +000015064
Matthias Kloseb9621712010-04-24 17:59:49 +000015065as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015066_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015067ac_clean_files=$ac_clean_files_save
15068
Matthias Kloseb9621712010-04-24 17:59:49 +000015069test $ac_write_fail = 0 ||
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015070 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015071
Martin v. Löwis11437992002-04-12 09:54:03 +000015072
15073# configure is writing to config.log, and then calls config.status.
15074# config.status does its own redirection, appending to config.log.
15075# Unfortunately, on DOS this fails, as config.log is still kept open
15076# by configure, so config.status won't be able to write to it; its
15077# output is simply discarded. So we exec the FD to /dev/null,
15078# effectively closing config.log, so it can be properly (re)opened and
15079# appended to by config.status. When coming back to configure, we
15080# need to make the FD available again.
15081if test "$no_create" != yes; then
15082 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015083 ac_config_status_args=
15084 test "$silent" = yes &&
15085 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015086 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015087 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015088 exec 5>>config.log
15089 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15090 # would make configure fail if this is the last instruction.
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015091 $ac_cs_success || as_fn_exit $?
Matthias Kloseb9621712010-04-24 17:59:49 +000015092fi
15093if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15094 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15095$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015096fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015097
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015098
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015099echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015100if test ! -f Modules/Setup
15101then
15102 cp $srcdir/Modules/Setup.dist Modules/Setup
15103fi
15104
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015105echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015106if test ! -f Modules/Setup.local
15107then
15108 echo "# Edit this file for local setup changes" >Modules/Setup.local
15109fi
15110
15111echo "creating Makefile"
15112$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15113 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015114 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015115mv config.c Modules