blob: b143c4ea3b529da10575cc04086f6581213998eb [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Antoine Pitrouece919e2011-01-02 20:45:21 +00002# From configure.in Revision: 87639 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Antoine Pitrouc2244582011-01-02 19:34:03 +00004# Generated by GNU Autoconf 2.65 for python 3.2.
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,
Antoine Pitrouc2244582011-01-02 19:34:03 +000010# 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
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000224 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"
Antoine Pitrouc2244582011-01-02 19:34:03 +0000323 } || 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
Antoine Pitrouc2244582011-01-02 19:34:03 +0000363# 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
Antoine Pitrouc2244582011-01-02 19:34:03 +0000367# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Antoine Pitrouc2244582011-01-02 19:34:03 +0000370 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
Antoine Pitrouc2244582011-01-02 19:34:03 +0000375 $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.
Antoine Pitrouc2244582011-01-02 19:34:03 +0000537# 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'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000556PACKAGE_VERSION='3.2'
557PACKAGE_STRING='python 3.2'
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
639SVNVERSION
640ARFLAGS
641AR
642RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000643USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000644GNULD
645LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000646LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000647RUNSHARED
648INSTSONAME
649LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000650PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000651BLDLIBRARY
652DLLLIBRARY
653LDLIBRARY
654LIBRARY
655BUILDEXEEXT
656EGREP
657GREP
658CPP
659MAINCC
660CXX
661OBJEXT
662EXEEXT
663ac_ct_CC
664CPPFLAGS
665LDFLAGS
666CFLAGS
667CC
668EXPORT_MACOSX_DEPLOYMENT_TARGET
669CONFIGURE_MACOSX_DEPLOYMENT_TARGET
670SGI_ABI
671MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000672FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000673FRAMEWORKUNIXTOOLSPREFIX
674FRAMEWORKALTINSTALLLAST
675FRAMEWORKALTINSTALLFIRST
676FRAMEWORKINSTALLLAST
677FRAMEWORKINSTALLFIRST
678PYTHONFRAMEWORKINSTALLDIR
679PYTHONFRAMEWORKPREFIX
680PYTHONFRAMEWORKDIR
681PYTHONFRAMEWORKIDENTIFIER
682PYTHONFRAMEWORK
683LIPO_32BIT_FLAGS
684ARCH_RUN_32BIT
685UNIVERSALSDK
686CONFIG_ARGS
687SOVERSION
688VERSION
689target_alias
690host_alias
691build_alias
692LIBS
693ECHO_T
694ECHO_N
695ECHO_C
696DEFS
697mandir
698localedir
699libdir
700psdir
701pdfdir
702dvidir
703htmldir
704infodir
705docdir
706oldincludedir
707includedir
708localstatedir
709sharedstatedir
710sysconfdir
711datadir
712datarootdir
713libexecdir
714sbindir
715bindir
716program_transform_name
717prefix
718exec_prefix
719PACKAGE_URL
720PACKAGE_BUGREPORT
721PACKAGE_STRING
722PACKAGE_VERSION
723PACKAGE_TARNAME
724PACKAGE_NAME
725PATH_SEPARATOR
726SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000727ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000728ac_user_opts='
729enable_option_checking
730enable_universalsdk
731with_universal_archs
732with_framework_name
733enable_framework
734with_gcc
735with_cxx_main
736with_suffix
737enable_shared
738enable_profiling
739with_pydebug
740with_libs
741with_system_expat
742with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000743enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000744with_dbmliborder
745with_signal_module
746with_dec_threads
747with_threads
748with_thread
749enable_ipv6
750with_doc_strings
751with_tsc
752with_pymalloc
753with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000754with_fpectl
755with_libm
756with_libc
757enable_big_digits
758with_wide_unicode
759with_computed_gotos
760'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000761 ac_precious_vars='build_alias
762host_alias
763target_alias
764CC
765CFLAGS
766LDFLAGS
767LIBS
768CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000769CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000770
Guido van Rossum627b2d71993-12-24 10:39:16 +0000771
Guido van Rossum7f43da71994-08-01 12:15:30 +0000772# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000773ac_init_help=
774ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000775ac_unrecognized_opts=
776ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000777# The variables have the same names as the options, with
778# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000779cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000780exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000781no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000782no_recursion=
783prefix=NONE
784program_prefix=NONE
785program_suffix=NONE
786program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000787silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000788site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000790verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791x_includes=NONE
792x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000793
794# Installation directory options.
795# These are left unexpanded so users can "make install exec_prefix=/foo"
796# and all the variables that are supposed to be based on exec_prefix
797# by default will actually change.
798# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000800bindir='${exec_prefix}/bin'
801sbindir='${exec_prefix}/sbin'
802libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000803datarootdir='${prefix}/share'
804datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000805sysconfdir='${prefix}/etc'
806sharedstatedir='${prefix}/com'
807localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000808includedir='${prefix}/include'
809oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000810docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
811infodir='${datarootdir}/info'
812htmldir='${docdir}'
813dvidir='${docdir}'
814pdfdir='${docdir}'
815psdir='${docdir}'
816libdir='${exec_prefix}/lib'
817localedir='${datarootdir}/locale'
818mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000823do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824 # If the previous option needs an argument, assign it.
825 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827 ac_prev=
828 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000829 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000831 case $ac_option in
Antoine Pitrouc2244582011-01-02 19:34:03 +0000832 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
833 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836 # Accept the important Cygnus configure options, so we can diagnose typos.
837
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 case $ac_dashdash$ac_option in
839 --)
840 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842 -bindir | --bindir | --bindi | --bind | --bin | --bi)
843 ac_prev=bindir ;;
844 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000845 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846
847 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000849 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000850 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 -cache-file | --cache-file | --cache-fil | --cache-fi \
853 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
854 ac_prev=cache_file ;;
855 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
856 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 cache_file=$ac_optarg ;;
858
859 --config-cache | -C)
860 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000865 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000866
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
868 | --dataroo | --dataro | --datar)
869 ac_prev=datarootdir ;;
870 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
871 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
872 datarootdir=$ac_optarg ;;
873
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000875 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000877 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Antoine Pitrouc2244582011-01-02 19:34:03 +0000878 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000879 ac_useropt_orig=$ac_useropt
880 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
881 case $ac_user_opts in
882 *"
883"enable_$ac_useropt"
884"*) ;;
885 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
886 ac_unrecognized_sep=', ';;
887 esac
888 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889
890 -docdir | --docdir | --docdi | --doc | --do)
891 ac_prev=docdir ;;
892 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
893 docdir=$ac_optarg ;;
894
895 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
896 ac_prev=dvidir ;;
897 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
898 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000901 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000902 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000903 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Antoine Pitrouc2244582011-01-02 19:34:03 +0000904 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000905 ac_useropt_orig=$ac_useropt
906 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
907 case $ac_user_opts in
908 *"
909"enable_$ac_useropt"
910"*) ;;
911 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
912 ac_unrecognized_sep=', ';;
913 esac
914 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
917 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
918 | --exec | --exe | --ex)
919 ac_prev=exec_prefix ;;
920 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
921 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
922 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
925 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Obsolete; use --with-gas.
927 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 -help | --help | --hel | --he | -h)
930 ac_init_help=long ;;
931 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
932 ac_init_help=recursive ;;
933 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
934 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
936 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
942 ac_prev=htmldir ;;
943 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
944 | --ht=*)
945 htmldir=$ac_optarg ;;
946
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947 -includedir | --includedir | --includedi | --included | --include \
948 | --includ | --inclu | --incl | --inc)
949 ac_prev=includedir ;;
950 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
951 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953
954 -infodir | --infodir | --infodi | --infod | --info | --inf)
955 ac_prev=infodir ;;
956 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
959 -libdir | --libdir | --libdi | --libd)
960 ac_prev=libdir ;;
961 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963
964 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
965 | --libexe | --libex | --libe)
966 ac_prev=libexecdir ;;
967 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
968 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971 -localedir | --localedir | --localedi | --localed | --locale)
972 ac_prev=localedir ;;
973 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
974 localedir=$ac_optarg ;;
975
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000977 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978 ac_prev=localstatedir ;;
979 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
983 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
984 ac_prev=mandir ;;
985 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989 # Obsolete; use --without-fp.
990 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994 no_create=yes ;;
995
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
997 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
998 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1001 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1002 | --oldin | --oldi | --old | --ol | --o)
1003 ac_prev=oldincludedir ;;
1004 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1005 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1006 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001008
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1010 ac_prev=prefix ;;
1011 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
1014 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1015 | --program-pre | --program-pr | --program-p)
1016 ac_prev=program_prefix ;;
1017 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1018 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
1021 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1022 | --program-suf | --program-su | --program-s)
1023 ac_prev=program_suffix ;;
1024 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1025 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
1028 -program-transform-name | --program-transform-name \
1029 | --program-transform-nam | --program-transform-na \
1030 | --program-transform-n | --program-transform- \
1031 | --program-transform | --program-transfor \
1032 | --program-transfo | --program-transf \
1033 | --program-trans | --program-tran \
1034 | --progr-tra | --program-tr | --program-t)
1035 ac_prev=program_transform_name ;;
1036 -program-transform-name=* | --program-transform-name=* \
1037 | --program-transform-nam=* | --program-transform-na=* \
1038 | --program-transform-n=* | --program-transform-=* \
1039 | --program-transform=* | --program-transfor=* \
1040 | --program-transfo=* | --program-transf=* \
1041 | --program-trans=* | --program-tran=* \
1042 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001045 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1046 ac_prev=pdfdir ;;
1047 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1048 pdfdir=$ac_optarg ;;
1049
1050 -psdir | --psdir | --psdi | --psd | --ps)
1051 ac_prev=psdir ;;
1052 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1053 psdir=$ac_optarg ;;
1054
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1056 | -silent | --silent | --silen | --sile | --sil)
1057 silent=yes ;;
1058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1060 ac_prev=sbindir ;;
1061 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1062 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
1065 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1066 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1067 | --sharedst | --shareds | --shared | --share | --shar \
1068 | --sha | --sh)
1069 ac_prev=sharedstatedir ;;
1070 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1071 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1072 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1073 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 -site | --site | --sit)
1077 ac_prev=site ;;
1078 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1082 ac_prev=srcdir ;;
1083 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1087 | --syscon | --sysco | --sysc | --sys | --sy)
1088 ac_prev=sysconfdir ;;
1089 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1090 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1099 verbose=yes ;;
1100
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 -version | --version | --versio | --versi | --vers | -V)
1102 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001105 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001106 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001107 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Antoine Pitrouc2244582011-01-02 19:34:03 +00001108 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001109 ac_useropt_orig=$ac_useropt
1110 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1111 case $ac_user_opts in
1112 *"
1113"with_$ac_useropt"
1114"*) ;;
1115 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1116 ac_unrecognized_sep=', ';;
1117 esac
1118 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001121 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001122 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001123 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Antoine Pitrouc2244582011-01-02 19:34:03 +00001124 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001125 ac_useropt_orig=$ac_useropt
1126 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1127 case $ac_user_opts in
1128 *"
1129"with_$ac_useropt"
1130"*) ;;
1131 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1132 ac_unrecognized_sep=', ';;
1133 esac
1134 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136 --x)
1137 # Obsolete; use --with-x.
1138 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
1140 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1141 | --x-incl | --x-inc | --x-in | --x-i)
1142 ac_prev=x_includes ;;
1143 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1144 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146
1147 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1148 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1149 ac_prev=x_libraries ;;
1150 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1151 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
Antoine Pitrouc2244582011-01-02 19:34:03 +00001154 -*) as_fn_error "unrecognized option: \`$ac_option'
1155Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156 ;;
1157
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 *=*)
1159 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1160 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001161 case $ac_envvar in #(
1162 '' | [0-9]* | *[!_$as_cr_alnum]* )
Antoine Pitrouc2244582011-01-02 19:34:03 +00001163 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001164 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001165 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 export $ac_envvar ;;
1167
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001173 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 ;;
1175
1176 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001177done
1178
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Antoine Pitrouc2244582011-01-02 19:34:03 +00001181 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182fi
1183
Matthias Kloseb9621712010-04-24 17:59:49 +00001184if test -n "$ac_unrecognized_opts"; then
1185 case $enable_option_checking in
1186 no) ;;
Antoine Pitrouc2244582011-01-02 19:34:03 +00001187 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1189 esac
1190fi
1191
1192# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001193for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1194 datadir sysconfdir sharedstatedir localstatedir includedir \
1195 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1196 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001198 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 # Remove trailing slashes.
1200 case $ac_val in
1201 */ )
1202 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1203 eval $ac_var=\$ac_val;;
1204 esac
1205 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001207 [\\/$]* | ?:[\\/]* ) continue;;
1208 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 esac
Antoine Pitrouc2244582011-01-02 19:34:03 +00001210 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001211done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212
Martin v. Löwis11437992002-04-12 09:54:03 +00001213# There might be people who depend on the old broken behavior: `$host'
1214# used to hold the argument of --host etc.
1215# FIXME: To remove some day.
1216build=$build_alias
1217host=$host_alias
1218target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001219
Martin v. Löwis11437992002-04-12 09:54:03 +00001220# FIXME: To remove some day.
1221if test "x$host_alias" != x; then
1222 if test "x$build_alias" = x; then
1223 cross_compiling=maybe
Antoine Pitrouc2244582011-01-02 19:34:03 +00001224 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1225 If a cross compiler is detected then cross compile mode will be used." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001226 elif test "x$build_alias" != "x$host_alias"; then
1227 cross_compiling=yes
1228 fi
1229fi
1230
1231ac_tool_prefix=
1232test -n "$host_alias" && ac_tool_prefix=$host_alias-
1233
1234test "$silent" = yes && exec 6>/dev/null
1235
Guido van Rossum627b2d71993-12-24 10:39:16 +00001236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237ac_pwd=`pwd` && test -n "$ac_pwd" &&
1238ac_ls_di=`ls -di .` &&
1239ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Antoine Pitrouc2244582011-01-02 19:34:03 +00001240 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001241test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Antoine Pitrouc2244582011-01-02 19:34:03 +00001242 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001243
1244
Guido van Rossum627b2d71993-12-24 10:39:16 +00001245# Find the source files, if location was not specified.
1246if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001248 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001249 ac_confdir=`$as_dirname -- "$as_myself" ||
1250$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1251 X"$as_myself" : 'X\(//\)[^/]' \| \
1252 X"$as_myself" : 'X\(//\)$' \| \
1253 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1254$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1256 s//\1/
1257 q
1258 }
1259 /^X\(\/\/\)[^/].*/{
1260 s//\1/
1261 q
1262 }
1263 /^X\(\/\/\)$/{
1264 s//\1/
1265 q
1266 }
1267 /^X\(\/\).*/{
1268 s//\1/
1269 q
1270 }
1271 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001273 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274 srcdir=..
1275 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001276else
1277 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279if test ! -r "$srcdir/$ac_unique_file"; then
1280 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Antoine Pitrouc2244582011-01-02 19:34:03 +00001281 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1284ac_abs_confdir=`(
Antoine Pitrouc2244582011-01-02 19:34:03 +00001285 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286 pwd)`
1287# When building in place, set srcdir=.
1288if test "$ac_abs_confdir" = "$ac_pwd"; then
1289 srcdir=.
1290fi
1291# Remove unnecessary trailing slashes from srcdir.
1292# Double slashes in file names in object file debugging info
1293# mess up M-x gdb in Emacs.
1294case $srcdir in
1295*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1296esac
1297for ac_var in $ac_precious_vars; do
1298 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1299 eval ac_env_${ac_var}_value=\$${ac_var}
1300 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1301 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1302done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001303
Martin v. Löwis11437992002-04-12 09:54:03 +00001304#
1305# Report the --help message.
1306#
1307if test "$ac_init_help" = "long"; then
1308 # Omit some internal or obsolete options to make the list less imposing.
1309 # This message is too long to be a string in the A/UX 3.1 sh.
1310 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001311\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001312
1313Usage: $0 [OPTION]... [VAR=VALUE]...
1314
1315To assign environment variables (e.g., CC, CFLAGS...), specify them as
1316VAR=VALUE. See below for descriptions of some of the useful variables.
1317
1318Defaults for the options are specified in brackets.
1319
1320Configuration:
1321 -h, --help display this help and exit
1322 --help=short display options specific to this package
1323 --help=recursive display the short help of all the included packages
1324 -V, --version display version information and exit
Antoine Pitrouc2244582011-01-02 19:34:03 +00001325 -q, --quiet, --silent do not print \`checking...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001326 --cache-file=FILE cache test results in FILE [disabled]
1327 -C, --config-cache alias for \`--cache-file=config.cache'
1328 -n, --no-create do not create output files
1329 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1330
Martin v. Löwis11437992002-04-12 09:54:03 +00001331Installation directories:
1332 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001333 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001334 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001335 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001336
1337By default, \`make install' will install all the files in
1338\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1339an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1340for instance \`--prefix=\$HOME'.
1341
1342For better control, use the options below.
1343
1344Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001345 --bindir=DIR user executables [EPREFIX/bin]
1346 --sbindir=DIR system admin executables [EPREFIX/sbin]
1347 --libexecdir=DIR program executables [EPREFIX/libexec]
1348 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1349 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1350 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1351 --libdir=DIR object code libraries [EPREFIX/lib]
1352 --includedir=DIR C header files [PREFIX/include]
1353 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1354 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1355 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1356 --infodir=DIR info documentation [DATAROOTDIR/info]
1357 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1358 --mandir=DIR man documentation [DATAROOTDIR/man]
1359 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1360 --htmldir=DIR html documentation [DOCDIR]
1361 --dvidir=DIR dvi documentation [DOCDIR]
1362 --pdfdir=DIR pdf documentation [DOCDIR]
1363 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001364_ACEOF
1365
1366 cat <<\_ACEOF
1367_ACEOF
1368fi
1369
1370if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001371 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001372 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001373 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001374 cat <<\_ACEOF
1375
1376Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001377 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1379 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001380 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001381 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001382 --enable-framework[=INSTALLDIR]
1383 Build (MacOSX|Darwin) framework
1384 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001385 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001386 --enable-loadable-sqlite-extensions
1387 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001388 --enable-ipv6 Enable ipv6 (with ipv4) support
1389 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001390 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001391 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393Optional Packages:
1394 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1395 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001396 --with-universal-archs=ARCH
1397 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001398 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001399 --with-framework-name=FRAMEWORK
1400 specify an alternate name of the framework built
1401 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001402 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001403 --with-cxx-main=<compiler>
1404 compile main() and link python executable with C++
1405 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001406 --with-suffix=.exe set executable suffix
1407 --with-pydebug build with Py_DEBUG defined
1408 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001409 --with-system-expat build pyexpat module using an installed expat
1410 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001411 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001412 --with-dbmliborder=db1:db2:...
1413 order to check db backends for dbm. Valid value is a
1414 colon separated string with the backend names
1415 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --with-signal-module disable/enable signal module
1417 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1418 --with(out)-threads[=DIRECTORY]
1419 disable/enable thread support
1420 --with(out)-thread[=DIRECTORY]
1421 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001422 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001423 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001424 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001425 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001426 --with-fpectl enable SIGFPE catching
1427 --with-libm=STRING math library
1428 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001429 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001430 --with(out)-computed-gotos
1431 Use computed gotos in evaluation loop (enabled by
1432 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001433
1434Some influential environment variables:
1435 CC C compiler command
1436 CFLAGS C compiler flags
1437 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1438 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001439 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001440 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001441 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001442 CPP C preprocessor
1443
1444Use these variables to override the choices made by `configure' or to help
1445it to find libraries and programs with nonstandard names/locations.
1446
Georg Brandle2e15612009-05-20 18:25:10 +00001447Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001448_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001450fi
1451
1452if test "$ac_init_help" = "recursive"; then
1453 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001454 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001455 test -d "$ac_dir" ||
1456 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1457 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 ac_builddir=.
1459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460case "$ac_dir" in
1461.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1462*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001463 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001464 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001465 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001466 case $ac_top_builddir_sub in
1467 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1468 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1469 esac ;;
1470esac
1471ac_abs_top_builddir=$ac_pwd
1472ac_abs_builddir=$ac_pwd$ac_dir_suffix
1473# for backward compatibility:
1474ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001475
1476case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479 ac_top_srcdir=$ac_top_builddir_sub
1480 ac_abs_top_srcdir=$ac_pwd ;;
1481 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483 ac_top_srcdir=$srcdir
1484 ac_abs_top_srcdir=$srcdir ;;
1485 *) # Relative name.
1486 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1487 ac_top_srcdir=$ac_top_build_prefix$srcdir
1488 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001489esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001490ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492 cd "$ac_dir" || { ac_status=$?; continue; }
1493 # Check for guested configure.
1494 if test -f "$ac_srcdir/configure.gnu"; then
1495 echo &&
1496 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1497 elif test -f "$ac_srcdir/configure"; then
1498 echo &&
1499 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001500 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001501 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502 fi || ac_status=$?
1503 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001504 done
1505fi
1506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001507test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001508if $ac_init_version; then
1509 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001510python configure 3.2
Antoine Pitrouc2244582011-01-02 19:34:03 +00001511generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001512
Antoine Pitrouc2244582011-01-02 19:34:03 +00001513Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514This configure script is free software; the Free Software Foundation
1515gives unlimited permission to copy, distribute and modify it.
1516_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001519
1520## ------------------------ ##
1521## Autoconf initialization. ##
1522## ------------------------ ##
1523
1524# ac_fn_c_try_compile LINENO
1525# --------------------------
1526# Try to compile conftest.$ac_ext, and return whether this succeeded.
1527ac_fn_c_try_compile ()
1528{
1529 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1530 rm -f conftest.$ac_objext
1531 if { { ac_try="$ac_compile"
1532case "(($ac_try" in
1533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1534 *) ac_try_echo=$ac_try;;
1535esac
1536eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1537$as_echo "$ac_try_echo"; } >&5
1538 (eval "$ac_compile") 2>conftest.err
1539 ac_status=$?
1540 if test -s conftest.err; then
1541 grep -v '^ *+' conftest.err >conftest.er1
1542 cat conftest.er1 >&5
1543 mv -f conftest.er1 conftest.err
1544 fi
1545 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1546 test $ac_status = 0; } && {
1547 test -z "$ac_c_werror_flag" ||
1548 test ! -s conftest.err
1549 } && test -s conftest.$ac_objext; then :
1550 ac_retval=0
1551else
1552 $as_echo "$as_me: failed program was:" >&5
1553sed 's/^/| /' conftest.$ac_ext >&5
1554
1555 ac_retval=1
1556fi
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001557 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001558 as_fn_set_status $ac_retval
1559
1560} # ac_fn_c_try_compile
1561
1562# ac_fn_c_try_cpp LINENO
1563# ----------------------
1564# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1565ac_fn_c_try_cpp ()
1566{
1567 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1568 if { { ac_try="$ac_cpp conftest.$ac_ext"
1569case "(($ac_try" in
1570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1571 *) ac_try_echo=$ac_try;;
1572esac
1573eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1574$as_echo "$ac_try_echo"; } >&5
1575 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1576 ac_status=$?
1577 if test -s conftest.err; then
1578 grep -v '^ *+' conftest.err >conftest.er1
1579 cat conftest.er1 >&5
1580 mv -f conftest.er1 conftest.err
1581 fi
1582 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Antoine Pitrouc2244582011-01-02 19:34:03 +00001583 test $ac_status = 0; } >/dev/null && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1585 test ! -s conftest.err
1586 }; then :
1587 ac_retval=0
1588else
1589 $as_echo "$as_me: failed program was:" >&5
1590sed 's/^/| /' conftest.$ac_ext >&5
1591
1592 ac_retval=1
1593fi
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001594 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001595 as_fn_set_status $ac_retval
1596
1597} # ac_fn_c_try_cpp
1598
1599# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1600# -------------------------------------------------------
1601# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1602# the include files in INCLUDES and setting the cache variable VAR
1603# accordingly.
1604ac_fn_c_check_header_mongrel ()
1605{
1606 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Antoine Pitrouc2244582011-01-02 19:34:03 +00001607 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1609$as_echo_n "checking for $2... " >&6; }
Antoine Pitrouc2244582011-01-02 19:34:03 +00001610if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001611 $as_echo_n "(cached) " >&6
1612fi
1613eval ac_res=\$$3
1614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1615$as_echo "$ac_res" >&6; }
1616else
1617 # Is the header compilable?
1618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1619$as_echo_n "checking $2 usability... " >&6; }
1620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1621/* end confdefs.h. */
1622$4
1623#include <$2>
1624_ACEOF
1625if ac_fn_c_try_compile "$LINENO"; then :
1626 ac_header_compiler=yes
1627else
1628 ac_header_compiler=no
1629fi
1630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1632$as_echo "$ac_header_compiler" >&6; }
1633
1634# Is the header present?
1635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1636$as_echo_n "checking $2 presence... " >&6; }
1637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1638/* end confdefs.h. */
1639#include <$2>
1640_ACEOF
1641if ac_fn_c_try_cpp "$LINENO"; then :
1642 ac_header_preproc=yes
1643else
1644 ac_header_preproc=no
1645fi
Antoine Pitrouc2244582011-01-02 19:34:03 +00001646rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1648$as_echo "$ac_header_preproc" >&6; }
1649
1650# So? What about this header?
1651case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1652 yes:no: )
1653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1654$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1656$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1657 ;;
1658 no:yes:* )
1659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1660$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1662$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1663 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1664$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1666$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1667 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1668$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00001669( cat <<\_ASBOX
1670## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001671## Report this to http://bugs.python.org/ ##
Antoine Pitrouc2244582011-01-02 19:34:03 +00001672## -------------------------------------- ##
1673_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +00001674 ) | sed "s/^/$as_me: WARNING: /" >&2
1675 ;;
1676esac
1677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1678$as_echo_n "checking for $2... " >&6; }
Antoine Pitrouc2244582011-01-02 19:34:03 +00001679if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001680 $as_echo_n "(cached) " >&6
1681else
1682 eval "$3=\$ac_header_compiler"
1683fi
1684eval ac_res=\$$3
1685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1686$as_echo "$ac_res" >&6; }
1687fi
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001688 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001689
1690} # ac_fn_c_check_header_mongrel
1691
1692# ac_fn_c_try_run LINENO
1693# ----------------------
1694# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1695# that executables *can* be run.
1696ac_fn_c_try_run ()
1697{
1698 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1699 if { { ac_try="$ac_link"
1700case "(($ac_try" in
1701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1702 *) ac_try_echo=$ac_try;;
1703esac
1704eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1705$as_echo "$ac_try_echo"; } >&5
1706 (eval "$ac_link") 2>&5
1707 ac_status=$?
1708 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1709 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1710 { { case "(($ac_try" in
1711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1712 *) ac_try_echo=$ac_try;;
1713esac
1714eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1715$as_echo "$ac_try_echo"; } >&5
1716 (eval "$ac_try") 2>&5
1717 ac_status=$?
1718 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1719 test $ac_status = 0; }; }; then :
1720 ac_retval=0
1721else
1722 $as_echo "$as_me: program exited with status $ac_status" >&5
1723 $as_echo "$as_me: failed program was:" >&5
1724sed 's/^/| /' conftest.$ac_ext >&5
1725
1726 ac_retval=$ac_status
1727fi
1728 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001729 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 as_fn_set_status $ac_retval
1731
1732} # ac_fn_c_try_run
1733
1734# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1735# -------------------------------------------------------
1736# Tests whether HEADER exists and can be compiled using the include files in
1737# INCLUDES, setting the cache variable VAR accordingly.
1738ac_fn_c_check_header_compile ()
1739{
1740 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1742$as_echo_n "checking for $2... " >&6; }
Antoine Pitrouc2244582011-01-02 19:34:03 +00001743if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001744 $as_echo_n "(cached) " >&6
1745else
1746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1747/* end confdefs.h. */
1748$4
1749#include <$2>
1750_ACEOF
1751if ac_fn_c_try_compile "$LINENO"; then :
1752 eval "$3=yes"
1753else
1754 eval "$3=no"
1755fi
1756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1757fi
1758eval ac_res=\$$3
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1760$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001761 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001762
1763} # ac_fn_c_check_header_compile
1764
1765# ac_fn_c_try_link LINENO
1766# -----------------------
1767# Try to link conftest.$ac_ext, and return whether this succeeded.
1768ac_fn_c_try_link ()
1769{
1770 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1771 rm -f conftest.$ac_objext conftest$ac_exeext
1772 if { { ac_try="$ac_link"
1773case "(($ac_try" in
1774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1775 *) ac_try_echo=$ac_try;;
1776esac
1777eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1778$as_echo "$ac_try_echo"; } >&5
1779 (eval "$ac_link") 2>conftest.err
1780 ac_status=$?
1781 if test -s conftest.err; then
1782 grep -v '^ *+' conftest.err >conftest.er1
1783 cat conftest.er1 >&5
1784 mv -f conftest.er1 conftest.err
1785 fi
1786 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1787 test $ac_status = 0; } && {
1788 test -z "$ac_c_werror_flag" ||
1789 test ! -s conftest.err
1790 } && test -s conftest$ac_exeext && {
1791 test "$cross_compiling" = yes ||
1792 $as_test_x conftest$ac_exeext
1793 }; then :
1794 ac_retval=0
1795else
1796 $as_echo "$as_me: failed program was:" >&5
1797sed 's/^/| /' conftest.$ac_ext >&5
1798
1799 ac_retval=1
1800fi
1801 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1802 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1803 # interfere with the next link command; also delete a directory that is
1804 # left behind by Apple's compiler. We do this before executing the actions.
1805 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001806 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001807 as_fn_set_status $ac_retval
1808
1809} # ac_fn_c_try_link
1810
1811# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1812# -------------------------------------------
1813# Tests whether TYPE exists after having included INCLUDES, setting cache
1814# variable VAR accordingly.
1815ac_fn_c_check_type ()
1816{
1817 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1819$as_echo_n "checking for $2... " >&6; }
Antoine Pitrouc2244582011-01-02 19:34:03 +00001820if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001821 $as_echo_n "(cached) " >&6
1822else
1823 eval "$3=no"
1824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1825/* end confdefs.h. */
1826$4
1827int
1828main ()
1829{
1830if (sizeof ($2))
1831 return 0;
1832 ;
1833 return 0;
1834}
1835_ACEOF
1836if ac_fn_c_try_compile "$LINENO"; then :
1837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1838/* end confdefs.h. */
1839$4
1840int
1841main ()
1842{
1843if (sizeof (($2)))
1844 return 0;
1845 ;
1846 return 0;
1847}
1848_ACEOF
1849if ac_fn_c_try_compile "$LINENO"; then :
1850
1851else
1852 eval "$3=yes"
1853fi
1854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1855fi
1856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1857fi
1858eval ac_res=\$$3
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001861 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001862
1863} # ac_fn_c_check_type
1864
1865# ac_fn_c_find_uintX_t LINENO BITS VAR
1866# ------------------------------------
1867# Finds an unsigned integer type with width BITS, setting cache variable VAR
1868# accordingly.
1869ac_fn_c_find_uintX_t ()
1870{
1871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1873$as_echo_n "checking for uint$2_t... " >&6; }
Antoine Pitrouc2244582011-01-02 19:34:03 +00001874if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001875 $as_echo_n "(cached) " >&6
1876else
1877 eval "$3=no"
1878 # Order is important - never check a type that is potentially smaller
1879 # than half of the expected target width.
1880 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1881 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883/* end confdefs.h. */
1884$ac_includes_default
1885int
1886main ()
1887{
1888static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1889test_array [0] = 0
1890
1891 ;
1892 return 0;
1893}
1894_ACEOF
1895if ac_fn_c_try_compile "$LINENO"; then :
1896 case $ac_type in #(
1897 uint$2_t) :
1898 eval "$3=yes" ;; #(
1899 *) :
1900 eval "$3=\$ac_type" ;;
1901esac
1902fi
1903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrouc2244582011-01-02 19:34:03 +00001904 eval as_val=\$$3
1905 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001906
1907else
1908 break
1909fi
1910 done
1911fi
1912eval ac_res=\$$3
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1914$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001915 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001916
1917} # ac_fn_c_find_uintX_t
1918
1919# ac_fn_c_find_intX_t LINENO BITS VAR
1920# -----------------------------------
1921# Finds a signed integer type with width BITS, setting cache variable VAR
1922# accordingly.
1923ac_fn_c_find_intX_t ()
1924{
1925 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1927$as_echo_n "checking for int$2_t... " >&6; }
Antoine Pitrouc2244582011-01-02 19:34:03 +00001928if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001929 $as_echo_n "(cached) " >&6
1930else
1931 eval "$3=no"
1932 # Order is important - never check a type that is potentially smaller
1933 # than half of the expected target width.
1934 for ac_type in int$2_t 'int' 'long int' \
1935 'long long int' 'short int' 'signed char'; do
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001939int
1940main ()
1941{
Antoine Pitrouc2244582011-01-02 19:34:03 +00001942static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1943 0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001944test_array [0] = 0
1945
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001954int
1955main ()
1956{
Antoine Pitrouc2244582011-01-02 19:34:03 +00001957static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1958 ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001959 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1960test_array [0] = 0
1961
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967
1968else
1969 case $ac_type in #(
1970 int$2_t) :
1971 eval "$3=yes" ;; #(
1972 *) :
1973 eval "$3=\$ac_type" ;;
1974esac
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrouc2244582011-01-02 19:34:03 +00001979 eval as_val=\$$3
1980 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001981
1982else
1983 break
1984fi
1985 done
1986fi
1987eval ac_res=\$$3
1988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1989$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001990 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992} # ac_fn_c_find_intX_t
1993
1994# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1995# --------------------------------------------
1996# Tries to find the compile-time value of EXPR in a program that includes
1997# INCLUDES, setting VAR accordingly. Returns whether the value could be
1998# computed
1999ac_fn_c_compute_int ()
2000{
2001 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2002 if test "$cross_compiling" = yes; then
2003 # Depending upon the size, compute the lo and hi bounds.
2004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$4
2007int
2008main ()
2009{
2010static int test_array [1 - 2 * !(($2) >= 0)];
2011test_array [0] = 0
2012
2013 ;
2014 return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018 ac_lo=0 ac_mid=0
2019 while :; do
2020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2021/* end confdefs.h. */
2022$4
2023int
2024main ()
2025{
2026static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2027test_array [0] = 0
2028
2029 ;
2030 return 0;
2031}
2032_ACEOF
2033if ac_fn_c_try_compile "$LINENO"; then :
2034 ac_hi=$ac_mid; break
2035else
2036 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2037 if test $ac_lo -le $ac_mid; then
2038 ac_lo= ac_hi=
2039 break
2040 fi
2041 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2042fi
2043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2044 done
2045else
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047/* end confdefs.h. */
2048$4
2049int
2050main ()
2051{
2052static int test_array [1 - 2 * !(($2) < 0)];
2053test_array [0] = 0
2054
2055 ;
2056 return 0;
2057}
2058_ACEOF
2059if ac_fn_c_try_compile "$LINENO"; then :
2060 ac_hi=-1 ac_mid=-1
2061 while :; do
2062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h. */
2064$4
2065int
2066main ()
2067{
2068static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2069test_array [0] = 0
2070
2071 ;
2072 return 0;
2073}
2074_ACEOF
2075if ac_fn_c_try_compile "$LINENO"; then :
2076 ac_lo=$ac_mid; break
2077else
2078 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2079 if test $ac_mid -le $ac_hi; then
2080 ac_lo= ac_hi=
2081 break
2082 fi
2083 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086 done
2087else
2088 ac_lo= ac_hi=
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093# Binary search between lo and hi bounds.
2094while test "x$ac_lo" != "x$ac_hi"; do
2095 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2097/* end confdefs.h. */
2098$4
2099int
2100main ()
2101{
2102static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2103test_array [0] = 0
2104
2105 ;
2106 return 0;
2107}
2108_ACEOF
2109if ac_fn_c_try_compile "$LINENO"; then :
2110 ac_hi=$ac_mid
2111else
2112 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2113fi
2114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115done
2116case $ac_lo in #((
2117?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2118'') ac_retval=1 ;;
2119esac
2120 else
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124static long int longval () { return $2; }
2125static unsigned long int ulongval () { return $2; }
2126#include <stdio.h>
2127#include <stdlib.h>
2128int
2129main ()
2130{
2131
2132 FILE *f = fopen ("conftest.val", "w");
2133 if (! f)
2134 return 1;
2135 if (($2) < 0)
2136 {
2137 long int i = longval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%ld", i);
2141 }
2142 else
2143 {
2144 unsigned long int i = ulongval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%lu", i);
2148 }
2149 /* Do not output a trailing newline, as this causes \r\n confusion
2150 on some platforms. */
2151 return ferror (f) || fclose (f) != 0;
2152
2153 ;
2154 return 0;
2155}
2156_ACEOF
2157if ac_fn_c_try_run "$LINENO"; then :
2158 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2159else
2160 ac_retval=1
2161fi
2162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2163 conftest.$ac_objext conftest.beam conftest.$ac_ext
2164rm -f conftest.val
2165
2166 fi
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002167 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002168 as_fn_set_status $ac_retval
2169
2170} # ac_fn_c_compute_int
2171
2172# ac_fn_c_check_func LINENO FUNC VAR
2173# ----------------------------------
2174# Tests whether FUNC exists, setting the cache variable VAR accordingly
2175ac_fn_c_check_func ()
2176{
2177 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2179$as_echo_n "checking for $2... " >&6; }
Antoine Pitrouc2244582011-01-02 19:34:03 +00002180if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002181 $as_echo_n "(cached) " >&6
2182else
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184/* end confdefs.h. */
2185/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2186 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2187#define $2 innocuous_$2
2188
2189/* System header to define __stub macros and hopefully few prototypes,
2190 which can conflict with char $2 (); below.
2191 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2192 <limits.h> exists even on freestanding compilers. */
2193
2194#ifdef __STDC__
2195# include <limits.h>
2196#else
2197# include <assert.h>
2198#endif
2199
2200#undef $2
2201
2202/* Override any GCC internal prototype to avoid an error.
2203 Use char because int might match the return type of a GCC
2204 builtin and then its argument prototype would still apply. */
2205#ifdef __cplusplus
2206extern "C"
2207#endif
2208char $2 ();
2209/* The GNU C library defines this for functions which it implements
2210 to always fail with ENOSYS. Some functions are actually named
2211 something starting with __ and the normal name is an alias. */
2212#if defined __stub_$2 || defined __stub___$2
2213choke me
2214#endif
2215
2216int
2217main ()
2218{
2219return $2 ();
2220 ;
2221 return 0;
2222}
2223_ACEOF
2224if ac_fn_c_try_link "$LINENO"; then :
2225 eval "$3=yes"
2226else
2227 eval "$3=no"
2228fi
2229rm -f core conftest.err conftest.$ac_objext \
2230 conftest$ac_exeext conftest.$ac_ext
2231fi
2232eval ac_res=\$$3
2233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2234$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002235 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002236
2237} # ac_fn_c_check_func
2238
2239# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2240# ----------------------------------------------------
2241# Tries to find if the field MEMBER exists in type AGGR, after including
2242# INCLUDES, setting cache variable VAR accordingly.
2243ac_fn_c_check_member ()
2244{
2245 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2247$as_echo_n "checking for $2.$3... " >&6; }
Antoine Pitrouc2244582011-01-02 19:34:03 +00002248if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002249 $as_echo_n "(cached) " >&6
2250else
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$5
2254int
2255main ()
2256{
2257static $2 ac_aggr;
2258if (ac_aggr.$3)
2259return 0;
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_compile "$LINENO"; then :
2265 eval "$4=yes"
2266else
2267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2268/* end confdefs.h. */
2269$5
2270int
2271main ()
2272{
2273static $2 ac_aggr;
2274if (sizeof ac_aggr.$3)
2275return 0;
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_compile "$LINENO"; then :
2281 eval "$4=yes"
2282else
2283 eval "$4=no"
2284fi
2285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286fi
2287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288fi
2289eval ac_res=\$$4
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2291$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002292 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002293
2294} # ac_fn_c_check_member
2295
Antoine Pitrouc2244582011-01-02 19:34:03 +00002296# ac_fn_c_check_decl LINENO SYMBOL VAR
2297# ------------------------------------
2298# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002299ac_fn_c_check_decl ()
2300{
2301 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Antoine Pitrouc2244582011-01-02 19:34:03 +00002302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2303$as_echo_n "checking whether $2 is declared... " >&6; }
2304if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002305 $as_echo_n "(cached) " >&6
2306else
2307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308/* end confdefs.h. */
2309$4
2310int
2311main ()
2312{
Antoine Pitrouc2244582011-01-02 19:34:03 +00002313#ifndef $2
2314 (void) $2;
Matthias Kloseb9621712010-04-24 17:59:49 +00002315#endif
2316
2317 ;
2318 return 0;
2319}
2320_ACEOF
2321if ac_fn_c_try_compile "$LINENO"; then :
2322 eval "$3=yes"
2323else
2324 eval "$3=no"
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328eval ac_res=\$$3
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2330$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002331 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002332
2333} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002334cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002335This file contains any messages produced by compilers while
2336running configure, to aid debugging if configure makes a mistake.
2337
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002338It was created by python $as_me 3.2, which was
Antoine Pitrouc2244582011-01-02 19:34:03 +00002339generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
2341 $ $0 $@
2342
2343_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002344exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002345{
2346cat <<_ASUNAME
2347## --------- ##
2348## Platform. ##
2349## --------- ##
2350
2351hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2352uname -m = `(uname -m) 2>/dev/null || echo unknown`
2353uname -r = `(uname -r) 2>/dev/null || echo unknown`
2354uname -s = `(uname -s) 2>/dev/null || echo unknown`
2355uname -v = `(uname -v) 2>/dev/null || echo unknown`
2356
2357/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2358/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2359
2360/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2361/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2362/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002363/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002364/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2365/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2366/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2367
2368_ASUNAME
2369
2370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2371for as_dir in $PATH
2372do
2373 IFS=$as_save_IFS
2374 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002375 $as_echo "PATH: $as_dir"
2376 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
2379} >&5
2380
2381cat >&5 <<_ACEOF
2382
2383
2384## ----------- ##
2385## Core tests. ##
2386## ----------- ##
2387
2388_ACEOF
2389
2390
2391# Keep a trace of the command line.
2392# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002393# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002394# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002395# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002396ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002397ac_configure_args0=
2398ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002399ac_must_keep_next=false
2400for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002401do
Skip Montanaro6dead952003-09-25 14:50:04 +00002402 for ac_arg
2403 do
2404 case $ac_arg in
2405 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2406 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2407 | -silent | --silent | --silen | --sile | --sil)
2408 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 esac
2412 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002417 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002419 case $ac_arg in
2420 *=* | --config-cache | -C | -disable-* | --disable-* \
2421 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2422 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2423 | -with-* | --with-* | -without-* | --without-* | --x)
2424 case "$ac_configure_args0 " in
2425 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2426 esac
2427 ;;
2428 -* ) ac_must_keep_next=true ;;
2429 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 ;;
2433 esac
2434 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002435done
Matthias Kloseb9621712010-04-24 17:59:49 +00002436{ ac_configure_args0=; unset ac_configure_args0;}
2437{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002438
2439# When interrupted or exit'd, cleanup temporary files, and complete
2440# config.log. We remove comments because anyway the quotes in there
2441# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442# WARNING: Use '\'' to represent an apostrophe within the trap.
2443# 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 +00002444trap 'exit_status=$?
2445 # Save into config.log some information that might help in debugging.
2446 {
2447 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002448
Antoine Pitrouc2244582011-01-02 19:34:03 +00002449 cat <<\_ASBOX
2450## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002451## Cache variables. ##
Antoine Pitrouc2244582011-01-02 19:34:03 +00002452## ---------------- ##
2453_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002454 echo
2455 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456(
2457 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2458 eval ac_val=\$$ac_var
2459 case $ac_val in #(
2460 *${as_nl}*)
2461 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002462 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2463$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464 esac
2465 case $ac_var in #(
2466 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002467 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2468 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 esac ;;
2470 esac
2471 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002472 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2474 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 "s/'\''/'\''\\\\'\'''\''/g;
2477 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2478 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002481 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac |
2483 sort
2484)
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002486
Antoine Pitrouc2244582011-01-02 19:34:03 +00002487 cat <<\_ASBOX
2488## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002489## Output variables. ##
Antoine Pitrouc2244582011-01-02 19:34:03 +00002490## ----------------- ##
2491_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 echo
2493 for ac_var in $ac_subst_vars
2494 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 eval ac_val=\$$ac_var
2496 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 done | sort
2501 echo
2502
2503 if test -n "$ac_subst_files"; then
Antoine Pitrouc2244582011-01-02 19:34:03 +00002504 cat <<\_ASBOX
2505## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506## File substitutions. ##
Antoine Pitrouc2244582011-01-02 19:34:03 +00002507## ------------------- ##
2508_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 echo
2510 for ac_var in $ac_subst_files
2511 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 eval ac_val=\$$ac_var
2513 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 done | sort
2518 echo
2519 fi
2520
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 if test -s confdefs.h; then
Antoine Pitrouc2244582011-01-02 19:34:03 +00002522 cat <<\_ASBOX
2523## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002524## confdefs.h. ##
Antoine Pitrouc2244582011-01-02 19:34:03 +00002525## ----------- ##
2526_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 echo
2530 fi
2531 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 $as_echo "$as_me: caught signal $ac_signal"
2533 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 rm -f core *.core core.conftest.* &&
2536 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002539for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002541done
2542ac_signal=0
2543
2544# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002546
Matthias Kloseb9621712010-04-24 17:59:49 +00002547$as_echo "/* confdefs.h */" > confdefs.h
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549# Predefined preprocessor variables.
2550
2551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_NAME "$PACKAGE_NAME"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_VERSION "$PACKAGE_VERSION"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_STRING "$PACKAGE_STRING"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2569_ACEOF
2570
Matthias Kloseb9621712010-04-24 17:59:49 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_URL "$PACKAGE_URL"
2573_ACEOF
2574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575
2576# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002577# Prefer an explicitly selected file to automatically selected ones.
2578ac_site_file1=NONE
2579ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580if test -n "$CONFIG_SITE"; then
Antoine Pitrouc2244582011-01-02 19:34:03 +00002581 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 ac_site_file1=$prefix/share/config.site
2584 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585else
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 ac_site_file1=$ac_default_prefix/share/config.site
2587 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002589for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590do
Matthias Kloseb9621712010-04-24 17:59:49 +00002591 test "x$ac_site_file" = xNONE && continue
2592 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2593 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2594$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 sed 's/^/| /' "$ac_site_file" >&5
Antoine Pitrouc2244582011-01-02 19:34:03 +00002596 . "$ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002597 fi
2598done
2599
2600if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002601 # Some versions of bash will fail to source /dev/null (special files
2602 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2603 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2605$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2608 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 esac
2610 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002611else
Matthias Kloseb9621712010-04-24 17:59:49 +00002612 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2613$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 >$cache_file
2615fi
2616
2617# Check that the precious variables saved in the cache have kept the same
2618# value.
2619ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2622 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2624 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 case $ac_old_set,$ac_new_set in
2626 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2628$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 +00002629 ac_cache_corrupted=: ;;
2630 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2632$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 ac_cache_corrupted=: ;;
2634 ,);;
2635 *)
2636 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 # differences in whitespace do not lead to failure.
2638 ac_old_val_w=`echo x $ac_old_val`
2639 ac_new_val_w=`echo x $ac_new_val`
2640 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2642$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2643 ac_cache_corrupted=:
2644 else
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2646$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2647 eval $ac_var=\$ac_old_val
2648 fi
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2650$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2652$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 fi;;
2654 esac
2655 # Pass precious variables to config.status.
2656 if test "$ac_new_set" = set; then
2657 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002658 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 *) ac_arg=$ac_var=$ac_new_val ;;
2660 esac
2661 case " $ac_configure_args " in
2662 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 esac
2665 fi
2666done
2667if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2670 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2671$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00002672 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002674## -------------------- ##
2675## Main body of script. ##
2676## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002677
Guido van Rossum7f43da71994-08-01 12:15:30 +00002678ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002680ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2681ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2682ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683
Guido van Rossum627b2d71993-12-24 10:39:16 +00002684
Michael W. Hudson54241132001-12-07 15:38:26 +00002685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002687
2688
Martin v. Löwis11437992002-04-12 09:54:03 +00002689
Benjamin Petersond23f8222009-04-05 19:13:16 +00002690if test "$prefix" != "/"; then
2691 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2692fi
2693
2694
Martin v. Löwis11437992002-04-12 09:54:03 +00002695
2696
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002697# We don't use PACKAGE_ variables, and they cause conflicts
2698# with other autoconf-based packages that include Python.h
2699grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2700rm confdefs.h
2701mv confdefs.h.new confdefs.h
2702
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002703
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002704VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002705
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002706# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002707
2708SOVERSION=1.0
2709
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002710# The later defininition of _XOPEN_SOURCE disables certain features
2711# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2712
Matthias Kloseb9621712010-04-24 17:59:49 +00002713$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002714
2715
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002716# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2717# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2718# them.
2719
Matthias Kloseb9621712010-04-24 17:59:49 +00002720$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002721
2722
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002723# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2724# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2725# them.
2726
Matthias Kloseb9621712010-04-24 17:59:49 +00002727$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002728
2729
Martin v. Löwisd6320502004-08-12 13:45:08 +00002730# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2731# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2732
Matthias Kloseb9621712010-04-24 17:59:49 +00002733$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002734
2735
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002736# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2737# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2738# them.
2739
Matthias Kloseb9621712010-04-24 17:59:49 +00002740$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002741
2742
2743
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002744define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002745
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002746# Arguments passed to configure.
2747
2748CONFIG_ARGS="$ac_configure_args"
2749
Matthias Kloseb9621712010-04-24 17:59:49 +00002750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2751$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002752# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002753if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002754 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002755 case $enableval in
2756 yes)
2757 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002758 if test ! -d "${enableval}"
2759 then
2760 enableval=/
2761 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002762 ;;
2763 esac
2764 case $enableval in
2765 no)
2766 UNIVERSALSDK=
2767 enable_universalsdk=
2768 ;;
2769 *)
2770 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002771 if test ! -d "${UNIVERSALSDK}"
2772 then
Antoine Pitrouc2244582011-01-02 19:34:03 +00002773 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002774 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002775 ;;
2776 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002777
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002778
Thomas Wouters477c8d52006-05-27 19:21:47 +00002779else
2780
2781 UNIVERSALSDK=
2782 enable_universalsdk=
2783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002784fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002785
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002786if test -n "${UNIVERSALSDK}"
2787then
Matthias Kloseb9621712010-04-24 17:59:49 +00002788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2789$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002790else
Matthias Kloseb9621712010-04-24 17:59:49 +00002791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2792$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002793fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002795
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002796
2797
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002798UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002799
Matthias Kloseb9621712010-04-24 17:59:49 +00002800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2801$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002802
2803# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002804if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002805 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2807$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002808 UNIVERSAL_ARCHS="$withval"
2809
2810else
2811
Matthias Kloseb9621712010-04-24 17:59:49 +00002812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2813$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002814
2815fi
2816
2817
2818
2819
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002820
2821# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002822if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002823 withval=$with_framework_name;
2824 PYTHONFRAMEWORK=${withval}
2825 PYTHONFRAMEWORKDIR=${withval}.framework
2826 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2827
2828else
2829
2830 PYTHONFRAMEWORK=Python
2831 PYTHONFRAMEWORKDIR=Python.framework
2832 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2833
2834fi
2835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002836# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002837if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002838 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002839 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002840 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002841 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002842 esac
2843 case $enableval in
2844 no)
2845 PYTHONFRAMEWORK=
2846 PYTHONFRAMEWORKDIR=no-framework
2847 PYTHONFRAMEWORKPREFIX=
2848 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002849 FRAMEWORKINSTALLFIRST=
2850 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002851 FRAMEWORKALTINSTALLFIRST=
2852 FRAMEWORKALTINSTALLLAST=
2853 if test "x${prefix}" = "xNONE"; then
2854 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2855 else
2856 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2857 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002858 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002859 ;;
2860 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002861 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002862 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002863 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002864 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002865 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2866 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002867 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002868
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002869 if test "x${prefix}" = "xNONE" ; then
2870 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002871
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002872 else
2873 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2874 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002875
2876 case "${enableval}" in
2877 /System*)
2878 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2879 if test "${prefix}" = "NONE" ; then
2880 # See below
2881 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2882 fi
2883 ;;
2884
2885 /Library*)
2886 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2887 ;;
2888
2889 */Library/Frameworks)
2890 MDIR="`dirname "${enableval}"`"
2891 MDIR="`dirname "${MDIR}"`"
2892 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2893
2894 if test "${prefix}" = "NONE"; then
2895 # User hasn't specified the
2896 # --prefix option, but wants to install
2897 # the framework in a non-default location,
2898 # ensure that the compatibility links get
2899 # installed relative to that prefix as well
2900 # instead of in /usr/local.
2901 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2902 fi
2903 ;;
2904
2905 *)
2906 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2907 ;;
2908 esac
2909
Jack Jansen127e56e2001-09-11 14:41:54 +00002910 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002911
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002912 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002913 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002914 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002916 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002917
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002918 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2919
2920 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2921
Jack Jansene578a632001-08-15 01:27:14 +00002922 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002923
Guido van Rossum563e7081996-09-10 18:20:48 +00002924else
Martin v. Löwis11437992002-04-12 09:54:03 +00002925
Jack Jansene578a632001-08-15 01:27:14 +00002926 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002927 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002928 PYTHONFRAMEWORKPREFIX=
2929 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002930 FRAMEWORKINSTALLFIRST=
2931 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002932 FRAMEWORKALTINSTALLFIRST=
2933 FRAMEWORKALTINSTALLLAST=
2934 if test "x${prefix}" = "xNONE" ; then
2935 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2936 else
2937 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2938 fi
Jack Jansene578a632001-08-15 01:27:14 +00002939 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002940
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002941
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002942fi
2943
Thomas Wouters477c8d52006-05-27 19:21:47 +00002944
2945
Michael W. Hudson54241132001-12-07 15:38:26 +00002946
2947
2948
2949
Jack Jansene578a632001-08-15 01:27:14 +00002950
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002951
2952
2953
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002954
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002955
Jack Jansene578a632001-08-15 01:27:14 +00002956##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002957## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002958## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002959##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002960# Set name for machine-dependent library files
2961
Matthias Kloseb9621712010-04-24 17:59:49 +00002962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2963$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002964if test -z "$MACHDEP"
2965then
Guido van Rossum563e7081996-09-10 18:20:48 +00002966 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002967 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002968 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002969 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002970 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002971 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002972 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002973 ac_md_system=`echo $ac_sys_system |
2974 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2975 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002976 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002977 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002978
Guido van Rossum07397971997-04-29 21:49:50 +00002979 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002980 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002981 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002982 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002983 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002984 esac
2985fi
Guido van Rossum91922671997-10-09 20:24:13 +00002986
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002987# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2988# disable features if it is defined, without any means to access these
2989# features as extensions. For these systems, we skip the definition of
2990# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2991# some feature, make sure there is no alternative way to access this
2992# feature. Also, when using wildcards, make sure you have verified the
2993# need for not defining _XOPEN_SOURCE on all systems matching the
2994# wildcard, and that the wildcard does not include future systems
2995# (which may remove their limitations).
2996case $ac_sys_system/$ac_sys_release in
2997 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2998 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002999 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003000 # In addition, Stefan Krah confirms that issue #1244610 exists through
3001 # OpenBSD 4.6, but is fixed in 4.7.
3002 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003003 define_xopen_source=no
3004 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3005 # also defined. This can be overridden by defining _BSD_SOURCE
3006 # As this has a different meaning on Linux, only define it on OpenBSD
3007
Matthias Kloseb9621712010-04-24 17:59:49 +00003008$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003009
3010 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003011 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003012 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3013 # also defined. This can be overridden by defining _BSD_SOURCE
3014 # As this has a different meaning on Linux, only define it on OpenBSD
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003017
3018 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003019 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3020 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3021 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003022 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 +00003023 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003024 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3025 # request to enable features supported by the standard as a request
3026 # to disable features not supported by the standard. The best way
3027 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3028 # entirely and define __EXTENSIONS__ instead.
3029 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003030 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003031 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3032 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003033 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003034 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003035 define_xopen_source=no;;
3036 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003037 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003038 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003039 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003040 # On FreeBSD 4, the math functions C89 does not cover are never defined
3041 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3042 FreeBSD/4.*)
3043 define_xopen_source=no;;
3044 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3045 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3046 # identifies itself as Darwin/7.*
3047 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3048 # disables platform specific features beyond repair.
3049 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3050 # has no effect, don't bother defining them
3051 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003052 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003053 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003054 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003055 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3056 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3057 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003058 AIX/4)
3059 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003060 AIX/5)
3061 if test `uname -r` -eq 1; then
3062 define_xopen_source=no
3063 fi
3064 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003065 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3066 # defining NI_NUMERICHOST.
3067 QNX/6.3.2)
3068 define_xopen_source=no
3069 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003070
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003071esac
3072
3073if test $define_xopen_source = yes
3074then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003075
Matthias Kloseb9621712010-04-24 17:59:49 +00003076$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003077
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003078
3079 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3080 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3081 # several APIs are not declared. Since this is also needed in some
3082 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003083
Matthias Kloseb9621712010-04-24 17:59:49 +00003084$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003085
3086
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003087
Matthias Kloseb9621712010-04-24 17:59:49 +00003088$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003089
3090
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003091fi
3092
Guido van Rossum91922671997-10-09 20:24:13 +00003093#
3094# SGI compilers allow the specification of the both the ABI and the
3095# ISA on the command line. Depending on the values of these switches,
3096# different and often incompatable code will be generated.
3097#
3098# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3099# thus supply support for various ABI/ISA combinations. The MACHDEP
3100# variable is also adjusted.
3101#
3102
3103if test ! -z "$SGI_ABI"
3104then
3105 CC="cc $SGI_ABI"
3106 LDFLAGS="$SGI_ABI $LDFLAGS"
3107 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3108fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3110$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003111
Jack Jansen6b08a402004-06-03 12:41:45 +00003112# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3113# it may influence the way we can build extensions, so distutils
3114# needs to check it
3115
Thomas Wouters477c8d52006-05-27 19:21:47 +00003116
Jack Jansen6b08a402004-06-03 12:41:45 +00003117CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003118EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003119
Matthias Kloseb9621712010-04-24 17:59:49 +00003120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3121$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003122ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3124$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003125
Guido van Rossum627b2d71993-12-24 10:39:16 +00003126# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003127
3128# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3129# for debug/optimization stuff. BASECFLAGS is for flags that are required
3130# just to get things to compile and link. Users are free to override OPT
3131# when running configure or make. The build should not break if they do.
3132# BASECFLAGS should generally not be messed with, however.
3133
3134# XXX shouldn't some/most/all of this code be merged with the stuff later
3135# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3137$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003139# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003140if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003142 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003143 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003144 without_gcc=yes;;
3145 yes) CC=gcc
3146 without_gcc=no;;
3147 *) CC=$withval
3148 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003149 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003150else
Martin v. Löwis11437992002-04-12 09:54:03 +00003151
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003152 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003153 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003154 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003155 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003156 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003157fi
3158
Matthias Kloseb9621712010-04-24 17:59:49 +00003159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3160$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003161
Guido van Rossum8b131c51995-03-09 14:10:13 +00003162# If the user switches compilers, we can't believe the cache
3163if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3164then
Antoine Pitrouc2244582011-01-02 19:34:03 +00003165 as_fn_error "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003166(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003167fi
3168
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003169# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3170# when the compiler supports them, but we don't always want -O2, and
3171# we set -g later.
3172if test -z "$CFLAGS"; then
3173 CFLAGS=
3174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003175ac_ext=c
3176ac_cpp='$CPP $CPPFLAGS'
3177ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3178ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3179ac_compiler_gnu=$ac_cv_c_compiler_gnu
3180if test -n "$ac_tool_prefix"; then
3181 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3182set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3184$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003185if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003186 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003187else
3188 if test -n "$CC"; then
3189 ac_cv_prog_CC="$CC" # Let the user override the test.
3190else
Martin v. Löwis11437992002-04-12 09:54:03 +00003191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3192for as_dir in $PATH
3193do
3194 IFS=$as_save_IFS
3195 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003196 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197 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 +00003198 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003199 $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 +00003200 break 2
3201 fi
3202done
Matthias Kloseb9621712010-04-24 17:59:49 +00003203 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003205
Jack Jansendd19cf82001-12-06 22:36:17 +00003206fi
3207fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003208CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003209if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3211$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003212else
Matthias Kloseb9621712010-04-24 17:59:49 +00003213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3214$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003215fi
3216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003217
Martin v. Löwis11437992002-04-12 09:54:03 +00003218fi
3219if test -z "$ac_cv_prog_CC"; then
3220 ac_ct_CC=$CC
3221 # Extract the first word of "gcc", so it can be a program name with args.
3222set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3224$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003225if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003226 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003227else
3228 if test -n "$ac_ct_CC"; then
3229 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3230else
3231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3232for as_dir in $PATH
3233do
3234 IFS=$as_save_IFS
3235 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003236 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003237 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 +00003238 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003239 $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 +00003240 break 2
3241 fi
3242done
Matthias Kloseb9621712010-04-24 17:59:49 +00003243 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003244IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003245
3246fi
3247fi
3248ac_ct_CC=$ac_cv_prog_ac_ct_CC
3249if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3251$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003252else
Matthias Kloseb9621712010-04-24 17:59:49 +00003253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3254$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003255fi
3256
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003257 if test "x$ac_ct_CC" = x; then
3258 CC=""
3259 else
3260 case $cross_compiling:$ac_tool_warned in
3261yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003262{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3263$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003264ac_tool_warned=yes ;;
3265esac
3266 CC=$ac_ct_CC
3267 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003268else
3269 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003270fi
3271
Jack Jansendd19cf82001-12-06 22:36:17 +00003272if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003273 if test -n "$ac_tool_prefix"; then
3274 # 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 +00003275set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3277$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003278if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003279 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003280else
3281 if test -n "$CC"; then
3282 ac_cv_prog_CC="$CC" # Let the user override the test.
3283else
Martin v. Löwis11437992002-04-12 09:54:03 +00003284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3285for as_dir in $PATH
3286do
3287 IFS=$as_save_IFS
3288 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003289 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003290 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 +00003291 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003292 $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 +00003293 break 2
3294 fi
3295done
Matthias Kloseb9621712010-04-24 17:59:49 +00003296 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003298
3299fi
3300fi
3301CC=$ac_cv_prog_CC
3302if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3304$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003305else
Matthias Kloseb9621712010-04-24 17:59:49 +00003306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3307$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003308fi
3309
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003310
Martin v. Löwis11437992002-04-12 09:54:03 +00003311 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003312fi
3313if test -z "$CC"; then
3314 # Extract the first word of "cc", so it can be a program name with args.
3315set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3317$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003318if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003319 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003320else
3321 if test -n "$CC"; then
3322 ac_cv_prog_CC="$CC" # Let the user override the test.
3323else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003324 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3326for as_dir in $PATH
3327do
3328 IFS=$as_save_IFS
3329 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003330 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003331 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 +00003332 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3333 ac_prog_rejected=yes
3334 continue
3335 fi
3336 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003337 $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 +00003338 break 2
3339 fi
3340done
Matthias Kloseb9621712010-04-24 17:59:49 +00003341 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003342IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003343
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003344if test $ac_prog_rejected = yes; then
3345 # We found a bogon in the path, so make sure we never use it.
3346 set dummy $ac_cv_prog_CC
3347 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003348 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003349 # We chose a different compiler from the bogus one.
3350 # However, it has the same basename, so the bogon will be chosen
3351 # first if we set CC to just the basename; use the full file name.
3352 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003353 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003354 fi
3355fi
3356fi
3357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003358CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003359if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3361$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003362else
Matthias Kloseb9621712010-04-24 17:59:49 +00003363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3364$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003365fi
3366
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003367
Martin v. Löwis11437992002-04-12 09:54:03 +00003368fi
3369if test -z "$CC"; then
3370 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003371 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003372 do
3373 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3374set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3376$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003377if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003378 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003379else
3380 if test -n "$CC"; then
3381 ac_cv_prog_CC="$CC" # Let the user override the test.
3382else
Martin v. Löwis11437992002-04-12 09:54:03 +00003383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3384for as_dir in $PATH
3385do
3386 IFS=$as_save_IFS
3387 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003388 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003389 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003390 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003391 $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 +00003392 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003393 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003394done
Matthias Kloseb9621712010-04-24 17:59:49 +00003395 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003396IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003397
3398fi
3399fi
3400CC=$ac_cv_prog_CC
3401if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3403$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003404else
Matthias Kloseb9621712010-04-24 17:59:49 +00003405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3406$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003407fi
3408
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003409
Martin v. Löwis11437992002-04-12 09:54:03 +00003410 test -n "$CC" && break
3411 done
3412fi
3413if test -z "$CC"; then
3414 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003415 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003416do
3417 # Extract the first word of "$ac_prog", so it can be a program name with args.
3418set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3420$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003421if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003422 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003423else
3424 if test -n "$ac_ct_CC"; then
3425 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3426else
3427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3428for as_dir in $PATH
3429do
3430 IFS=$as_save_IFS
3431 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003432 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003433 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 +00003434 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003435 $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 +00003436 break 2
3437 fi
3438done
Matthias Kloseb9621712010-04-24 17:59:49 +00003439 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003440IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003441
Martin v. Löwis11437992002-04-12 09:54:03 +00003442fi
3443fi
3444ac_ct_CC=$ac_cv_prog_ac_ct_CC
3445if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3447$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003448else
Matthias Kloseb9621712010-04-24 17:59:49 +00003449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3450$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003451fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453
Martin v. Löwis11437992002-04-12 09:54:03 +00003454 test -n "$ac_ct_CC" && break
3455done
Michael W. Hudson54241132001-12-07 15:38:26 +00003456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457 if test "x$ac_ct_CC" = x; then
3458 CC=""
3459 else
3460 case $cross_compiling:$ac_tool_warned in
3461yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003462{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3463$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464ac_tool_warned=yes ;;
3465esac
3466 CC=$ac_ct_CC
3467 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003468fi
3469
3470fi
3471
3472
Matthias Kloseb9621712010-04-24 17:59:49 +00003473test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3474$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00003475as_fn_error "no acceptable C compiler found in \$PATH
3476See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003477
3478# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003479$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3480set X $ac_compile
3481ac_compiler=$2
3482for ac_option in --version -v -V -qversion; do
3483 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484case "(($ac_try" in
3485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3486 *) ac_try_echo=$ac_try;;
3487esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003488eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3489$as_echo "$ac_try_echo"; } >&5
3490 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003491 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003492 if test -s conftest.err; then
3493 sed '10a\
3494... rest of stderr output deleted ...
3495 10q' conftest.err >conftest.er1
3496 cat conftest.er1 >&5
3497 fi
3498 rm -f conftest.er1 conftest.err
3499 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3500 test $ac_status = 0; }
3501done
Martin v. Löwis11437992002-04-12 09:54:03 +00003502
Matthias Kloseb9621712010-04-24 17:59:49 +00003503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003504/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003505
Martin v. Löwis11437992002-04-12 09:54:03 +00003506int
3507main ()
3508{
3509
3510 ;
3511 return 0;
3512}
3513_ACEOF
3514ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003515ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003516# Try to create an executable without -o first, disregard a.out.
3517# It will help us diagnose broken compilers, and finding out an intuition
3518# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3520$as_echo_n "checking whether the C compiler works... " >&6; }
3521ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3522
3523# The possible output files:
3524ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003526ac_rmfiles=
3527for ac_file in $ac_files
3528do
3529 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003530 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3532 esac
3533done
3534rm -f $ac_rmfiles
3535
Matthias Kloseb9621712010-04-24 17:59:49 +00003536if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003537case "(($ac_try" in
3538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3539 *) ac_try_echo=$ac_try;;
3540esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003541eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3542$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003545 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3546 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003547 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3548# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3549# in a Makefile. We should not override ac_cv_exeext if it was cached,
3550# so that the user can short-circuit this test for compilers unknown to
3551# Autoconf.
3552for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003553do
3554 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003555 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003556 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003557 ;;
3558 [ab].out )
3559 # We found the default executable, but exeext='' is most
3560 # certainly right.
3561 break;;
3562 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003563 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003564 then :; else
3565 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3566 fi
3567 # We set ac_cv_exeext here because the later test for it is not
3568 # safe: cross compilers may not add the suffix if given an `-o'
3569 # argument, so we may need to know it at that point already.
3570 # Even if this section looks crufty: it has the advantage of
3571 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003572 break;;
3573 * )
3574 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 esac
3576done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003577test "$ac_cv_exeext" = no && ac_cv_exeext=
3578
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003579else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580 ac_file=''
3581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003582if test -z "$ac_file"; then :
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3584$as_echo "no" >&6; }
3585$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003586sed 's/^/| /' conftest.$ac_ext >&5
3587
Matthias Kloseb9621712010-04-24 17:59:49 +00003588{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00003590{ as_fn_set_status 77
3591as_fn_error "C compiler cannot create executables
3592See \`config.log' for more details." "$LINENO" 5; }; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003593else
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3595$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3598$as_echo_n "checking for C compiler default output file name... " >&6; }
3599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3600$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003601ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003602
Matthias Kloseb9621712010-04-24 17:59:49 +00003603rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003604ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3606$as_echo_n "checking for suffix of executables... " >&6; }
3607if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003608case "(($ac_try" in
3609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3610 *) ac_try_echo=$ac_try;;
3611esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003612eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3613$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3617 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003618 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3619# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3620# work properly (i.e., refer to `conftest.exe'), while it won't with
3621# `rm'.
3622for ac_file in conftest.exe conftest conftest.*; do
3623 test -f "$ac_file" || continue
3624 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003626 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3627 break;;
3628 * ) break;;
3629 esac
3630done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003631else
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00003634as_fn_error "cannot compute suffix of executables: cannot compile and link
3635See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003637rm -f conftest conftest$ac_cv_exeext
3638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3639$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003640
3641rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003642EXEEXT=$ac_cv_exeext
3643ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3645/* end confdefs.h. */
3646#include <stdio.h>
3647int
3648main ()
3649{
3650FILE *f = fopen ("conftest.out", "w");
3651 return ferror (f) || fclose (f) != 0;
3652
3653 ;
3654 return 0;
3655}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003657ac_clean_files="$ac_clean_files conftest.out"
3658# Check that the compiler produces executables we can run. If not, either
3659# the compiler is broken, or we cross compile.
3660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3661$as_echo_n "checking whether we are cross compiling... " >&6; }
3662if test "$cross_compiling" != yes; then
3663 { { ac_try="$ac_link"
3664case "(($ac_try" in
3665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3666 *) ac_try_echo=$ac_try;;
3667esac
3668eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3669$as_echo "$ac_try_echo"; } >&5
3670 (eval "$ac_link") 2>&5
3671 ac_status=$?
3672 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3673 test $ac_status = 0; }
3674 if { ac_try='./conftest$ac_cv_exeext'
3675 { { case "(($ac_try" in
3676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3677 *) ac_try_echo=$ac_try;;
3678esac
3679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3680$as_echo "$ac_try_echo"; } >&5
3681 (eval "$ac_try") 2>&5
3682 ac_status=$?
3683 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3684 test $ac_status = 0; }; }; then
3685 cross_compiling=no
3686 else
3687 if test "$cross_compiling" = maybe; then
3688 cross_compiling=yes
3689 else
3690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00003692as_fn_error "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003693If you meant to cross compile, use \`--host'.
Antoine Pitrouc2244582011-01-02 19:34:03 +00003694See \`config.log' for more details." "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 fi
3696 fi
3697fi
3698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3699$as_echo "$cross_compiling" >&6; }
3700
3701rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3702ac_clean_files=$ac_clean_files_save
3703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3704$as_echo_n "checking for suffix of object files... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003705if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 $as_echo_n "(cached) " >&6
3707else
3708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003709/* end confdefs.h. */
3710
3711int
3712main ()
3713{
3714
3715 ;
3716 return 0;
3717}
3718_ACEOF
3719rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003720if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721case "(($ac_try" in
3722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3723 *) ac_try_echo=$ac_try;;
3724esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3726$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3730 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731 for ac_file in conftest.o conftest.obj conftest.*; do
3732 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3736 break;;
3737 esac
3738done
3739else
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003741sed 's/^/| /' conftest.$ac_ext >&5
3742
Matthias Kloseb9621712010-04-24 17:59:49 +00003743{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00003745as_fn_error "cannot compute suffix of object files: cannot compile
3746See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003747fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003748rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3751$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003752OBJEXT=$ac_cv_objext
3753ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3755$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003756if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003758else
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003761
Martin v. Löwis11437992002-04-12 09:54:03 +00003762int
3763main ()
3764{
3765#ifndef __GNUC__
3766 choke me
3767#endif
3768
3769 ;
3770 return 0;
3771}
3772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003773if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003774 ac_compiler_gnu=yes
3775else
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003779ac_cv_c_compiler_gnu=$ac_compiler_gnu
3780
3781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3783$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3784if test $ac_compiler_gnu = yes; then
3785 GCC=yes
3786else
3787 GCC=
3788fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003789ac_test_CFLAGS=${CFLAGS+set}
3790ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3792$as_echo_n "checking whether $CC accepts -g... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003793if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003795else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 ac_save_c_werror_flag=$ac_c_werror_flag
3797 ac_c_werror_flag=yes
3798 ac_cv_prog_cc_g=no
3799 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003802
Martin v. Löwis11437992002-04-12 09:54:03 +00003803int
3804main ()
3805{
3806
3807 ;
3808 return 0;
3809}
3810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003811if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003812 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003813else
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 CFLAGS=""
3815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816/* end confdefs.h. */
3817
3818int
3819main ()
3820{
3821
3822 ;
3823 return 0;
3824}
3825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003826if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003827
Matthias Kloseb9621712010-04-24 17:59:49 +00003828else
3829 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832/* end confdefs.h. */
3833
3834int
3835main ()
3836{
3837
3838 ;
3839 return 0;
3840}
3841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003842if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3850 ac_c_werror_flag=$ac_save_c_werror_flag
3851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3853$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003854if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003855 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003856elif test $ac_cv_prog_cc_g = yes; then
3857 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003858 CFLAGS="-g -O2"
3859 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003860 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003861 fi
3862else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003863 if test "$GCC" = yes; then
3864 CFLAGS="-O2"
3865 else
3866 CFLAGS=
3867 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3870$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003871if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003872 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003873else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003875ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003877/* end confdefs.h. */
3878#include <stdarg.h>
3879#include <stdio.h>
3880#include <sys/types.h>
3881#include <sys/stat.h>
3882/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3883struct buf { int x; };
3884FILE * (*rcsopen) (struct buf *, struct stat *, int);
3885static char *e (p, i)
3886 char **p;
3887 int i;
3888{
3889 return p[i];
3890}
3891static char *f (char * (*g) (char **, int), char **p, ...)
3892{
3893 char *s;
3894 va_list v;
3895 va_start (v,p);
3896 s = g (p, va_arg (v,int));
3897 va_end (v);
3898 return s;
3899}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003900
3901/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3902 function prototypes and stuff, but not '\xHH' hex character constants.
3903 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003905 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3906 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003908int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3911 inside strings and character constants. */
3912#define FOO(x) 'x'
3913int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3914
Skip Montanaro6dead952003-09-25 14:50:04 +00003915int test (int i, double x);
3916struct s1 {int (*f) (int a);};
3917struct s2 {int (*f) (double a);};
3918int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3919int argc;
3920char **argv;
3921int
3922main ()
3923{
3924return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3925 ;
3926 return 0;
3927}
3928_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3930 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003931do
3932 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936rm -f core conftest.err conftest.$ac_objext
3937 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003938done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003940CC=$ac_save_CC
3941
3942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943# AC_CACHE_VAL
3944case "x$ac_cv_prog_cc_c89" in
3945 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3947$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3950$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003951 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3954$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003955esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003956if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003957
Matthias Kloseb9621712010-04-24 17:59:49 +00003958fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003959
Martin v. Löwis11437992002-04-12 09:54:03 +00003960ac_ext=c
3961ac_cpp='$CPP $CPPFLAGS'
3962ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3963ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3964ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003965
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003966
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003967
3968
Matthias Kloseb9621712010-04-24 17:59:49 +00003969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3970$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003973if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003974 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003975
3976 case $withval in
3977 no) with_cxx_main=no
3978 MAINCC='$(CC)';;
3979 yes) with_cxx_main=yes
3980 MAINCC='$(CXX)';;
3981 *) with_cxx_main=yes
3982 MAINCC=$withval
3983 if test -z "$CXX"
3984 then
3985 CXX=$withval
3986 fi;;
3987 esac
3988else
3989
3990 with_cxx_main=no
3991 MAINCC='$(CC)'
3992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993fi
3994
Matthias Kloseb9621712010-04-24 17:59:49 +00003995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3996$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003997
3998preset_cxx="$CXX"
3999if test -z "$CXX"
4000then
4001 case "$CC" in
4002 gcc) # Extract the first word of "g++", so it can be a program name with args.
4003set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4005$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004006if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004007 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004008else
4009 case $CXX in
4010 [\\/]* | ?:[\\/]*)
4011 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4012 ;;
4013 *)
4014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4015for as_dir in notfound
4016do
4017 IFS=$as_save_IFS
4018 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004020 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 +00004021 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004022 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004023 break 2
4024 fi
4025done
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004027IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004028
4029 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4030 ;;
4031esac
4032fi
4033CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004034if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4036$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004037else
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4039$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004042 ;;
4043 cc) # Extract the first word of "c++", so it can be a program name with args.
4044set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4046$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004047if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004048 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004049else
4050 case $CXX in
4051 [\\/]* | ?:[\\/]*)
4052 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4053 ;;
4054 *)
4055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4056for as_dir in notfound
4057do
4058 IFS=$as_save_IFS
4059 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004060 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004061 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 +00004062 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004064 break 2
4065 fi
4066done
Matthias Kloseb9621712010-04-24 17:59:49 +00004067 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004068IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004069
4070 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4071 ;;
4072esac
4073fi
4074CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004075if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4077$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004078else
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4080$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004082
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004083 ;;
4084 esac
4085 if test "$CXX" = "notfound"
4086 then
4087 CXX=""
4088 fi
4089fi
4090if test -z "$CXX"
4091then
4092 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4093do
4094 # Extract the first word of "$ac_prog", so it can be a program name with args.
4095set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4097$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004098if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004100else
4101 if test -n "$CXX"; then
4102 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4103else
4104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4105for as_dir in $PATH
4106do
4107 IFS=$as_save_IFS
4108 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004110 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 +00004111 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004113 break 2
4114 fi
4115done
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004117IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004118
4119fi
4120fi
4121CXX=$ac_cv_prog_CXX
4122if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4124$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004125else
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4127$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004128fi
4129
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004131 test -n "$CXX" && break
4132done
4133test -n "$CXX" || CXX="notfound"
4134
4135 if test "$CXX" = "notfound"
4136 then
4137 CXX=""
4138 fi
4139fi
4140if test "$preset_cxx" != "$CXX"
4141then
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004143
4144 By default, distutils will build C++ extension modules with \"$CXX\".
4145 If this is not intended, then set CXX on the configure command line.
4146 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004147$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004148
4149 By default, distutils will build C++ extension modules with \"$CXX\".
4150 If this is not intended, then set CXX on the configure command line.
4151 " >&2;}
4152fi
4153
4154
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004155# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004156
4157ac_ext=c
4158ac_cpp='$CPP $CPPFLAGS'
4159ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4160ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4161ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4163$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004164# On Suns, sometimes $CPP names a directory.
4165if test -n "$CPP" && test -d "$CPP"; then
4166 CPP=
4167fi
4168if test -z "$CPP"; then
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004169 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004171else
Martin v. Löwis11437992002-04-12 09:54:03 +00004172 # Double quotes because CPP needs to be expanded
4173 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4174 do
4175 ac_preproc_ok=false
4176for ac_c_preproc_warn_flag in '' yes
4177do
4178 # Use a header file that comes with gcc, so configuring glibc
4179 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004180 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4181 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004182 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004185/* end confdefs.h. */
4186#ifdef __STDC__
4187# include <limits.h>
4188#else
4189# include <assert.h>
4190#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004191 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004193if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004194
Matthias Kloseb9621712010-04-24 17:59:49 +00004195else
Martin v. Löwis11437992002-04-12 09:54:03 +00004196 # Broken: fails on valid input.
4197continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004198fi
Antoine Pitrouc2244582011-01-02 19:34:03 +00004199rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004205#include <ac_nonexistent.h>
4206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004207if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 # Broken: success on invalid input.
4209continue
4210else
Martin v. Löwis11437992002-04-12 09:54:03 +00004211 # Passes both tests.
4212ac_preproc_ok=:
4213break
4214fi
Antoine Pitrouc2244582011-01-02 19:34:03 +00004215rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004216
4217done
4218# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Antoine Pitrouc2244582011-01-02 19:34:03 +00004219rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004220if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004221 break
4222fi
4223
4224 done
4225 ac_cv_prog_CPP=$CPP
4226
4227fi
4228 CPP=$ac_cv_prog_CPP
4229else
4230 ac_cv_prog_CPP=$CPP
4231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4233$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004234ac_preproc_ok=false
4235for ac_c_preproc_warn_flag in '' yes
4236do
4237 # Use a header file that comes with gcc, so configuring glibc
4238 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004239 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4240 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004241 # On the NeXT, cc -E runs the code through the compiler's parser,
4242 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004244/* end confdefs.h. */
4245#ifdef __STDC__
4246# include <limits.h>
4247#else
4248# include <assert.h>
4249#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004250 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004252if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004253
Matthias Kloseb9621712010-04-24 17:59:49 +00004254else
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 # Broken: fails on valid input.
4256continue
4257fi
Antoine Pitrouc2244582011-01-02 19:34:03 +00004258rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004264#include <ac_nonexistent.h>
4265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004266if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 # Broken: success on invalid input.
4268continue
4269else
Martin v. Löwis11437992002-04-12 09:54:03 +00004270 # Passes both tests.
4271ac_preproc_ok=:
4272break
4273fi
Antoine Pitrouc2244582011-01-02 19:34:03 +00004274rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004275
4276done
4277# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Antoine Pitrouc2244582011-01-02 19:34:03 +00004278rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004279if $ac_preproc_ok; then :
4280
Martin v. Löwis11437992002-04-12 09:54:03 +00004281else
Matthias Kloseb9621712010-04-24 17:59:49 +00004282 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4283$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00004284as_fn_error "C preprocessor \"$CPP\" fails sanity check
4285See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004286fi
4287
4288ac_ext=c
4289ac_cpp='$CPP $CPPFLAGS'
4290ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4291ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4292ac_compiler_gnu=$ac_cv_c_compiler_gnu
4293
4294
Matthias Kloseb9621712010-04-24 17:59:49 +00004295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4296$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004297if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004299else
Matthias Kloseb9621712010-04-24 17:59:49 +00004300 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 # Loop through the user's path and test for each of PROGNAME-LIST
4303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4305do
4306 IFS=$as_save_IFS
4307 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004308 for ac_prog in grep ggrep; do
4309 for ac_exec_ext in '' $ac_executable_extensions; do
4310 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4311 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4312# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 # Check for GNU $ac_path_GREP
4314case `"$ac_path_GREP" --version 2>&1` in
4315*GNU*)
4316 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4317*)
4318 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004319 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320 while :
4321 do
4322 cat "conftest.in" "conftest.in" >"conftest.tmp"
4323 mv "conftest.tmp" "conftest.in"
4324 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004325 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4327 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004328 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4330 # Best one so far, save it but keep looking for a better one
4331 ac_cv_path_GREP="$ac_path_GREP"
4332 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004333 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 # 10*(2^10) chars as input seems more than enough
4335 test $ac_count -gt 10 && break
4336 done
4337 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4338esac
4339
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 $ac_path_GREP_found && break 3
4341 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004345 if test -z "$ac_cv_path_GREP"; then
Antoine Pitrouc2244582011-01-02 19:34:03 +00004346 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 +00004347 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348else
4349 ac_cv_path_GREP=$GREP
4350fi
4351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4354$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355 GREP="$ac_cv_path_GREP"
4356
4357
Matthias Kloseb9621712010-04-24 17:59:49 +00004358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4359$as_echo_n "checking for egrep... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004360if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362else
4363 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4364 then ac_cv_path_EGREP="$GREP -E"
4365 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 # Loop through the user's path and test for each of PROGNAME-LIST
4369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4371do
4372 IFS=$as_save_IFS
4373 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004374 for ac_prog in egrep; do
4375 for ac_exec_ext in '' $ac_executable_extensions; do
4376 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4377 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4378# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379 # Check for GNU $ac_path_EGREP
4380case `"$ac_path_EGREP" --version 2>&1` in
4381*GNU*)
4382 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4383*)
4384 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004385 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386 while :
4387 do
4388 cat "conftest.in" "conftest.in" >"conftest.tmp"
4389 mv "conftest.tmp" "conftest.in"
4390 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004391 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004392 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4393 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004394 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004395 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4396 # Best one so far, save it but keep looking for a better one
4397 ac_cv_path_EGREP="$ac_path_EGREP"
4398 ac_path_EGREP_max=$ac_count
4399 fi
4400 # 10*(2^10) chars as input seems more than enough
4401 test $ac_count -gt 10 && break
4402 done
4403 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4404esac
4405
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 $ac_path_EGREP_found && break 3
4407 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004409 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004410IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004411 if test -z "$ac_cv_path_EGREP"; then
Antoine Pitrouc2244582011-01-02 19:34:03 +00004412 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 +00004413 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414else
4415 ac_cv_path_EGREP=$EGREP
4416fi
4417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 fi
4419fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4421$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004423
4424
Matthias Kloseb9621712010-04-24 17:59:49 +00004425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4426$as_echo_n "checking for ANSI C header files... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004427if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004428 $as_echo_n "(cached) " >&6
4429else
4430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004431/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004432#include <stdlib.h>
4433#include <stdarg.h>
4434#include <string.h>
4435#include <float.h>
4436
4437int
4438main ()
4439{
4440
4441 ;
4442 return 0;
4443}
4444_ACEOF
4445if ac_fn_c_try_compile "$LINENO"; then :
4446 ac_cv_header_stdc=yes
4447else
4448 ac_cv_header_stdc=no
4449fi
4450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4451
4452if test $ac_cv_header_stdc = yes; then
4453 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4455/* end confdefs.h. */
4456#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004457
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004458_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004459if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004460 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004461
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004462else
Matthias Kloseb9621712010-04-24 17:59:49 +00004463 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004464fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004465rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004466
Matthias Kloseb9621712010-04-24 17:59:49 +00004467fi
4468
4469if test $ac_cv_header_stdc = yes; then
4470 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4472/* end confdefs.h. */
4473#include <stdlib.h>
4474
4475_ACEOF
4476if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4477 $EGREP "free" >/dev/null 2>&1; then :
4478
4479else
4480 ac_cv_header_stdc=no
4481fi
4482rm -f conftest*
4483
4484fi
4485
4486if test $ac_cv_header_stdc = yes; then
4487 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4488 if test "$cross_compiling" = yes; then :
4489 :
4490else
4491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4492/* end confdefs.h. */
4493#include <ctype.h>
4494#include <stdlib.h>
4495#if ((' ' & 0x0FF) == 0x020)
4496# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4497# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4498#else
4499# define ISLOWER(c) \
4500 (('a' <= (c) && (c) <= 'i') \
4501 || ('j' <= (c) && (c) <= 'r') \
4502 || ('s' <= (c) && (c) <= 'z'))
4503# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4504#endif
4505
4506#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4507int
4508main ()
4509{
4510 int i;
4511 for (i = 0; i < 256; i++)
4512 if (XOR (islower (i), ISLOWER (i))
4513 || toupper (i) != TOUPPER (i))
4514 return 2;
4515 return 0;
4516}
4517_ACEOF
4518if ac_fn_c_try_run "$LINENO"; then :
4519
4520else
4521 ac_cv_header_stdc=no
4522fi
4523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4524 conftest.$ac_objext conftest.beam conftest.$ac_ext
4525fi
4526
4527fi
4528fi
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4530$as_echo "$ac_cv_header_stdc" >&6; }
4531if test $ac_cv_header_stdc = yes; then
4532
4533$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4534
4535fi
4536
4537# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4538for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4539 inttypes.h stdint.h unistd.h
4540do :
4541 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4542ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4543"
Antoine Pitrouc2244582011-01-02 19:34:03 +00004544eval as_val=\$$as_ac_Header
4545 if test "x$as_val" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004546 cat >>confdefs.h <<_ACEOF
4547#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4548_ACEOF
4549
4550fi
4551
4552done
4553
4554
4555
4556 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004557if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004558 MINIX=yes
4559else
4560 MINIX=
4561fi
4562
4563
4564 if test "$MINIX" = yes; then
4565
4566$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4567
4568
4569$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4570
4571
4572$as_echo "#define _MINIX 1" >>confdefs.h
4573
4574 fi
4575
4576
4577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4578$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004579if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004580 $as_echo_n "(cached) " >&6
4581else
4582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4583/* end confdefs.h. */
4584
4585# define __EXTENSIONS__ 1
4586 $ac_includes_default
4587int
4588main ()
4589{
4590
4591 ;
4592 return 0;
4593}
4594_ACEOF
4595if ac_fn_c_try_compile "$LINENO"; then :
4596 ac_cv_safe_to_define___extensions__=yes
4597else
4598 ac_cv_safe_to_define___extensions__=no
4599fi
4600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4601fi
4602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4603$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4604 test $ac_cv_safe_to_define___extensions__ = yes &&
4605 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4606
4607 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4608
4609 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4610
4611 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4612
4613 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4614
4615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004616
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004617# Check for unsupported systems
4618case $ac_sys_system/$ac_sys_release in
4619atheos*|Linux*/1*)
4620 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4621 echo See README for details.
4622 exit 1;;
4623esac
4624
4625
Matthias Kloseb9621712010-04-24 17:59:49 +00004626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4627$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004628
4629# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004630if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004631 withval=$with_suffix;
4632 case $withval in
4633 no) EXEEXT=;;
4634 yes) EXEEXT=.exe;;
4635 *) EXEEXT=$withval;;
4636 esac
4637fi
4638
Matthias Kloseb9621712010-04-24 17:59:49 +00004639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4640$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004641
4642# Test whether we're running on a non-case-sensitive system, in which
4643# case we give a warning if no ext is given
4644
Matthias Kloseb9621712010-04-24 17:59:49 +00004645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4646$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004647if test ! -d CaseSensitiveTestDir; then
4648mkdir CaseSensitiveTestDir
4649fi
4650
4651if test -d casesensitivetestdir
4652then
Matthias Kloseb9621712010-04-24 17:59:49 +00004653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4654$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004655 BUILDEXEEXT=.exe
4656else
Matthias Kloseb9621712010-04-24 17:59:49 +00004657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004659 BUILDEXEEXT=$EXEEXT
4660fi
4661rmdir CaseSensitiveTestDir
4662
4663case $MACHDEP in
4664bsdos*)
4665 case $CC in
4666 gcc) CC="$CC -D_HAVE_BSDI";;
4667 esac;;
4668esac
4669
4670case $ac_sys_system in
4671hp*|HP*)
4672 case $CC in
4673 cc|*/cc) CC="$CC -Ae";;
4674 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004675esac
4676
4677
4678
Matthias Kloseb9621712010-04-24 17:59:49 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4680$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004681if test -z "$LIBRARY"
4682then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004683 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4686$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004687
4688# LDLIBRARY is the name of the library to link against (as opposed to the
4689# name of the library into which to insert object files). BLDLIBRARY is also
4690# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4691# is blank as the main program is not linked directly against LDLIBRARY.
4692# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4693# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4694# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4695# DLLLIBRARY is the shared (i.e., DLL) library.
4696#
4697# RUNSHARED is used to run shared python without installed libraries
4698#
4699# INSTSONAME is the name of the shared library that will be use to install
4700# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004701#
4702# LDVERSION is the shared library version number, normally the Python version
4703# with the ABI build flags appended.
4704
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004705
4706
4707
4708
4709
4710
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004712LDLIBRARY="$LIBRARY"
4713BLDLIBRARY='$(LDLIBRARY)'
4714INSTSONAME='$(LDLIBRARY)'
4715DLLLIBRARY=''
4716LDLIBRARYDIR=''
4717RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004718LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004719
4720# LINKCC is the command that links the python executable -- default is $(CC).
4721# If CXX is set, and if it is needed to link a main function that was
4722# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4723# python might then depend on the C++ runtime
4724# This is altered for AIX in order to build the export list before
4725# linking.
4726
Matthias Kloseb9621712010-04-24 17:59:49 +00004727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4728$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004729if test -z "$LINKCC"
4730then
4731 LINKCC='$(PURIFY) $(MAINCC)'
4732 case $ac_sys_system in
4733 AIX*)
4734 exp_extra="\"\""
4735 if test $ac_sys_release -ge 5 -o \
4736 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4737 exp_extra="."
4738 fi
4739 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004740 QNX*)
4741 # qcc must be used because the other compilers do not
4742 # support -N.
4743 LINKCC=qcc;;
4744 esac
4745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4747$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004748
4749# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4750# make sure we default having it set to "no": this is used by
4751# distutils.unixccompiler to know if it should add --enable-new-dtags
4752# to linker command lines, and failing to detect GNU ld simply results
4753# in the same bahaviour as before.
4754
Matthias Kloseb9621712010-04-24 17:59:49 +00004755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4756$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757ac_prog=ld
4758if test "$GCC" = yes; then
4759 ac_prog=`$CC -print-prog-name=ld`
4760fi
4761case `"$ac_prog" -V 2>&1 < /dev/null` in
4762 *GNU*)
4763 GNULD=yes;;
4764 *)
4765 GNULD=no;;
4766esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4768$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004769
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4771$as_echo_n "checking for inline... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004772if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004773 $as_echo_n "(cached) " >&6
4774else
4775 ac_cv_c_inline=no
4776for ac_kw in inline __inline__ __inline; do
4777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4778/* end confdefs.h. */
4779#ifndef __cplusplus
4780typedef int foo_t;
4781static $ac_kw foo_t static_foo () {return 0; }
4782$ac_kw foo_t foo () {return 0; }
4783#endif
4784
4785_ACEOF
4786if ac_fn_c_try_compile "$LINENO"; then :
4787 ac_cv_c_inline=$ac_kw
4788fi
4789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4790 test "$ac_cv_c_inline" != no && break
4791done
4792
4793fi
4794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4795$as_echo "$ac_cv_c_inline" >&6; }
4796
4797case $ac_cv_c_inline in
4798 inline | yes) ;;
4799 *)
4800 case $ac_cv_c_inline in
4801 no) ac_val=;;
4802 *) ac_val=$ac_cv_c_inline;;
4803 esac
4804 cat >>confdefs.h <<_ACEOF
4805#ifndef __cplusplus
4806#define inline $ac_val
4807#endif
4808_ACEOF
4809 ;;
4810esac
4811
4812if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004813
4814$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004815
4816
4817fi
4818
4819
Matthias Kloseb9621712010-04-24 17:59:49 +00004820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4821$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004823if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004824 enableval=$enable_shared;
4825fi
4826
4827
4828if test -z "$enable_shared"
4829then
4830 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004831 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832 enable_shared="yes";;
4833 *)
4834 enable_shared="no";;
4835 esac
4836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4838$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004839
Matthias Kloseb9621712010-04-24 17:59:49 +00004840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4841$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004843if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844 enableval=$enable_profiling; ac_save_cc="$CC"
4845 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004846 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004847 ac_enable_profiling="no"
4848else
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850/* end confdefs.h. */
4851int main() { return 0; }
4852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004853if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854 ac_enable_profiling="yes"
4855else
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4859 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004860fi
4861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004862 CC="$ac_save_cc"
4863fi
4864
Matthias Kloseb9621712010-04-24 17:59:49 +00004865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4866$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004867
4868case "$ac_enable_profiling" in
4869 "yes")
4870 BASECFLAGS="-pg $BASECFLAGS"
4871 LDFLAGS="-pg $LDFLAGS"
4872 ;;
4873esac
4874
Matthias Kloseb9621712010-04-24 17:59:49 +00004875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4876$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004877
4878# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4879# library that we build, but we do not want to link against it (we
4880# will find it with a -framework option). For this reason there is an
4881# extra variable BLDLIBRARY against which Python and the extension
4882# modules are linked, BLDLIBRARY. This is normally the same as
4883# LDLIBRARY, but empty for MacOSX framework builds.
4884if test "$enable_framework"
4885then
4886 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4887 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4888 BLDLIBRARY=''
4889else
4890 BLDLIBRARY='$(LDLIBRARY)'
4891fi
4892
4893# Other platforms follow
4894if test $enable_shared = "yes"; then
4895
Matthias Kloseb9621712010-04-24 17:59:49 +00004896$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004897
4898 case $ac_sys_system in
4899 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004900 LDLIBRARY='libpython$(LDVERSION).dll.a'
4901 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004902 ;;
4903 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004904 LDLIBRARY='libpython$(LDVERSION).so'
4905 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004906 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4907 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004908 if test $with_pydebug == no
4909 then
4910 PY3LIBRARY=libpython3.so
4911 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912 ;;
4913 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004914 LDLIBRARY='libpython$(LDVERSION).so'
4915 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004916 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4917 case $ac_sys_system in
4918 FreeBSD*)
4919 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4920 ;;
4921 esac
4922 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004923 PY3LIBRARY=libpython3.so
4924 if test $with_pydebug == no
4925 then
4926 PY3LIBRARY=libpython3.so
4927 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 ;;
4929 hp*|HP*)
4930 case `uname -m` in
4931 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004932 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004933 ;;
4934 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004935 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004936 ;;
4937 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004938 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004939 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4940 ;;
4941 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004942 LDLIBRARY='libpython$(LDVERSION).so'
4943 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004944 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4945 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004947 LDLIBRARY='libpython$(LDVERSION).dylib'
4948 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004949 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4950 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004951 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004952 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004953 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4954 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004955
4956 esac
4957else # shared is disabled
4958 case $ac_sys_system in
4959 CYGWIN*)
4960 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004961 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004962 ;;
4963 esac
4964fi
4965
Matthias Kloseb9621712010-04-24 17:59:49 +00004966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4967$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968
4969if test -n "$ac_tool_prefix"; then
4970 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4971set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4973$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004974if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004975 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004976else
4977 if test -n "$RANLIB"; then
4978 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4979else
4980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4981for as_dir in $PATH
4982do
4983 IFS=$as_save_IFS
4984 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004985 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004986 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4987 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004988 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004989 break 2
4990 fi
4991done
Matthias Kloseb9621712010-04-24 17:59:49 +00004992 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993IFS=$as_save_IFS
4994
4995fi
4996fi
4997RANLIB=$ac_cv_prog_RANLIB
4998if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5000$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005001else
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5003$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005004fi
5005
5006
5007fi
5008if test -z "$ac_cv_prog_RANLIB"; then
5009 ac_ct_RANLIB=$RANLIB
5010 # Extract the first word of "ranlib", so it can be a program name with args.
5011set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5013$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005014if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005015 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005016else
5017 if test -n "$ac_ct_RANLIB"; then
5018 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5019else
5020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5021for as_dir in $PATH
5022do
5023 IFS=$as_save_IFS
5024 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005026 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5027 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005029 break 2
5030 fi
5031done
Matthias Kloseb9621712010-04-24 17:59:49 +00005032 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033IFS=$as_save_IFS
5034
5035fi
5036fi
5037ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5038if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5040$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005041else
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5043$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044fi
5045
5046 if test "x$ac_ct_RANLIB" = x; then
5047 RANLIB=":"
5048 else
5049 case $cross_compiling:$ac_tool_warned in
5050yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005051{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5052$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005053ac_tool_warned=yes ;;
5054esac
5055 RANLIB=$ac_ct_RANLIB
5056 fi
5057else
5058 RANLIB="$ac_cv_prog_RANLIB"
5059fi
5060
5061
5062for ac_prog in ar aal
5063do
5064 # Extract the first word of "$ac_prog", so it can be a program name with args.
5065set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5067$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005068if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005069 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005070else
5071 if test -n "$AR"; then
5072 ac_cv_prog_AR="$AR" # Let the user override the test.
5073else
5074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5075for as_dir in $PATH
5076do
5077 IFS=$as_save_IFS
5078 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005080 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5081 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083 break 2
5084 fi
5085done
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087IFS=$as_save_IFS
5088
5089fi
5090fi
5091AR=$ac_cv_prog_AR
5092if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5094$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005095else
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5097$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005098fi
5099
5100
5101 test -n "$AR" && break
5102done
5103test -n "$AR" || AR="ar"
5104
5105
5106# tweak ARFLAGS only if the user didn't set it on the command line
5107
5108if test -z "$ARFLAGS"
5109then
5110 ARFLAGS="rc"
5111fi
5112
5113
5114# Extract the first word of "svnversion", so it can be a program name with args.
5115set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5117$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005118if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005120else
5121 if test -n "$SVNVERSION"; then
5122 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5123else
5124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5125for as_dir in $PATH
5126do
5127 IFS=$as_save_IFS
5128 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5131 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005133 break 2
5134 fi
5135done
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005137IFS=$as_save_IFS
5138
5139 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5140fi
5141fi
5142SVNVERSION=$ac_cv_prog_SVNVERSION
5143if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5145$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005146else
Matthias Kloseb9621712010-04-24 17:59:49 +00005147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5148$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005149fi
5150
5151
5152if test $SVNVERSION = found
5153then
5154 SVNVERSION="svnversion \$(srcdir)"
5155else
5156 SVNVERSION="echo Unversioned directory"
5157fi
5158
5159case $MACHDEP in
5160bsdos*|hp*|HP*)
5161 # install -d does not work on BSDI or HP-UX
5162 if test -z "$INSTALL"
5163 then
5164 INSTALL="${srcdir}/install-sh -c"
5165 fi
5166esac
5167ac_aux_dir=
5168for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Antoine Pitrouc2244582011-01-02 19:34:03 +00005169 for ac_t in install-sh install.sh shtool; do
5170 if test -f "$ac_dir/$ac_t"; then
5171 ac_aux_dir=$ac_dir
5172 ac_install_sh="$ac_aux_dir/$ac_t -c"
5173 break 2
5174 fi
5175 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005176done
5177if test -z "$ac_aux_dir"; then
Antoine Pitrouc2244582011-01-02 19:34:03 +00005178 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005179fi
5180
5181# These three variables are undocumented and unsupported,
5182# and are intended to be withdrawn in a future Autoconf release.
5183# They can cause serious problems if a builder's source tree is in a directory
5184# whose full name contains unusual characters.
5185ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5186ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5187ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5188
5189
5190# Find a good install program. We prefer a C program (faster),
5191# so one script is as good as another. But avoid the broken or
5192# incompatible versions:
5193# SysV /etc/install, /usr/sbin/install
5194# SunOS /usr/etc/install
5195# IRIX /sbin/install
5196# AIX /bin/install
5197# AmigaOS /C/install, which installs bootblocks on floppy discs
5198# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5199# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5200# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5201# OS/2's system install, which has a completely different semantic
5202# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005203# Reject install programs that cannot install multiple files.
5204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5205$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005206if test -z "$INSTALL"; then
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005207if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005208 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005209else
5210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5211for as_dir in $PATH
5212do
5213 IFS=$as_save_IFS
5214 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005215 # Account for people who put trailing slashes in PATH elements.
5216case $as_dir/ in #((
5217 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005218 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005219 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005220 /usr/ucb/* ) ;;
5221 *)
5222 # OSF1 and SCO ODT 3.0 have their own names for install.
5223 # Don't use installbsd from OSF since it installs stuff as root
5224 # by default.
5225 for ac_prog in ginstall scoinst install; do
5226 for ac_exec_ext in '' $ac_executable_extensions; do
5227 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5228 if test $ac_prog = install &&
5229 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5230 # AIX install. It has an incompatible calling convention.
5231 :
5232 elif test $ac_prog = install &&
5233 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5234 # program-specific install script used by HP pwplus--don't use.
5235 :
5236 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005237 rm -rf conftest.one conftest.two conftest.dir
5238 echo one > conftest.one
5239 echo two > conftest.two
5240 mkdir conftest.dir
5241 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5242 test -s conftest.one && test -s conftest.two &&
5243 test -s conftest.dir/conftest.one &&
5244 test -s conftest.dir/conftest.two
5245 then
5246 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5247 break 3
5248 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005249 fi
5250 fi
5251 done
5252 done
5253 ;;
5254esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005255
5256 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005257IFS=$as_save_IFS
5258
Matthias Kloseb9621712010-04-24 17:59:49 +00005259rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005260
5261fi
5262 if test "${ac_cv_path_install+set}" = set; then
5263 INSTALL=$ac_cv_path_install
5264 else
5265 # As a last resort, use the slow shell script. Don't cache a
5266 # value for INSTALL within a source directory, because that will
5267 # break other packages using the cache if that directory is
5268 # removed, or if the value is a relative name.
5269 INSTALL=$ac_install_sh
5270 fi
5271fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5273$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005274
5275# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5276# It thinks the first close brace ends the variable substitution.
5277test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5278
5279test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5280
5281test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5282
5283
5284# Not every filesystem supports hard links
5285
5286if test -z "$LN" ; then
5287 case $ac_sys_system in
5288 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005289 *) LN=ln;;
5290 esac
5291fi
5292
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005293# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005294
5295ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005296
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005297# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5299$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005300
5301# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005302if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005303 withval=$with_pydebug;
5304if test "$withval" != no
5305then
5306
Matthias Kloseb9621712010-04-24 17:59:49 +00005307$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005308
Matthias Kloseb9621712010-04-24 17:59:49 +00005309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5310$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005311 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005312 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005313else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5314$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005315fi
5316else
Matthias Kloseb9621712010-04-24 17:59:49 +00005317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5318$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005319fi
5320
5321
5322# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5323# merged with this chunk of code?
5324
5325# Optimizer/debugger flags
5326# ------------------------
5327# (The following bit of code is complicated enough - please keep things
5328# indented properly. Just pretend you're editing Python code. ;-)
5329
5330# There are two parallel sets of case statements below, one that checks to
5331# see if OPT was set and one that does BASECFLAGS setting based upon
5332# compiler and platform. BASECFLAGS tweaks need to be made even if the
5333# user set OPT.
5334
5335# tweak OPT based on compiler and platform, only if the user didn't set
5336# it on the command line
5337
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005338if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005339then
5340 case $GCC in
5341 yes)
5342 if test "$CC" != 'g++' ; then
5343 STRICT_PROTO="-Wstrict-prototypes"
5344 fi
5345 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5346 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5347 WRAP="-fwrapv"
5348 fi
5349 case $ac_cv_prog_cc_g in
5350 yes)
5351 if test "$Py_DEBUG" = 'true' ; then
5352 # Optimization messes up debuggers, so turn it off for
5353 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005354 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355 else
5356 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5357 fi
5358 ;;
5359 *)
5360 OPT="-O3 -Wall $STRICT_PROTO"
5361 ;;
5362 esac
5363 case $ac_sys_system in
5364 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5365 ;;
5366 esac
5367 ;;
5368
5369 *)
5370 OPT="-O"
5371 ;;
5372 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373fi
5374
5375
5376
5377# The -arch flags for universal builds on OSX
5378UNIVERSAL_ARCH_FLAGS=
5379
5380
5381# tweak BASECFLAGS based on compiler and platform
5382case $GCC in
5383yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005384 # Python doesn't violate C99 aliasing rules, but older versions of
5385 # GCC produce warnings for legal Python code. Enable
5386 # -fno-strict-aliasing on versions of GCC that support but produce
5387 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5389$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005390 ac_save_cc="$CC"
5391 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005392 save_CFLAGS="$CFLAGS"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005393 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005395else
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005398
Matthias Kloseb159a552010-04-25 21:00:44 +00005399
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005400int
5401main ()
5402{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005403
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005404 ;
5405 return 0;
5406}
Matthias Kloseb159a552010-04-25 21:00:44 +00005407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005409if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005410
5411 CC="$ac_save_cc -fstrict-aliasing"
5412 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005414/* end confdefs.h. */
5415
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005416 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005417int
5418main ()
5419{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005420double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005421 ;
5422 return 0;
5423}
Matthias Kloseb159a552010-04-25 21:00:44 +00005424
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005426if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005427
5428 ac_cv_no_strict_aliasing=no
5429
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005430else
Matthias Kloseb159a552010-04-25 21:00:44 +00005431
5432 ac_cv_no_strict_aliasing=yes
5433
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005434fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005436
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005437else
Matthias Kloseb159a552010-04-25 21:00:44 +00005438
5439 ac_cv_no_strict_aliasing=no
5440
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005441fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005443fi
5444
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005445 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5448$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005449 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450 then
5451 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5452 fi
5453
5454 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5455 # support. Without this, treatment of subnormals doesn't follow
5456 # the standard.
5457 case $ac_sys_machine in
5458 alpha*)
5459 BASECFLAGS="$BASECFLAGS -mieee"
5460 ;;
5461 esac
5462
5463 case $ac_sys_system in
5464 SCO_SV*)
5465 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5466 ;;
5467 # is there any other compiler on Darwin besides gcc?
5468 Darwin*)
5469 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5470 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005471 if test "${CC}" = gcc
5472 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5474$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005475 case "${UNIVERSALSDK}" in
5476 */MacOSX10.4u.sdk)
5477 # Build using 10.4 SDK, force usage of gcc when the
5478 # compiler is gcc, otherwise the user will get very
5479 # confusing error messages when building on OSX 10.6
5480 CC=gcc-4.0
5481 CPP=cpp-4.0
5482 ;;
5483 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5485$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005486 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005487
5488
5489 if test "${enable_universalsdk}"; then
5490 UNIVERSAL_ARCH_FLAGS=""
5491 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5492 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5493 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005494 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005495 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5496 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005497 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005498 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499
5500 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5501 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005502 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005503 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005505 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5506 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005507 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005508 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005509
5510 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5511 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005512 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005513 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005514
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005515 else
Antoine Pitrouc2244582011-01-02 19:34:03 +00005516 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 +00005517
5518 fi
5519
5520
Ronald Oussoren666028b2010-04-18 19:07:43 +00005521 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5522 if test "${UNIVERSALSDK}" != "/"
5523 then
5524 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5525 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005526 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005527 fi
5528 fi
5529
5530 # Calculate the right deployment target for this build.
5531 #
5532 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5533 if test ${cur_target} '>' 10.2; then
5534 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005535 if test ${enable_universalsdk}; then
5536 if test "${UNIVERSAL_ARCHS}" = "all"; then
5537 # Ensure that the default platform for a
5538 # 4-way universal build is OSX 10.5,
5539 # that's the first OS release where
5540 # 4-way builds make sense.
5541 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005542
5543 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5544 cur_target='10.5'
5545
5546 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5547 cur_target='10.5'
5548
5549 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5550 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005551 fi
5552 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005553 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005554 # On Intel macs default to a deployment
5555 # target of 10.4, that's the first OSX
5556 # release with Intel support.
5557 cur_target="10.4"
5558 fi
5559 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005560 fi
5561 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5562
5563 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5564 # environment with a value that is the same as what we'll use
5565 # in the Makefile to ensure that we'll get the same compiler
5566 # environment during configure and build time.
5567 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5568 export MACOSX_DEPLOYMENT_TARGET
5569 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5570
5571 ;;
5572 OSF*)
5573 BASECFLAGS="$BASECFLAGS -mieee"
5574 ;;
5575 esac
5576 ;;
5577
5578*)
5579 case $ac_sys_system in
5580 OpenUNIX*|UnixWare*)
5581 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5582 ;;
5583 OSF*)
5584 BASECFLAGS="$BASECFLAGS -ieee -std"
5585 ;;
5586 SCO_SV*)
5587 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5588 ;;
5589 esac
5590 ;;
5591esac
5592
5593if test "$Py_DEBUG" = 'true'; then
5594 :
5595else
5596 OPT="-DNDEBUG $OPT"
5597fi
5598
5599if test "$ac_arch_flags"
5600then
5601 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5602fi
5603
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604# Check whether GCC supports PyArg_ParseTuple format
5605if test "$GCC" = "yes"
5606then
Matthias Kloseb9621712010-04-24 17:59:49 +00005607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5608$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609 save_CFLAGS=$CFLAGS
5610 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612/* end confdefs.h. */
5613
5614 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005615int
5616main ()
5617{
5618
5619 ;
5620 return 0;
5621}
Matthias Kloseb159a552010-04-25 21:00:44 +00005622
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005624if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625
Matthias Kloseb159a552010-04-25 21:00:44 +00005626
Matthias Kloseb9621712010-04-24 17:59:49 +00005627$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628
Matthias Kloseb159a552010-04-25 21:00:44 +00005629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005630$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005631
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632else
Matthias Kloseb159a552010-04-25 21:00:44 +00005633
5634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005635$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005636
5637fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5639 CFLAGS=$save_CFLAGS
5640fi
5641
5642# On some compilers, pthreads are available without further options
5643# (e.g. MacOS X). On some of these systems, the compiler will not
5644# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5645# So we have to see first whether pthreads are available without
5646# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5648$as_echo_n "checking whether pthreads are available without options... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005649if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005650 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651else
Matthias Kloseb9621712010-04-24 17:59:49 +00005652 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653 ac_cv_pthread_is_default=no
5654else
Matthias Kloseb9621712010-04-24 17:59:49 +00005655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656/* end confdefs.h. */
5657
5658#include <pthread.h>
5659
5660void* routine(void* p){return NULL;}
5661
5662int main(){
5663 pthread_t p;
5664 if(pthread_create(&p,NULL,routine,NULL)!=0)
5665 return 1;
5666 (void)pthread_detach(p);
5667 return 0;
5668}
5669
5670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005671if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672
5673 ac_cv_pthread_is_default=yes
5674 ac_cv_kthread=no
5675 ac_cv_pthread=no
5676
5677else
Matthias Kloseb9621712010-04-24 17:59:49 +00005678 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5681 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682fi
5683
5684
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685fi
5686
Matthias Kloseb9621712010-04-24 17:59:49 +00005687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5688$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
5690
5691if test $ac_cv_pthread_is_default = yes
5692then
5693 ac_cv_kpthread=no
5694else
5695# -Kpthread, if available, provides the right #defines
5696# and linker options to make pthread_create available
5697# Some compilers won't report that they do not support -Kpthread,
5698# so we need to run a program to see whether it really made the
5699# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5701$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005702if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005703 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704else
5705 ac_save_cc="$CC"
5706CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005707if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708 ac_cv_kpthread=no
5709else
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711/* end confdefs.h. */
5712
5713#include <pthread.h>
5714
5715void* routine(void* p){return NULL;}
5716
5717int main(){
5718 pthread_t p;
5719 if(pthread_create(&p,NULL,routine,NULL)!=0)
5720 return 1;
5721 (void)pthread_detach(p);
5722 return 0;
5723}
5724
5725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005726if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727 ac_cv_kpthread=yes
5728else
Matthias Kloseb9621712010-04-24 17:59:49 +00005729 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5732 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733fi
5734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735CC="$ac_save_cc"
5736fi
5737
Matthias Kloseb9621712010-04-24 17:59:49 +00005738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5739$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740fi
5741
5742if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5743then
5744# -Kthread, if available, provides the right #defines
5745# and linker options to make pthread_create available
5746# Some compilers won't report that they do not support -Kthread,
5747# so we need to run a program to see whether it really made the
5748# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5750$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005751if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005752 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753else
5754 ac_save_cc="$CC"
5755CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005756if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757 ac_cv_kthread=no
5758else
Matthias Kloseb9621712010-04-24 17:59:49 +00005759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760/* end confdefs.h. */
5761
5762#include <pthread.h>
5763
5764void* routine(void* p){return NULL;}
5765
5766int main(){
5767 pthread_t p;
5768 if(pthread_create(&p,NULL,routine,NULL)!=0)
5769 return 1;
5770 (void)pthread_detach(p);
5771 return 0;
5772}
5773
5774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005775if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776 ac_cv_kthread=yes
5777else
Matthias Kloseb9621712010-04-24 17:59:49 +00005778 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5781 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782fi
5783
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784CC="$ac_save_cc"
5785fi
5786
Matthias Kloseb9621712010-04-24 17:59:49 +00005787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5788$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789fi
5790
5791if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5792then
5793# -pthread, if available, provides the right #defines
5794# and linker options to make pthread_create available
5795# Some compilers won't report that they do not support -pthread,
5796# so we need to run a program to see whether it really made the
5797# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5799$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005800if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005801 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802else
5803 ac_save_cc="$CC"
5804CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005805if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806 ac_cv_pthread=no
5807else
Matthias Kloseb9621712010-04-24 17:59:49 +00005808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809/* end confdefs.h. */
5810
5811#include <pthread.h>
5812
5813void* routine(void* p){return NULL;}
5814
5815int main(){
5816 pthread_t p;
5817 if(pthread_create(&p,NULL,routine,NULL)!=0)
5818 return 1;
5819 (void)pthread_detach(p);
5820 return 0;
5821}
5822
5823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005824if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825 ac_cv_pthread=yes
5826else
Matthias Kloseb9621712010-04-24 17:59:49 +00005827 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5830 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831fi
5832
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833CC="$ac_save_cc"
5834fi
5835
Matthias Kloseb9621712010-04-24 17:59:49 +00005836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5837$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838fi
5839
5840# If we have set a CC compiler flag for thread support then
5841# check if it works for CXX, too.
5842ac_cv_cxx_thread=no
5843if test ! -z "$CXX"
5844then
Matthias Kloseb9621712010-04-24 17:59:49 +00005845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5846$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847ac_save_cxx="$CXX"
5848
5849if test "$ac_cv_kpthread" = "yes"
5850then
5851 CXX="$CXX -Kpthread"
5852 ac_cv_cxx_thread=yes
5853elif test "$ac_cv_kthread" = "yes"
5854then
5855 CXX="$CXX -Kthread"
5856 ac_cv_cxx_thread=yes
5857elif test "$ac_cv_pthread" = "yes"
5858then
5859 CXX="$CXX -pthread"
5860 ac_cv_cxx_thread=yes
5861fi
5862
5863if test $ac_cv_cxx_thread = yes
5864then
5865 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5866 $CXX -c conftest.$ac_ext 2>&5
5867 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5868 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5869 then
5870 ac_cv_cxx_thread=yes
5871 else
5872 ac_cv_cxx_thread=no
5873 fi
5874 rm -fr conftest*
5875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5877$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878fi
5879CXX="$ac_save_cxx"
5880
5881
5882# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5884$as_echo_n "checking for ANSI C header files... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005885if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005886 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887else
Matthias Kloseb9621712010-04-24 17:59:49 +00005888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889/* end confdefs.h. */
5890#include <stdlib.h>
5891#include <stdarg.h>
5892#include <string.h>
5893#include <float.h>
5894
5895int
5896main ()
5897{
5898
5899 ;
5900 return 0;
5901}
5902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005903if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 ac_cv_header_stdc=yes
5905else
Matthias Kloseb9621712010-04-24 17:59:49 +00005906 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5909
5910if test $ac_cv_header_stdc = yes; then
5911 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913/* end confdefs.h. */
5914#include <string.h>
5915
5916_ACEOF
5917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005918 $EGREP "memchr" >/dev/null 2>&1; then :
5919
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920else
5921 ac_cv_header_stdc=no
5922fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005923rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924
5925fi
5926
5927if test $ac_cv_header_stdc = yes; then
5928 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930/* end confdefs.h. */
5931#include <stdlib.h>
5932
5933_ACEOF
5934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005935 $EGREP "free" >/dev/null 2>&1; then :
5936
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937else
5938 ac_cv_header_stdc=no
5939fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005940rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941
5942fi
5943
5944if test $ac_cv_header_stdc = yes; then
5945 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005946 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 :
5948else
Matthias Kloseb9621712010-04-24 17:59:49 +00005949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950/* end confdefs.h. */
5951#include <ctype.h>
5952#include <stdlib.h>
5953#if ((' ' & 0x0FF) == 0x020)
5954# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5955# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5956#else
5957# define ISLOWER(c) \
5958 (('a' <= (c) && (c) <= 'i') \
5959 || ('j' <= (c) && (c) <= 'r') \
5960 || ('s' <= (c) && (c) <= 'z'))
5961# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5962#endif
5963
5964#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5965int
5966main ()
5967{
5968 int i;
5969 for (i = 0; i < 256; i++)
5970 if (XOR (islower (i), ISLOWER (i))
5971 || toupper (i) != TOUPPER (i))
5972 return 2;
5973 return 0;
5974}
5975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005976if ac_fn_c_try_run "$LINENO"; then :
5977
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978else
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5982 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983fi
5984
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985fi
5986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5988$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989if test $ac_cv_header_stdc = yes; then
5990
Matthias Kloseb9621712010-04-24 17:59:49 +00005991$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992
5993fi
5994
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005995for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5996fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005997ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005998shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005999unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006000sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6001sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006002sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006003sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006004sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00006005sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006006bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006007do :
6008 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6009ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Antoine Pitrouc2244582011-01-02 19:34:03 +00006010eval as_val=\$$as_ac_Header
6011 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006012 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006013#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006014_ACEOF
6015
6016fi
6017
Guido van Rossum627b2d71993-12-24 10:39:16 +00006018done
6019
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006020ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006021for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006022 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6024$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Antoine Pitrouc2244582011-01-02 19:34:03 +00006025if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006026 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006027else
Matthias Kloseb9621712010-04-24 17:59:49 +00006028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006029/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006030#include <sys/types.h>
6031#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006032
Martin v. Löwis11437992002-04-12 09:54:03 +00006033int
6034main ()
6035{
6036if ((DIR *) 0)
6037return 0;
6038 ;
6039 return 0;
6040}
6041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006042if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006043 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006044else
Matthias Kloseb9621712010-04-24 17:59:49 +00006045 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006048fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006049eval ac_res=\$$as_ac_Header
6050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6051$as_echo "$ac_res" >&6; }
Antoine Pitrouc2244582011-01-02 19:34:03 +00006052eval as_val=\$$as_ac_Header
6053 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006054 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006055#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006056_ACEOF
6057
6058ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006060
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006061done
6062# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6063if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6065$as_echo_n "checking for library containing opendir... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006066if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006067 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006068else
Martin v. Löwis11437992002-04-12 09:54:03 +00006069 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006072
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006073/* Override any GCC internal prototype to avoid an error.
6074 Use char because int might match the return type of a GCC
6075 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006076#ifdef __cplusplus
6077extern "C"
6078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006079char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006080int
6081main ()
6082{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006083return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006084 ;
6085 return 0;
6086}
6087_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006088for ac_lib in '' dir; do
6089 if test -z "$ac_lib"; then
6090 ac_res="none required"
6091 else
6092 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006093 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006094 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006095 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006096 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006098rm -f core conftest.err conftest.$ac_objext \
6099 conftest$ac_exeext
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006100 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006101 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006103done
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006104if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006106else
6107 ac_cv_search_opendir=no
6108fi
6109rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006110LIBS=$ac_func_search_save_LIBS
6111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6113$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006114ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006115if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006117
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006118fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006119
Michael W. Hudson54241132001-12-07 15:38:26 +00006120else
Matthias Kloseb9621712010-04-24 17:59:49 +00006121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6122$as_echo_n "checking for library containing opendir... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006123if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006124 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006125else
6126 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006128/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006129
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006130/* Override any GCC internal prototype to avoid an error.
6131 Use char because int might match the return type of a GCC
6132 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006133#ifdef __cplusplus
6134extern "C"
6135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006136char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006137int
6138main ()
6139{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006140return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006141 ;
6142 return 0;
6143}
6144_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006145for ac_lib in '' x; do
6146 if test -z "$ac_lib"; then
6147 ac_res="none required"
6148 else
6149 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006150 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006151 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006152 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006155rm -f core conftest.err conftest.$ac_objext \
6156 conftest$ac_exeext
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006157 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006158 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006160done
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006161if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006163else
6164 ac_cv_search_opendir=no
6165fi
6166rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006167LIBS=$ac_func_search_save_LIBS
6168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6170$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006171ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006172if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006173 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006174
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006175fi
6176
6177fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006178
Matthias Kloseb9621712010-04-24 17:59:49 +00006179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6180$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006181if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006182 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006183else
Matthias Kloseb9621712010-04-24 17:59:49 +00006184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006185/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006186#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006187int
6188main ()
6189{
6190return makedev(0, 0);
6191 ;
6192 return 0;
6193}
6194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006195if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006196 ac_cv_header_sys_types_h_makedev=yes
6197else
Matthias Kloseb9621712010-04-24 17:59:49 +00006198 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006200rm -f core conftest.err conftest.$ac_objext \
6201 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006202
6203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6205$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006206
6207if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006208ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006209if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006210
Matthias Kloseb9621712010-04-24 17:59:49 +00006211$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006212
6213fi
6214
6215
6216
6217 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006218 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006219if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006220
Matthias Kloseb9621712010-04-24 17:59:49 +00006221$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222
6223fi
6224
6225
6226 fi
6227fi
6228
Michael W. Hudson54241132001-12-07 15:38:26 +00006229
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006230# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006231for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006232do :
6233 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006234#ifdef HAVE_CURSES_H
6235#include <curses.h>
6236#endif
6237
Matthias Kloseb9621712010-04-24 17:59:49 +00006238"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006239if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006240 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006241#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006242_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006243
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006244fi
6245
6246done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006247
6248
Martin v. Löwis11017b12006-01-14 18:12:57 +00006249# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006250for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006251do :
6252 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 +00006253#ifdef HAVE_ASM_TYPES_H
6254#include <asm/types.h>
6255#endif
6256#ifdef HAVE_SYS_SOCKET_H
6257#include <sys/socket.h>
6258#endif
6259
Matthias Kloseb9621712010-04-24 17:59:49 +00006260"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006261if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006262 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006263#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006264_ACEOF
6265
6266fi
6267
6268done
6269
6270
Guido van Rossum627b2d71993-12-24 10:39:16 +00006271# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006272was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6274$as_echo_n "checking for clock_t in time.h... " >&6; }
6275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006276/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006277#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006278
6279_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006281 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006282 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006283else
Martin v. Löwis11437992002-04-12 09:54:03 +00006284
6285
Matthias Kloseb9621712010-04-24 17:59:49 +00006286$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006287
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006288
Guido van Rossum627b2d71993-12-24 10:39:16 +00006289fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006290rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006291
Matthias Kloseb9621712010-04-24 17:59:49 +00006292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6293$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006294
Neal Norwitz11690112002-07-30 01:08:28 +00006295# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6297$as_echo_n "checking for makedev... " >&6; }
6298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006299/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006300
Jesus Cea740f53a2010-04-28 11:35:30 +00006301#if defined(MAJOR_IN_MKDEV)
6302#include <sys/mkdev.h>
6303#elif defined(MAJOR_IN_SYSMACROS)
6304#include <sys/sysmacros.h>
6305#else
6306#include <sys/types.h>
6307#endif
6308
Neal Norwitz11690112002-07-30 01:08:28 +00006309int
6310main ()
6311{
Jesus Cea740f53a2010-04-28 11:35:30 +00006312
6313 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006314 ;
6315 return 0;
6316}
Matthias Kloseb159a552010-04-25 21:00:44 +00006317
Neal Norwitz11690112002-07-30 01:08:28 +00006318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006319if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006320 ac_cv_has_makedev=yes
6321else
Matthias Kloseb9621712010-04-24 17:59:49 +00006322 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006323fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006324rm -f core conftest.err conftest.$ac_objext \
6325 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006326if test "$ac_cv_has_makedev" = "no"; then
6327 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006329/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006330
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006331#define _OSF_SOURCE 1
6332#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006333
Neal Norwitz11690112002-07-30 01:08:28 +00006334int
6335main ()
6336{
6337 makedev(0, 0)
6338 ;
6339 return 0;
6340}
6341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006342if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006343 ac_cv_has_makedev=yes
6344else
Matthias Kloseb9621712010-04-24 17:59:49 +00006345 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006347rm -f core conftest.err conftest.$ac_objext \
6348 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006349 if test "$ac_cv_has_makedev" = "yes"; then
6350
Matthias Kloseb9621712010-04-24 17:59:49 +00006351$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006352
6353 fi
6354fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6356$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006357if test "$ac_cv_has_makedev" = "yes"; then
6358
Matthias Kloseb9621712010-04-24 17:59:49 +00006359$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006360
6361fi
6362
Martin v. Löwis399a6892002-10-04 10:22:02 +00006363# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6364# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6365# defined, but the compiler does not support pragma redefine_extname,
6366# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6367# structures (such as rlimit64) without declaring them. As a
6368# work-around, disable LFS on such configurations
6369
6370use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6372$as_echo_n "checking Solaris LFS bug... " >&6; }
6373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006374/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006375
6376#define _LARGEFILE_SOURCE 1
6377#define _FILE_OFFSET_BITS 64
6378#include <sys/resource.h>
6379
Martin v. Löwis399a6892002-10-04 10:22:02 +00006380int
6381main ()
6382{
6383struct rlimit foo;
6384 ;
6385 return 0;
6386}
6387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006388if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006389 sol_lfs_bug=no
6390else
Matthias Kloseb9621712010-04-24 17:59:49 +00006391 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6395$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006396if test "$sol_lfs_bug" = "yes"; then
6397 use_lfs=no
6398fi
6399
6400if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006401# Two defines needed to enable largefile support on various platforms
6402# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006403
Matthias Kloseb9621712010-04-24 17:59:49 +00006404$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006405
6406
Matthias Kloseb9621712010-04-24 17:59:49 +00006407$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006408
Martin v. Löwis399a6892002-10-04 10:22:02 +00006409fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006410
Guido van Rossum84e7b241996-08-19 21:59:00 +00006411# Add some code to confdefs.h so that the test for off_t works on SCO
6412cat >> confdefs.h <<\EOF
6413#if defined(SCO_DS)
6414#undef _OFF_T
6415#endif
6416EOF
6417
Guido van Rossumef2255b2000-03-10 22:30:29 +00006418# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006419ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006420if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006421
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006422else
Martin v. Löwis11437992002-04-12 09:54:03 +00006423
6424cat >>confdefs.h <<_ACEOF
6425#define mode_t int
6426_ACEOF
6427
6428fi
6429
Matthias Kloseb9621712010-04-24 17:59:49 +00006430ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006431if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006432
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006433else
Martin v. Löwis11437992002-04-12 09:54:03 +00006434
6435cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006436#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006437_ACEOF
6438
6439fi
6440
Matthias Kloseb9621712010-04-24 17:59:49 +00006441ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006442if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006443
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006444else
Martin v. Löwis11437992002-04-12 09:54:03 +00006445
6446cat >>confdefs.h <<_ACEOF
6447#define pid_t int
6448_ACEOF
6449
6450fi
6451
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006452
Martin v. Löwis11437992002-04-12 09:54:03 +00006453cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006454#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006455_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006456
Matthias Kloseb9621712010-04-24 17:59:49 +00006457ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006458if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006459
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006460else
Martin v. Löwis11437992002-04-12 09:54:03 +00006461
6462cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006463#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006464_ACEOF
6465
6466fi
6467
Matthias Kloseb9621712010-04-24 17:59:49 +00006468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6469$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006470if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006471 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006472else
Matthias Kloseb9621712010-04-24 17:59:49 +00006473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006474/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006475#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006476
6477_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006479 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006480 ac_cv_type_uid_t=yes
6481else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006482 ac_cv_type_uid_t=no
6483fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006484rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006485
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6488$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006489if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006490
Matthias Kloseb9621712010-04-24 17:59:49 +00006491$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006492
6493
Matthias Kloseb9621712010-04-24 17:59:49 +00006494$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006495
6496fi
6497
Matthias Kloseb9621712010-04-24 17:59:49 +00006498ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6499case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006500 no|yes) ;; #(
6501 *)
6502
Matthias Kloseb9621712010-04-24 17:59:49 +00006503$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006504
6505
6506cat >>confdefs.h <<_ACEOF
6507#define uint32_t $ac_cv_c_uint32_t
6508_ACEOF
6509;;
6510 esac
6511
Matthias Kloseb9621712010-04-24 17:59:49 +00006512ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6513case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006514 no|yes) ;; #(
6515 *)
6516
Matthias Kloseb9621712010-04-24 17:59:49 +00006517$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006518
6519
6520cat >>confdefs.h <<_ACEOF
6521#define uint64_t $ac_cv_c_uint64_t
6522_ACEOF
6523;;
6524 esac
6525
Matthias Kloseb9621712010-04-24 17:59:49 +00006526ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6527case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006528 no|yes) ;; #(
6529 *)
6530
6531cat >>confdefs.h <<_ACEOF
6532#define int32_t $ac_cv_c_int32_t
6533_ACEOF
6534;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006535esac
6536
Matthias Kloseb9621712010-04-24 17:59:49 +00006537ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6538case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006539 no|yes) ;; #(
6540 *)
6541
6542cat >>confdefs.h <<_ACEOF
6543#define int64_t $ac_cv_c_int64_t
6544_ACEOF
6545;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006546esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006547
Matthias Kloseb9621712010-04-24 17:59:49 +00006548ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006549if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006550
Matthias Kloseb9621712010-04-24 17:59:49 +00006551$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006552
6553fi
6554
Jack Jansendd19cf82001-12-06 22:36:17 +00006555
Michael W. Hudson54241132001-12-07 15:38:26 +00006556# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006557# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006558# The cast to long int works around a bug in the HP C Compiler
6559# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6560# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6561# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6563$as_echo_n "checking size of int... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006564if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006565 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006566else
Matthias Kloseb9621712010-04-24 17:59:49 +00006567 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 +00006568
Martin v. Löwis11437992002-04-12 09:54:03 +00006569else
Matthias Kloseb9621712010-04-24 17:59:49 +00006570 if test "$ac_cv_type_int" = yes; then
6571 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6572$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00006573{ as_fn_set_status 77
6574as_fn_error "cannot compute sizeof (int)
6575See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006576 else
6577 ac_cv_sizeof_int=0
6578 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006580
Martin v. Löwis11437992002-04-12 09:54:03 +00006581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6583$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006584
6585
6586
Martin v. Löwis11437992002-04-12 09:54:03 +00006587cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006588#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006589_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006590
6591
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006592# The cast to long int works around a bug in the HP C Compiler
6593# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6594# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6595# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6597$as_echo_n "checking size of long... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006598if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006599 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006600else
Matthias Kloseb9621712010-04-24 17:59:49 +00006601 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 +00006602
Martin v. Löwis11437992002-04-12 09:54:03 +00006603else
Matthias Kloseb9621712010-04-24 17:59:49 +00006604 if test "$ac_cv_type_long" = yes; then
6605 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6606$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00006607{ as_fn_set_status 77
6608as_fn_error "cannot compute sizeof (long)
6609See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006610 else
6611 ac_cv_sizeof_long=0
6612 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006614
Martin v. Löwis11437992002-04-12 09:54:03 +00006615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6617$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006618
6619
6620
Martin v. Löwis11437992002-04-12 09:54:03 +00006621cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006622#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006623_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006624
6625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006626# The cast to long int works around a bug in the HP C Compiler
6627# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6628# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6629# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6631$as_echo_n "checking size of void *... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006632if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006633 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006634else
Matthias Kloseb9621712010-04-24 17:59:49 +00006635 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 +00006636
Martin v. Löwis11437992002-04-12 09:54:03 +00006637else
Matthias Kloseb9621712010-04-24 17:59:49 +00006638 if test "$ac_cv_type_void_p" = yes; then
6639 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6640$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00006641{ as_fn_set_status 77
6642as_fn_error "cannot compute sizeof (void *)
6643See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006644 else
6645 ac_cv_sizeof_void_p=0
6646 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006648
Martin v. Löwis11437992002-04-12 09:54:03 +00006649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6651$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006652
6653
6654
Martin v. Löwis11437992002-04-12 09:54:03 +00006655cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006656#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006657_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006658
6659
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006660# The cast to long int works around a bug in the HP C Compiler
6661# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6662# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6663# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6665$as_echo_n "checking size of short... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006666if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006667 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006668else
Matthias Kloseb9621712010-04-24 17:59:49 +00006669 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 +00006670
Martin v. Löwis11437992002-04-12 09:54:03 +00006671else
Matthias Kloseb9621712010-04-24 17:59:49 +00006672 if test "$ac_cv_type_short" = yes; then
6673 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00006675{ as_fn_set_status 77
6676as_fn_error "cannot compute sizeof (short)
6677See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006678 else
6679 ac_cv_sizeof_short=0
6680 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006682
Martin v. Löwis11437992002-04-12 09:54:03 +00006683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6685$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006686
6687
6688
Martin v. Löwis11437992002-04-12 09:54:03 +00006689cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006690#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006691_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006692
6693
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006694# The cast to long int works around a bug in the HP C Compiler
6695# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6696# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6697# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6699$as_echo_n "checking size of float... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006700if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006701 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006702else
Matthias Kloseb9621712010-04-24 17:59:49 +00006703 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 +00006704
Martin v. Löwis11437992002-04-12 09:54:03 +00006705else
Matthias Kloseb9621712010-04-24 17:59:49 +00006706 if test "$ac_cv_type_float" = yes; then
6707 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00006709{ as_fn_set_status 77
6710as_fn_error "cannot compute sizeof (float)
6711See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006712 else
6713 ac_cv_sizeof_float=0
6714 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006716
Martin v. Löwis11437992002-04-12 09:54:03 +00006717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6719$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006720
6721
6722
Martin v. Löwis11437992002-04-12 09:54:03 +00006723cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006724#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006725_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006726
6727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006728# The cast to long int works around a bug in the HP C Compiler
6729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6731# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6733$as_echo_n "checking size of double... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006734if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006735 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006736else
Matthias Kloseb9621712010-04-24 17:59:49 +00006737 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 +00006738
Martin v. Löwis11437992002-04-12 09:54:03 +00006739else
Matthias Kloseb9621712010-04-24 17:59:49 +00006740 if test "$ac_cv_type_double" = yes; then
6741 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00006743{ as_fn_set_status 77
6744as_fn_error "cannot compute sizeof (double)
6745See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006746 else
6747 ac_cv_sizeof_double=0
6748 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006750
Martin v. Löwis11437992002-04-12 09:54:03 +00006751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6753$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006754
6755
6756
Martin v. Löwis11437992002-04-12 09:54:03 +00006757cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006758#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006759_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006760
6761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006762# The cast to long int works around a bug in the HP C Compiler
6763# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6764# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6765# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6767$as_echo_n "checking size of fpos_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006768if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006769 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006770else
Matthias Kloseb9621712010-04-24 17:59:49 +00006771 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 +00006772
Martin v. Löwis11437992002-04-12 09:54:03 +00006773else
Matthias Kloseb9621712010-04-24 17:59:49 +00006774 if test "$ac_cv_type_fpos_t" = yes; then
6775 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6776$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00006777{ as_fn_set_status 77
6778as_fn_error "cannot compute sizeof (fpos_t)
6779See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006780 else
6781 ac_cv_sizeof_fpos_t=0
6782 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006784
Martin v. Löwis11437992002-04-12 09:54:03 +00006785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6787$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006788
6789
6790
Martin v. Löwis11437992002-04-12 09:54:03 +00006791cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006792#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006793_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006794
Michael W. Hudson54241132001-12-07 15:38:26 +00006795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006796# The cast to long int works around a bug in the HP C Compiler
6797# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6798# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6799# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6801$as_echo_n "checking size of size_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006802if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006803 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006804else
Matthias Kloseb9621712010-04-24 17:59:49 +00006805 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 +00006806
Martin v. Löwis18e16552006-02-15 17:27:45 +00006807else
Matthias Kloseb9621712010-04-24 17:59:49 +00006808 if test "$ac_cv_type_size_t" = yes; then
6809 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6810$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00006811{ as_fn_set_status 77
6812as_fn_error "cannot compute sizeof (size_t)
6813See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006814 else
6815 ac_cv_sizeof_size_t=0
6816 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006818
Martin v. Löwis18e16552006-02-15 17:27:45 +00006819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6821$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006822
6823
6824
Martin v. Löwis18e16552006-02-15 17:27:45 +00006825cat >>confdefs.h <<_ACEOF
6826#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6827_ACEOF
6828
6829
Christian Heimes400adb02008-02-01 08:12:03 +00006830# The cast to long int works around a bug in the HP C Compiler
6831# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6832# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6833# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6835$as_echo_n "checking size of pid_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006836if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006837 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006838else
Matthias Kloseb9621712010-04-24 17:59:49 +00006839 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 +00006840
Christian Heimes400adb02008-02-01 08:12:03 +00006841else
Matthias Kloseb9621712010-04-24 17:59:49 +00006842 if test "$ac_cv_type_pid_t" = yes; then
6843 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6844$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00006845{ as_fn_set_status 77
6846as_fn_error "cannot compute sizeof (pid_t)
6847See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006848 else
6849 ac_cv_sizeof_pid_t=0
6850 fi
6851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006852
Christian Heimes400adb02008-02-01 08:12:03 +00006853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6855$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006856
6857
6858
6859cat >>confdefs.h <<_ACEOF
6860#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6861_ACEOF
6862
6863
Michael W. Hudson54241132001-12-07 15:38:26 +00006864
Matthias Kloseb9621712010-04-24 17:59:49 +00006865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6866$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006867have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006869/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006870
Martin v. Löwis11437992002-04-12 09:54:03 +00006871int
6872main ()
6873{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006874long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006875 ;
6876 return 0;
6877}
6878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006879if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006880
6881
Matthias Kloseb9621712010-04-24 17:59:49 +00006882$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006883
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006884 have_long_long=yes
6885
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6889$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006890if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006891# The cast to long int works around a bug in the HP C Compiler
6892# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6893# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6894# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6896$as_echo_n "checking size of long long... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006897if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006898 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006899else
Matthias Kloseb9621712010-04-24 17:59:49 +00006900 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 +00006901
Martin v. Löwis11437992002-04-12 09:54:03 +00006902else
Matthias Kloseb9621712010-04-24 17:59:49 +00006903 if test "$ac_cv_type_long_long" = yes; then
6904 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6905$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00006906{ as_fn_set_status 77
6907as_fn_error "cannot compute sizeof (long long)
6908See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006909 else
6910 ac_cv_sizeof_long_long=0
6911 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006913
Martin v. Löwis11437992002-04-12 09:54:03 +00006914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6916$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006917
6918
6919
Martin v. Löwis11437992002-04-12 09:54:03 +00006920cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006921#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006922_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006923
Michael W. Hudson54241132001-12-07 15:38:26 +00006924
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006925fi
6926
Matthias Kloseb9621712010-04-24 17:59:49 +00006927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6928$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006929have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006931/* end confdefs.h. */
6932
6933int
6934main ()
6935{
6936long double x; x = (long double)0;
6937 ;
6938 return 0;
6939}
6940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006941if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006942
6943
Matthias Kloseb9621712010-04-24 17:59:49 +00006944$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006945
6946 have_long_double=yes
6947
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006948fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6951$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006952if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006953# The cast to long int works around a bug in the HP C Compiler
6954# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6955# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6956# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6958$as_echo_n "checking size of long double... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006959if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006960 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006961else
Matthias Kloseb9621712010-04-24 17:59:49 +00006962 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 +00006963
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006964else
Matthias Kloseb9621712010-04-24 17:59:49 +00006965 if test "$ac_cv_type_long_double" = yes; then
6966 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00006968{ as_fn_set_status 77
6969as_fn_error "cannot compute sizeof (long double)
6970See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006971 else
6972 ac_cv_sizeof_long_double=0
6973 fi
6974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006975
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6978$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006979
6980
6981
6982cat >>confdefs.h <<_ACEOF
6983#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6984_ACEOF
6985
6986
6987fi
6988
6989
Matthias Kloseb9621712010-04-24 17:59:49 +00006990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6991$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006992have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006994/* end confdefs.h. */
6995
6996int
6997main ()
6998{
6999_Bool x; x = (_Bool)0;
7000 ;
7001 return 0;
7002}
7003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007004if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007005
7006
Matthias Kloseb9621712010-04-24 17:59:49 +00007007$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007008
7009 have_c99_bool=yes
7010
Thomas Woutersb2137042007-02-01 18:02:27 +00007011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7014$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007015if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007016# The cast to long int works around a bug in the HP C Compiler
7017# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7018# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7019# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7021$as_echo_n "checking size of _Bool... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007022if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007023 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007024else
Matthias Kloseb9621712010-04-24 17:59:49 +00007025 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 +00007026
Thomas Woutersb2137042007-02-01 18:02:27 +00007027else
Matthias Kloseb9621712010-04-24 17:59:49 +00007028 if test "$ac_cv_type__Bool" = yes; then
7029 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7030$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00007031{ as_fn_set_status 77
7032as_fn_error "cannot compute sizeof (_Bool)
7033See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007034 else
7035 ac_cv_sizeof__Bool=0
7036 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007038
Thomas Woutersb2137042007-02-01 18:02:27 +00007039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7041$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007042
7043
7044
Thomas Woutersb2137042007-02-01 18:02:27 +00007045cat >>confdefs.h <<_ACEOF
7046#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7047_ACEOF
7048
7049
7050fi
7051
Matthias Kloseb9621712010-04-24 17:59:49 +00007052ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007053 #include <stdint.h>
7054 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007055 #ifdef HAVE_INTTYPES_H
7056 #include <inttypes.h>
7057 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007058"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007059if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007060
7061cat >>confdefs.h <<_ACEOF
7062#define HAVE_UINTPTR_T 1
7063_ACEOF
7064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007065# The cast to long int works around a bug in the HP C Compiler
7066# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7067# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7068# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7070$as_echo_n "checking size of uintptr_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007071if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007072 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007073else
Matthias Kloseb9621712010-04-24 17:59:49 +00007074 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 +00007075
Martin v. Löwis11437992002-04-12 09:54:03 +00007076else
Matthias Kloseb9621712010-04-24 17:59:49 +00007077 if test "$ac_cv_type_uintptr_t" = yes; then
7078 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7079$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00007080{ as_fn_set_status 77
7081as_fn_error "cannot compute sizeof (uintptr_t)
7082See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007083 else
7084 ac_cv_sizeof_uintptr_t=0
7085 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007087
Martin v. Löwis11437992002-04-12 09:54:03 +00007088fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7090$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007091
7092
7093
Martin v. Löwis11437992002-04-12 09:54:03 +00007094cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007095#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007096_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007097
Michael W. Hudson54241132001-12-07 15:38:26 +00007098
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007099fi
7100
Thomas Wouters89f507f2006-12-13 04:49:30 +00007101
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007102# The cast to long int works around a bug in the HP C Compiler
7103# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7104# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7105# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7107$as_echo_n "checking size of off_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007108if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007109 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007110else
Matthias Kloseb9621712010-04-24 17:59:49 +00007111 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007112#ifdef HAVE_SYS_TYPES_H
7113#include <sys/types.h>
7114#endif
7115
Matthias Kloseb9621712010-04-24 17:59:49 +00007116"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007117
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007118else
Matthias Kloseb9621712010-04-24 17:59:49 +00007119 if test "$ac_cv_type_off_t" = yes; then
7120 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7121$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00007122{ as_fn_set_status 77
7123as_fn_error "cannot compute sizeof (off_t)
7124See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007125 else
7126 ac_cv_sizeof_off_t=0
7127 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007129
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7132$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007133
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007134
7135
Martin v. Löwis11437992002-04-12 09:54:03 +00007136cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007137#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007138_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007139
Michael W. Hudson54241132001-12-07 15:38:26 +00007140
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007141
Matthias Kloseb9621712010-04-24 17:59:49 +00007142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7143$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007144if test "$have_long_long" = yes
7145then
7146if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007147 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007148
Matthias Kloseb9621712010-04-24 17:59:49 +00007149$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007150
Matthias Kloseb9621712010-04-24 17:59:49 +00007151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7152$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007153else
Matthias Kloseb9621712010-04-24 17:59:49 +00007154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7155$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007156fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007157else
Matthias Kloseb9621712010-04-24 17:59:49 +00007158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7159$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007160fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007161
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007162# The cast to long int works around a bug in the HP C Compiler
7163# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7164# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7165# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7167$as_echo_n "checking size of time_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007168if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007169 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007170else
Matthias Kloseb9621712010-04-24 17:59:49 +00007171 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007172#ifdef HAVE_SYS_TYPES_H
7173#include <sys/types.h>
7174#endif
7175#ifdef HAVE_TIME_H
7176#include <time.h>
7177#endif
7178
Matthias Kloseb9621712010-04-24 17:59:49 +00007179"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007180
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007181else
Matthias Kloseb9621712010-04-24 17:59:49 +00007182 if test "$ac_cv_type_time_t" = yes; then
7183 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7184$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00007185{ as_fn_set_status 77
7186as_fn_error "cannot compute sizeof (time_t)
7187See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007188 else
7189 ac_cv_sizeof_time_t=0
7190 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007192
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7195$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007196
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007197
7198
Martin v. Löwis11437992002-04-12 09:54:03 +00007199cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007200#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007201_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007202
Michael W. Hudson54241132001-12-07 15:38:26 +00007203
7204
Trent Mick635f6fb2000-08-23 21:33:05 +00007205# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007206ac_save_cc="$CC"
7207if test "$ac_cv_kpthread" = "yes"
7208then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007209elif test "$ac_cv_kthread" = "yes"
7210then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007211elif test "$ac_cv_pthread" = "yes"
7212then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007213fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007214
Matthias Kloseb9621712010-04-24 17:59:49 +00007215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7216$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007217have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007219/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007220
7221 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007222int
7223main ()
7224{
Guido van Rossum12580492000-09-24 16:47:19 +00007225pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007226 ;
7227 return 0;
7228}
Matthias Kloseb159a552010-04-25 21:00:44 +00007229
Martin v. Löwis11437992002-04-12 09:54:03 +00007230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007231if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007232 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7236$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007237if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007238 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007239# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7240# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7241# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7243$as_echo_n "checking size of pthread_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007244if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007245 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007246else
Matthias Kloseb9621712010-04-24 17:59:49 +00007247 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007248#ifdef HAVE_PTHREAD_H
7249#include <pthread.h>
7250#endif
7251
Matthias Kloseb9621712010-04-24 17:59:49 +00007252"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007253
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007254else
Matthias Kloseb9621712010-04-24 17:59:49 +00007255 if test "$ac_cv_type_pthread_t" = yes; then
7256 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7257$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +00007258{ as_fn_set_status 77
7259as_fn_error "cannot compute sizeof (pthread_t)
7260See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007261 else
7262 ac_cv_sizeof_pthread_t=0
7263 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007265
Trent Mick635f6fb2000-08-23 21:33:05 +00007266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7268$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007269
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007270
7271
Martin v. Löwis11437992002-04-12 09:54:03 +00007272cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007273#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007274_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007275
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007276
Trent Mick635f6fb2000-08-23 21:33:05 +00007277fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007278CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007279
Michael W. Hudson54241132001-12-07 15:38:26 +00007280
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007281case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007282 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007283 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7284 ;;
7285 Darwin/*)
7286 OTHER_LIBTOOL_OPT=""
7287 ;;
7288esac
7289
7290
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007291ARCH_RUN_32BIT=""
7292
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007293case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007294 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007295 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7296 if test "${enable_universalsdk}"; then
7297 :
7298 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007299 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007300 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007301 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007302 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007303 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007304 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007305 if test ${gcc_version} '<' 4.0
7306 then
7307 LIBTOOL_CRUFT="-lcc_dynamic"
7308 else
7309 LIBTOOL_CRUFT=""
7310 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007311 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007312 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007313else
Matthias Kloseb9621712010-04-24 17:59:49 +00007314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007315/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007316
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007317 #include <unistd.h>
7318 int main(int argc, char*argv[])
7319 {
7320 if (sizeof(long) == 4) {
7321 return 0;
7322 } else {
7323 return 1;
7324 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007325 }
7326
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007328if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007329 ac_osx_32bit=yes
7330else
Matthias Kloseb9621712010-04-24 17:59:49 +00007331 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007333rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7334 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007335fi
7336
7337
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007338 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007339 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007340 i386)
7341 MACOSX_DEFAULT_ARCH="i386"
7342 ;;
7343 ppc)
7344 MACOSX_DEFAULT_ARCH="ppc"
7345 ;;
7346 *)
Antoine Pitrouc2244582011-01-02 19:34:03 +00007347 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007348 ;;
7349 esac
7350 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007351 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007352 i386)
7353 MACOSX_DEFAULT_ARCH="x86_64"
7354 ;;
7355 ppc)
7356 MACOSX_DEFAULT_ARCH="ppc64"
7357 ;;
7358 *)
Antoine Pitrouc2244582011-01-02 19:34:03 +00007359 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007360 ;;
7361 esac
7362
7363 #ARCH_RUN_32BIT="true"
7364 fi
7365
7366 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007367 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007368 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007369esac
7370
Matthias Kloseb9621712010-04-24 17:59:49 +00007371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7372$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007373if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007374then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007375 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007376 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007377 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007378
Matthias Kloseb9621712010-04-24 17:59:49 +00007379$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007380
Matthias Kloseb9621712010-04-24 17:59:49 +00007381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7382$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007383 if test $enable_shared = "yes"
7384 then
Antoine Pitrouc2244582011-01-02 19:34:03 +00007385 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 +00007386 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007387else
Matthias Kloseb9621712010-04-24 17:59:49 +00007388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7389$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007390fi
7391
Matthias Kloseb9621712010-04-24 17:59:49 +00007392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7393$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007394case $ac_sys_system/$ac_sys_release in
7395 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007396
Matthias Kloseb9621712010-04-24 17:59:49 +00007397$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007398
Matthias Kloseb9621712010-04-24 17:59:49 +00007399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7400$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007401 ;;
7402 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7404$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007405 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007406esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007407
Guido van Rossum0a516c91994-09-12 10:58:40 +00007408# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007409
Michael W. Hudson54241132001-12-07 15:38:26 +00007410
7411
7412
7413
Benjamin Peterson99f03762010-04-11 22:15:28 +00007414
Thomas Wouters477c8d52006-05-27 19:21:47 +00007415
Georg Brandlb1441c72009-01-03 22:33:39 +00007416
Thomas Wouters477c8d52006-05-27 19:21:47 +00007417cat >>confdefs.h <<_ACEOF
7418#define SHLIB_EXT "$SO"
7419_ACEOF
7420
Guido van Rossum0a516c91994-09-12 10:58:40 +00007421# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007422# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007423# (Shared libraries in this instance are shared modules to be loaded into
7424# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7426$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007427if test -z "$LDSHARED"
7428then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007429 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007430 AIX*)
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00007431 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp -L\$(srcdir)"
Guido van Rossumce608b02001-09-28 15:59:38 +00007432 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007433 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007434 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007435 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007436 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007437 if test "$GCC" = "yes" ; then
7438 LDSHARED='$(CC) -shared'
7439 LDCXXSHARED='$(CXX) -shared'
7440 else
7441 LDSHARED='$(CC) -G'
7442 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007443 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007444 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007445 if test "$GCC" = "yes" ; then
7446 LDSHARED='$(CC) -shared'
7447 LDCXXSHARED='$(CXX) -shared'
7448 else
7449 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007450 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007451 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007452 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007453 LDSHARED='$(CC) -bundle'
7454 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007455 if test "$enable_framework" ; then
7456 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007457 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7458 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007459 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007460 else
7461 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007462 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007463 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007464 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007465 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007466 LDSHARED='$(CC) -bundle'
7467 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007468 if test "$enable_framework" ; then
7469 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007470 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7471 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007472 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007473 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007474 # No framework, use the Python app as bundle-loader
7475 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007476 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007477 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007478 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007479 Darwin/*)
7480 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7481 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007482
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007483 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007484 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007485 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007486 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007487 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007488 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7489 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007490 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007491 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007492 LDSHARED='$(CC) -bundle'
7493 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007494 if test "$enable_framework" ; then
7495 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007496 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7497 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007498 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007499 else
7500 # No framework, use the Python app as bundle-loader
7501 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7502 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007503 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007504 fi
7505 fi
7506 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007507 Linux*|GNU*|QNX*)
7508 LDSHARED='$(CC) -shared'
7509 LDCXXSHARED='$(CXX) -shared';;
7510 BSD/OS*/4*)
7511 LDSHARED="gcc -shared"
7512 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007513 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007514 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007515 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007516 LDSHARED='$(CC) -shared'
7517 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007518 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007519 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007520 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007521 OpenBSD*)
7522 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7523 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007524 LDSHARED='$(CC) -shared $(CCSHARED)'
7525 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007526 else
7527 case `uname -r` in
7528 [01].* | 2.[0-7] | 2.[0-7].*)
7529 LDSHARED="ld -Bshareable ${LDFLAGS}"
7530 ;;
7531 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007532 LDSHARED='$(CC) -shared $(CCSHARED)'
7533 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007534 ;;
7535 esac
7536 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007537 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007538 LDSHARED='$(CC) -shared'
7539 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007540 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007541 if test "$GCC" = "yes" ; then
7542 LDSHARED='$(CC) -shared'
7543 LDCXXSHARED='$(CXX) -shared'
7544 else
7545 LDSHARED='$(CC) -G'
7546 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007547 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007548 SCO_SV*)
7549 LDSHARED='$(CC) -Wl,-G,-Bexport'
7550 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7551 CYGWIN*)
7552 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7553 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007554 *) LDSHARED="ld";;
7555 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007556fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7558$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007559LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007560BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007561# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007562# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7564$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007565if test -z "$CCSHARED"
7566then
Guido van Rossum07397971997-04-29 21:49:50 +00007567 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007568 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007569 then CCSHARED="-fPIC";
7570 elif test `uname -p` = sparc;
7571 then CCSHARED="-xcode=pic32";
7572 else CCSHARED="-Kpic";
7573 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007574 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007575 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007576 else CCSHARED="+z";
7577 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007578 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007579 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007580 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007581 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007582 if test "$GCC" = "yes"
7583 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007584 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007585 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007586 SCO_SV*)
7587 if test "$GCC" = "yes"
7588 then CCSHARED="-fPIC"
7589 else CCSHARED="-Kpic -belf"
7590 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007591 IRIX*/6*) case $CC in
7592 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007593 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007594 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007595 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7598$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007599# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007600# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7602$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007603if test -z "$LINKFORSHARED"
7604then
Guido van Rossum07397971997-04-29 21:49:50 +00007605 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007606 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007607 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007608 LINKFORSHARED="-Wl,-E -Wl,+s";;
7609# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007610 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007611 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007612 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007613 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007614 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007615 if test "$enable_framework"
7616 then
Jack Jansenda49e192005-01-07 13:08:22 +00007617 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007618 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007619 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007620 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007621 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007622 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007623 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007624 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7625 then
7626 LINKFORSHARED="-Wl,--export-dynamic"
7627 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007628 SunOS/5*) case $CC in
7629 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007630 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007631 then
7632 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007633 fi;;
7634 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007635 CYGWIN*)
7636 if test $enable_shared = "no"
7637 then
7638 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7639 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007640 QNX*)
7641 # -Wl,-E causes the symbols to be added to the dynamic
7642 # symbol table so that they can be found when a module
7643 # is loaded. -N 2048K causes the stack size to be set
7644 # to 2048 kilobytes so that the stack doesn't overflow
7645 # when running test_compile.py.
7646 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007647 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7650$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007651
Michael W. Hudson54241132001-12-07 15:38:26 +00007652
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007653
Matthias Kloseb9621712010-04-24 17:59:49 +00007654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7655$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007656if test ! "$LIBRARY" = "$LDLIBRARY"
7657then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007658 case $ac_sys_system in
7659 CYGWIN*)
7660 # Cygwin needs CCSHARED when building extension DLLs
7661 # but not when building the interpreter DLL.
7662 CFLAGSFORSHARED='';;
7663 *)
7664 CFLAGSFORSHARED='$(CCSHARED)'
7665 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7668$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007669
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007670# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7671# library (with --enable-shared).
7672# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007673# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7674# if it is not required, since it creates a dependency of the shared library
7675# to LIBS. This, in turn, means that applications linking the shared libpython
7676# don't need to link LIBS explicitly. The default should be only changed
7677# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007678
Matthias Kloseb9621712010-04-24 17:59:49 +00007679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7680$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007681case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007682 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007683 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007684esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7686$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007687
7688
Guido van Rossum627b2d71993-12-24 10:39:16 +00007689# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7691$as_echo_n "checking for dlopen in -ldl... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007692if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007694else
Martin v. Löwis11437992002-04-12 09:54:03 +00007695 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007696LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007700/* Override any GCC internal prototype to avoid an error.
7701 Use char because int might match the return type of a GCC
7702 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007703#ifdef __cplusplus
7704extern "C"
7705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007706char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007707int
7708main ()
7709{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007710return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007711 ;
7712 return 0;
7713}
7714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007715if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007716 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007717else
Matthias Kloseb9621712010-04-24 17:59:49 +00007718 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007720rm -f core conftest.err conftest.$ac_objext \
7721 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007722LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7725$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007726if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007727 cat >>confdefs.h <<_ACEOF
7728#define HAVE_LIBDL 1
7729_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007730
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007731 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007732
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007733fi
7734 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7736$as_echo_n "checking for shl_load in -ldld... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007737if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007738 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007739else
Martin v. Löwis11437992002-04-12 09:54:03 +00007740 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007741LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007744
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007745/* Override any GCC internal prototype to avoid an error.
7746 Use char because int might match the return type of a GCC
7747 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007748#ifdef __cplusplus
7749extern "C"
7750#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007751char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007752int
7753main ()
7754{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007755return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 ;
7757 return 0;
7758}
7759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007760if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007762else
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007765rm -f core conftest.err conftest.$ac_objext \
7766 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007767LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7770$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007771if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007772 cat >>confdefs.h <<_ACEOF
7773#define HAVE_LIBDLD 1
7774_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007775
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007776 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007777
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007778fi
7779 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007780
Georg Brandlb1441c72009-01-03 22:33:39 +00007781# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007782if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7784$as_echo_n "checking for library containing sem_init... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007785if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007786 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007787else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007788 ac_func_search_save_LIBS=$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 sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007799int
7800main ()
7801{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007803 ;
7804 return 0;
7805}
7806_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807for ac_lib in '' pthread rt posix4; do
7808 if test -z "$ac_lib"; then
7809 ac_res="none required"
7810 else
7811 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007812 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007814 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007815 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007817rm -f core conftest.err conftest.$ac_objext \
7818 conftest$ac_exeext
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007819 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007820 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822done
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007823if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007824
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825else
7826 ac_cv_search_sem_init=no
7827fi
7828rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007829LIBS=$ac_func_search_save_LIBS
7830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7832$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007833ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007834if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007836
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007837fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007838 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007839 # posix4 on Solaris 2.6
7840 # pthread (first!) on Linux
7841fi
7842
Martin v. Löwis19d17342003-06-14 21:03:05 +00007843# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7845$as_echo_n "checking for textdomain in -lintl... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007846if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007847 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007848else
7849 ac_check_lib_save_LIBS=$LIBS
7850LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007852/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854/* Override any GCC internal prototype to avoid an error.
7855 Use char because int might match the return type of a GCC
7856 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007857#ifdef __cplusplus
7858extern "C"
7859#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007860char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007861int
7862main ()
7863{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007864return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007865 ;
7866 return 0;
7867}
7868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007869if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007870 ac_cv_lib_intl_textdomain=yes
7871else
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007874rm -f core conftest.err conftest.$ac_objext \
7875 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007876LIBS=$ac_check_lib_save_LIBS
7877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7879$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007880if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007881
Matthias Kloseb9621712010-04-24 17:59:49 +00007882$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007883
Brett Cannonc6d936e2009-06-07 20:09:53 +00007884 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007885fi
7886
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007887
7888# checks for system dependent C++ extensions support
7889case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007890 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7891$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007893/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007894
7895 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007896int
7897main ()
7898{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007899loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007900 ;
7901 return 0;
7902}
Matthias Kloseb159a552010-04-25 21:00:44 +00007903
Martin v. Löwis11437992002-04-12 09:54:03 +00007904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007905if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007906
Matthias Kloseb159a552010-04-25 21:00:44 +00007907
Matthias Kloseb9621712010-04-24 17:59:49 +00007908$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007909
Matthias Kloseb159a552010-04-25 21:00:44 +00007910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007911$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007912
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007913else
Matthias Kloseb159a552010-04-25 21:00:44 +00007914
7915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007916$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007917
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007919rm -f core conftest.err conftest.$ac_objext \
7920 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007921 *) ;;
7922esac
7923
Guido van Rossum70c7f481998-03-26 18:44:10 +00007924# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7926$as_echo_n "checking for t_open in -lnsl... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007927if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007929else
Martin v. Löwis11437992002-04-12 09:54:03 +00007930 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007931LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007934
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007935/* Override any GCC internal prototype to avoid an error.
7936 Use char because int might match the return type of a GCC
7937 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007938#ifdef __cplusplus
7939extern "C"
7940#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007941char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007942int
7943main ()
7944{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007945return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007946 ;
7947 return 0;
7948}
7949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007950if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007951 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007952else
Matthias Kloseb9621712010-04-24 17:59:49 +00007953 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007955rm -f core conftest.err conftest.$ac_objext \
7956 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007957LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7960$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007961if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007962 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007963fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007964 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7966$as_echo_n "checking for socket in -lsocket... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007967if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007969else
Martin v. Löwis11437992002-04-12 09:54:03 +00007970 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007971LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007973/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007974
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007975/* Override any GCC internal prototype to avoid an error.
7976 Use char because int might match the return type of a GCC
7977 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007978#ifdef __cplusplus
7979extern "C"
7980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007981char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007982int
7983main ()
7984{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007985return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007986 ;
7987 return 0;
7988}
7989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007990if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007992else
Matthias Kloseb9621712010-04-24 17:59:49 +00007993 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007995rm -f core conftest.err conftest.$ac_objext \
7996 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007997LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8000$as_echo "$ac_cv_lib_socket_socket" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008001if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008002 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008003fi
8004 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008005
Matthias Kloseb9621712010-04-24 17:59:49 +00008006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8007$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008010if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8013$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008014LIBS="$withval $LIBS"
8015
8016else
Matthias Kloseb9621712010-04-24 17:59:49 +00008017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8018$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019fi
8020
Guido van Rossum7f43da71994-08-01 12:15:30 +00008021
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008022if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008023 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8024set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8026$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008027if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008028 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008029else
8030 case $PKG_CONFIG in
8031 [\\/]* | ?:[\\/]*)
8032 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8033 ;;
8034 *)
8035 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8036for as_dir in $PATH
8037do
8038 IFS=$as_save_IFS
8039 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008040 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008041 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8042 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008043 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008044 break 2
8045 fi
8046done
Matthias Kloseb9621712010-04-24 17:59:49 +00008047 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008048IFS=$as_save_IFS
8049
8050 ;;
8051esac
8052fi
8053PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8054if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8056$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008057else
Matthias Kloseb9621712010-04-24 17:59:49 +00008058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8059$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008060fi
8061
8062
8063fi
8064if test -z "$ac_cv_path_PKG_CONFIG"; then
8065 ac_pt_PKG_CONFIG=$PKG_CONFIG
8066 # Extract the first word of "pkg-config", so it can be a program name with args.
8067set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8069$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008070if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008071 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008072else
8073 case $ac_pt_PKG_CONFIG in
8074 [\\/]* | ?:[\\/]*)
8075 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8076 ;;
8077 *)
8078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8079for as_dir in $PATH
8080do
8081 IFS=$as_save_IFS
8082 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008083 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008084 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8085 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008087 break 2
8088 fi
8089done
Matthias Kloseb9621712010-04-24 17:59:49 +00008090 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008091IFS=$as_save_IFS
8092
8093 ;;
8094esac
8095fi
8096ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8097if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8099$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008100else
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8102$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008103fi
8104
8105 if test "x$ac_pt_PKG_CONFIG" = x; then
8106 PKG_CONFIG=""
8107 else
8108 case $cross_compiling:$ac_tool_warned in
8109yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008110{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8111$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008112ac_tool_warned=yes ;;
8113esac
8114 PKG_CONFIG=$ac_pt_PKG_CONFIG
8115 fi
8116else
8117 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8118fi
8119
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008120
8121# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8123$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008124
8125# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008126if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008127 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008128else
8129 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008130fi
8131
8132
Matthias Kloseb9621712010-04-24 17:59:49 +00008133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8134$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008135
8136# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8138$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008139
8140# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008141if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008142 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008143else
8144 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008145fi
8146
8147
8148if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008149 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8150else
8151 LIBFFI_INCLUDEDIR=""
8152fi
8153
8154
Matthias Kloseb9621712010-04-24 17:59:49 +00008155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8156$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008157
Benjamin Peterson076ed002010-10-31 17:11:02 +00008158# Check for support for loadable sqlite extensions
8159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8160$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8161# Check whether --enable-loadable-sqlite-extensions was given.
8162if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8163 enableval=$enable_loadable_sqlite_extensions;
8164else
8165 enable_loadable_sqlite_extensions="no"
8166fi
8167
8168
8169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8170$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8171
Matthias Klose55708cc2009-04-30 08:06:49 +00008172# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8174$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008175
8176# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008177if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008178 withval=$with_dbmliborder;
8179if test x$with_dbmliborder = xyes
8180then
Antoine Pitrouc2244582011-01-02 19:34:03 +00008181as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008182else
8183 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8184 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8185 then
Antoine Pitrouc2244582011-01-02 19:34:03 +00008186 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008187 fi
8188 done
8189fi
8190fi
8191
Matthias Kloseb9621712010-04-24 17:59:49 +00008192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8193$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008194
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008195# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008196
8197
Matthias Kloseb9621712010-04-24 17:59:49 +00008198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8199$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008201# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008202if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008203 withval=$with_signal_module;
8204fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008205
8206
8207if test -z "$with_signal_module"
8208then with_signal_module="yes"
8209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8211$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008212
8213if test "${with_signal_module}" = "yes"; then
8214 USE_SIGNAL_MODULE=""
8215 SIGNAL_OBJS=""
8216else
8217 USE_SIGNAL_MODULE="#"
8218 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8219fi
8220
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008221# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008222
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008223USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008224
Matthias Kloseb9621712010-04-24 17:59:49 +00008225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8226$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008227
Guido van Rossumec2f0731997-01-22 20:54:01 +00008228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008229# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008230if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008231 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8233$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008234LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008235if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008236 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008237fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008238else
Matthias Kloseb9621712010-04-24 17:59:49 +00008239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8240$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008241fi
8242
Martin v. Löwis11437992002-04-12 09:54:03 +00008243
8244# Templates for things AC_DEFINEd more than once.
8245# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008246
8247
Martin v. Löwis11437992002-04-12 09:54:03 +00008248
8249
Matthias Kloseb9621712010-04-24 17:59:49 +00008250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8251$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008253# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008254if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008255 withval=$with_threads;
8256fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008257
8258
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008259# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008261# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008262if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263 withval=$with_thread; with_threads=$with_thread
8264fi
8265
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008266
8267if test -z "$with_threads"
8268then with_threads="yes"
8269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8271$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008272
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008273
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008274if test "$with_threads" = "no"
8275then
8276 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008277elif test "$ac_cv_pthread_is_default" = yes
8278then
Matthias Kloseb9621712010-04-24 17:59:49 +00008279 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008280
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008281 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008282 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008283
8284 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008285 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008286elif test "$ac_cv_kpthread" = "yes"
8287then
8288 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008289 if test "$ac_cv_cxx_thread" = "yes"; then
8290 CXX="$CXX -Kpthread"
8291 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008292 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008293
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008294 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008295 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008296elif test "$ac_cv_kthread" = "yes"
8297then
8298 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008299 if test "$ac_cv_cxx_thread" = "yes"; then
8300 CXX="$CXX -Kthread"
8301 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008303
8304 posix_threads=yes
8305 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008306elif test "$ac_cv_pthread" = "yes"
8307then
8308 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008309 if test "$ac_cv_cxx_thread" = "yes"; then
8310 CXX="$CXX -pthread"
8311 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008313
8314 posix_threads=yes
8315 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008316else
8317 if test ! -z "$with_threads" -a -d "$with_threads"
8318 then LDFLAGS="$LDFLAGS -L$with_threads"
8319 fi
8320 if test ! -z "$withval" -a -d "$withval"
8321 then LDFLAGS="$LDFLAGS -L$withval"
8322 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008323
8324 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008325 # define _POSIX_THREADS in unistd.h. Some apparently don't
8326 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8328$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008330/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008331
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008332#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008333#ifdef _POSIX_THREADS
8334yes
8335#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008336
8337_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008339 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008340 unistd_defines_pthreads=yes
8341else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008342 unistd_defines_pthreads=no
8343fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008344rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008345
Matthias Kloseb9621712010-04-24 17:59:49 +00008346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8347$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008348
Matthias Kloseb9621712010-04-24 17:59:49 +00008349 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008350
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008352if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008354
Matthias Kloseb9621712010-04-24 17:59:49 +00008355 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008356
Martin v. Löwis11437992002-04-12 09:54:03 +00008357
Matthias Kloseb9621712010-04-24 17:59:49 +00008358$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008359
8360 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008361 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008362else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008363
Matthias Kloseb9621712010-04-24 17:59:49 +00008364 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008365if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008366 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008367
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008369
Martin v. Löwis11437992002-04-12 09:54:03 +00008370
Matthias Kloseb9621712010-04-24 17:59:49 +00008371$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008372
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008373 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008374else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008375
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008376 # Just looking for pthread_create in libpthread is not enough:
8377 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8378 # So we really have to include pthread.h, and then link.
8379 _libs=$LIBS
8380 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8382$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008384/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008385#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008386
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008387void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008388int
8389main ()
8390{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008391
8392pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008393 ;
8394 return 0;
8395}
8396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008397if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008398
Matthias Kloseb9621712010-04-24 17:59:49 +00008399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8400$as_echo "yes" >&6; }
8401 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008402
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008403 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008404 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008405else
Martin v. Löwis11437992002-04-12 09:54:03 +00008406
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008407 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008408 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008409if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008410 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008411
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008412 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008413 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008414else
Guido van Rossumad678af1998-10-02 14:42:15 +00008415
Matthias Kloseb9621712010-04-24 17:59:49 +00008416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8417$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008418if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008420else
Martin v. Löwis11437992002-04-12 09:54:03 +00008421 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008422LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008425
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008426/* Override any GCC internal prototype to avoid an error.
8427 Use char because int might match the return type of a GCC
8428 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008429#ifdef __cplusplus
8430extern "C"
8431#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008432char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008433int
8434main ()
8435{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008436return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008437 ;
8438 return 0;
8439}
8440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008441if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008443else
Matthias Kloseb9621712010-04-24 17:59:49 +00008444 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008445fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008446rm -f core conftest.err conftest.$ac_objext \
8447 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008448LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8451$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008452if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008453 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008454
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008455 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008456 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008457 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008458else
Greg Steinadf63d62000-07-05 10:38:09 +00008459
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8461$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008462if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008464else
Martin v. Löwis11437992002-04-12 09:54:03 +00008465 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008466LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008470/* Override any GCC internal prototype to avoid an error.
8471 Use char because int might match the return type of a GCC
8472 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008473#ifdef __cplusplus
8474extern "C"
8475#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008476char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008477int
8478main ()
8479{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008481 ;
8482 return 0;
8483}
8484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008485if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008486 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008487else
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008490rm -f core conftest.err conftest.$ac_objext \
8491 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008492LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8495$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008496if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008498
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008499 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008500 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008501 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008502else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008503
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8505$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008506if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008507 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008508else
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008510LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008513
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514/* Override any GCC internal prototype to avoid an error.
8515 Use char because int might match the return type of a GCC
8516 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008517#ifdef __cplusplus
8518extern "C"
8519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008520char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008521int
8522main ()
8523{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008524return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008525 ;
8526 return 0;
8527}
8528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008529if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008531else
Matthias Kloseb9621712010-04-24 17:59:49 +00008532 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008534rm -f core conftest.err conftest.$ac_objext \
8535 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008536LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8539$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008540if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008541 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008542
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008543 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008544 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008545 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008546else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008547
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8549$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008550if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008552else
Martin v. Löwis11437992002-04-12 09:54:03 +00008553 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008554LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558/* Override any GCC internal prototype to avoid an error.
8559 Use char because int might match the return type of a GCC
8560 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008561#ifdef __cplusplus
8562extern "C"
8563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008564char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008565int
8566main ()
8567{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008568return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008569 ;
8570 return 0;
8571}
8572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008573if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008574 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008575else
Matthias Kloseb9621712010-04-24 17:59:49 +00008576 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008578rm -f core conftest.err conftest.$ac_objext \
8579 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008580LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8583$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008584if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008585 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008586
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008587 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008588 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008589 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008590else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008591
Martin v. Löwis130fb172001-07-19 11:00:41 +00008592 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008593fi
8594
Guido van Rossum627b2d71993-12-24 10:39:16 +00008595
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008596fi
8597
Guido van Rossum0be3e491997-05-22 20:33:33 +00008598fi
8599
Guido van Rossum49545951997-12-02 19:28:29 +00008600fi
8601
Guido van Rossumb93a8621998-05-07 13:27:32 +00008602fi
8603
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008605rm -f core conftest.err conftest.$ac_objext \
8606 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607fi
8608
Martin v. Löwis11437992002-04-12 09:54:03 +00008609
8610fi
8611
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008612
Michael W. Hudson54241132001-12-07 15:38:26 +00008613
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8615$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008616if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008618else
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008620LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008624/* Override any GCC internal prototype to avoid an error.
8625 Use char because int might match the return type of a GCC
8626 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008627#ifdef __cplusplus
8628extern "C"
8629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008630char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008631int
8632main ()
8633{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008634return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 ;
8636 return 0;
8637}
8638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008639if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008640 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008641else
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008644rm -f core conftest.err conftest.$ac_objext \
8645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008646LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8649$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008650if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008651 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008652
Martin v. Löwis130fb172001-07-19 11:00:41 +00008653 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008654 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008655 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008656fi
8657
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008658
Neal Norwitza978ab02002-11-02 16:58:05 +00008659 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8661$as_echo_n "checking for thr_create in -lthread... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008662if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008664else
Martin v. Löwis11437992002-04-12 09:54:03 +00008665 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008666LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008668/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008669
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670/* Override any GCC internal prototype to avoid an error.
8671 Use char because int might match the return type of a GCC
8672 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008673#ifdef __cplusplus
8674extern "C"
8675#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008676char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008677int
8678main ()
8679{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008681 ;
8682 return 0;
8683}
8684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008685if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008687else
Matthias Kloseb9621712010-04-24 17:59:49 +00008688 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008690rm -f core conftest.err conftest.$ac_objext \
8691 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008692LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8695$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008696if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008698
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008699 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008700 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008701 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008702fi
8703
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008704 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008705
Martin v. Löwis130fb172001-07-19 11:00:41 +00008706 if test "$USE_THREAD_MODULE" != "#"
8707 then
8708 # If the above checks didn't disable threads, (at least) OSF1
8709 # needs this '-threads' argument during linking.
8710 case $ac_sys_system in
8711 OSF1) LDLAST=-threads;;
8712 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008713 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008714fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008715
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008716if test "$posix_threads" = "yes"; then
8717 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008718
Matthias Kloseb9621712010-04-24 17:59:49 +00008719$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008720
8721 fi
8722
8723 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8724 case $ac_sys_system/$ac_sys_release in
8725 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008726$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008727
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008728 ;;
8729 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008730$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008731
8732 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008733 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008734$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008735
8736 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008737 AIX/6)
8738$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8739
8740 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008741 esac
8742
Matthias Kloseb9621712010-04-24 17:59:49 +00008743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8744$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008745 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008747else
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008749 ac_cv_pthread_system_supported=no
8750else
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008752/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008753#include <pthread.h>
8754 void *foo(void *parm) {
8755 return NULL;
8756 }
8757 main() {
8758 pthread_attr_t attr;
8759 pthread_t id;
8760 if (pthread_attr_init(&attr)) exit(-1);
8761 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8762 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8763 exit(0);
8764 }
8765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008766if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008767 ac_cv_pthread_system_supported=yes
8768else
Matthias Kloseb9621712010-04-24 17:59:49 +00008769 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8772 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008773fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008775
Guido van Rossum627b2d71993-12-24 10:39:16 +00008776fi
8777
Matthias Kloseb9621712010-04-24 17:59:49 +00008778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8779$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008780 if test "$ac_cv_pthread_system_supported" = "yes"; then
8781
Matthias Kloseb9621712010-04-24 17:59:49 +00008782$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008783
8784 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 for ac_func in pthread_sigmask
8786do :
8787 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008788if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008789 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008790#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008791_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008792 case $ac_sys_system in
8793 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008794
Matthias Kloseb9621712010-04-24 17:59:49 +00008795$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008796
8797 ;;
8798 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008799fi
8800done
8801
8802fi
8803
8804
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008805# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008806
Matthias Kloseb9621712010-04-24 17:59:49 +00008807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8808$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008809# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008810if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008811 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008812 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8814$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008815 ipv6=no
8816 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008817 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8818$as_echo "yes" >&6; }
8819 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008820
8821 ipv6=yes
8822 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008823 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008824else
Martin v. Löwis11437992002-04-12 09:54:03 +00008825
Matthias Kloseb9621712010-04-24 17:59:49 +00008826 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008827
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8829$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008830 ipv6=no
8831
8832else
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008834/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008835 /* AF_INET6 available check */
8836#include <sys/types.h>
8837#include <sys/socket.h>
8838main()
8839{
8840 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8841 exit(1);
8842 else
8843 exit(0);
8844}
8845
Martin v. Löwis11437992002-04-12 09:54:03 +00008846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008847if ac_fn_c_try_run "$LINENO"; 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: yes" >&5
8850$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008851 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008852
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008853else
Matthias Kloseb159a552010-04-25 21:00:44 +00008854
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8856$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008857 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008858
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8861 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008862fi
8863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008864
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008865if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8867$as_echo_n "checking if RFC2553 API is available... " >&6; }
8868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008869/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008870
8871 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008872#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008873int
8874main ()
8875{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008876struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008877 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008878 ;
8879 return 0;
8880}
Matthias Kloseb159a552010-04-25 21:00:44 +00008881
Martin v. Löwis11437992002-04-12 09:54:03 +00008882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008883if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008884
8885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008886$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008887 ipv6=yes
8888
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008889else
Matthias Kloseb159a552010-04-25 21:00:44 +00008890
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008892$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008893 ipv6=no
8894
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008897fi
8898
8899if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008900 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008901
8902fi
8903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008904fi
8905
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008906
8907ipv6type=unknown
8908ipv6lib=none
8909ipv6trylibc=no
8910
8911if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8913$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008914 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8915 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008916 case $i in
8917 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008919/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008920
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008921#include <netinet/in.h>
8922#ifdef IPV6_INRIA_VERSION
8923yes
8924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008925_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008926if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008927 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008928 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008929fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008930rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008931
8932 ;;
8933 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008935/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008936
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008937#include <netinet/in.h>
8938#ifdef __KAME__
8939yes
8940#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008941_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008942if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008943 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008944 ipv6type=$i;
8945 ipv6lib=inet6
8946 ipv6libdir=/usr/local/v6/lib
8947 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008948fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008949rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008950
8951 ;;
8952 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008954/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008955
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956#include <features.h>
8957#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8958yes
8959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008960_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008961if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008963 ipv6type=$i;
8964 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008965fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008966rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008967
8968 ;;
8969 linux-inet6)
8970 if test -d /usr/inet6; then
8971 ipv6type=$i
8972 ipv6lib=inet6
8973 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008974 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008975 fi
8976 ;;
8977 solaris)
8978 if test -f /etc/netconfig; then
8979 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
8980 ipv6type=$i
8981 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008982 fi
8983 fi
8984 ;;
8985 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008987/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008988
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008989#include <sys/param.h>
8990#ifdef _TOSHIBA_INET6
8991yes
8992#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008993_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008994if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996 ipv6type=$i;
8997 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008998 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008999fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009000rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001
9002 ;;
9003 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009005/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009006
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007#include </usr/local/v6/include/sys/v6config.h>
9008#ifdef __V6D__
9009yes
9010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009011_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009012if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009013 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009014 ipv6type=$i;
9015 ipv6lib=v6;
9016 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009017 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009018fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009019rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009020
9021 ;;
9022 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009024/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009025
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009026#include <sys/param.h>
9027#ifdef _ZETA_MINAMI_INET6
9028yes
9029#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009030_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009033 ipv6type=$i;
9034 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009035 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009037rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009038
9039 ;;
9040 esac
9041 if test "$ipv6type" != "unknown"; then
9042 break
9043 fi
9044 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9046$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009047fi
9048
9049if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9050 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9051 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9052 echo "using lib$ipv6lib"
9053 else
9054 if test $ipv6trylibc = "yes"; then
9055 echo "using libc"
9056 else
9057 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9058 echo "You need to fetch lib$ipv6lib.a from appropriate"
9059 echo 'ipv6 kit and compile beforehand.'
9060 exit 1
9061 fi
9062 fi
9063fi
9064
Matthias Kloseb9621712010-04-24 17:59:49 +00009065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9066$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009068/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009069
9070 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009071int
9072main ()
9073{
9074FSIORefNum fRef = 0
9075 ;
9076 return 0;
9077}
Matthias Kloseb159a552010-04-25 21:00:44 +00009078
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009080if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009081
Matthias Kloseb159a552010-04-25 21:00:44 +00009082
Matthias Kloseb9621712010-04-24 17:59:49 +00009083$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009084
Matthias Kloseb9621712010-04-24 17:59:49 +00009085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9086$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009087
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009088else
Matthias Kloseb159a552010-04-25 21:00:44 +00009089
Matthias Kloseb9621712010-04-24 17:59:49 +00009090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9091$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009092
9093fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9095
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009096# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9098$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009099
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009100# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009101if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009102 withval=$with_doc_strings;
9103fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009104
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009105
9106if test -z "$with_doc_strings"
9107then with_doc_strings="yes"
9108fi
9109if test "$with_doc_strings" != "no"
9110then
9111
Matthias Kloseb9621712010-04-24 17:59:49 +00009112$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009113
9114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9116$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009117
Antoine Pitrou042b1282010-08-13 21:15:58 +00009118# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9120$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009122# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009123if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009124 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009125if test "$withval" != no
9126then
9127
Matthias Kloseb9621712010-04-24 17:59:49 +00009128$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009129
Matthias Kloseb9621712010-04-24 17:59:49 +00009130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9131$as_echo "yes" >&6; }
9132else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9133$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009134fi
9135else
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9137$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009138fi
9139
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009140
9141# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9143$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009144
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009145# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009146if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009147 withval=$with_pymalloc;
9148fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009149
Neil Schemenauera35c6882001-02-27 04:45:05 +00009150
Neil Schemenauer16c22972002-03-22 15:34:49 +00009151if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009152then
9153 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009154 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009155fi
9156if test "$with_pymalloc" != "no"
9157then
Martin v. Löwis11437992002-04-12 09:54:03 +00009158
Matthias Kloseb9621712010-04-24 17:59:49 +00009159$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009160
9161fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9163$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009164
Benjamin Peterson05159c42009-12-03 03:01:27 +00009165# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9167$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009168
9169# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009170if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009171 withval=$with_valgrind;
9172else
9173 with_valgrind=no
9174fi
9175
Matthias Kloseb9621712010-04-24 17:59:49 +00009176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9177$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009178if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009179 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009180if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009181
Matthias Kloseb9621712010-04-24 17:59:49 +00009182$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009183
9184else
Antoine Pitrouc2244582011-01-02 19:34:03 +00009185 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009186
9187fi
9188
9189
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009190 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009191fi
9192
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009193# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009194
Guido van Rossum98935bf2001-09-05 19:13:16 +00009195DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009196
Guido van Rossume97ee181999-12-20 21:27:22 +00009197# the dlopen() function means we might want to use dynload_shlib.o. some
9198# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009199for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009200do :
9201 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009202if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009203 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009204#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009205_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009206
Guido van Rossume97ee181999-12-20 21:27:22 +00009207fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009208done
Guido van Rossume97ee181999-12-20 21:27:22 +00009209
Michael W. Hudson54241132001-12-07 15:38:26 +00009210
Guido van Rossume97ee181999-12-20 21:27:22 +00009211# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9212# loading of modules.
9213
Matthias Kloseb9621712010-04-24 17:59:49 +00009214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9215$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009216if test -z "$DYNLOADFILE"
9217then
9218 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009219 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9220 if test "$ac_cv_func_dlopen" = yes
9221 then DYNLOADFILE="dynload_shlib.o"
9222 else DYNLOADFILE="dynload_aix.o"
9223 fi
9224 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009225 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009226 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9227 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009228 *)
9229 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9230 # out any dynamic loading
9231 if test "$ac_cv_func_dlopen" = yes
9232 then DYNLOADFILE="dynload_shlib.o"
9233 else DYNLOADFILE="dynload_stub.o"
9234 fi
9235 ;;
9236 esac
9237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9239$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009240if test "$DYNLOADFILE" != "dynload_stub.o"
9241then
Martin v. Löwis11437992002-04-12 09:54:03 +00009242
Matthias Kloseb9621712010-04-24 17:59:49 +00009243$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009244
9245fi
9246
Neil Schemenauer4e425612001-06-19 15:44:15 +00009247# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9248
Michael W. Hudson54241132001-12-07 15:38:26 +00009249
Matthias Kloseb9621712010-04-24 17:59:49 +00009250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9251$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009252if test -z "$MACHDEP_OBJS"
9253then
Jack Jansene578a632001-08-15 01:27:14 +00009254 MACHDEP_OBJS=$extra_machdep_objs
9255else
9256 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9259$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009260
Guido van Rossum627b2d71993-12-24 10:39:16 +00009261# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009262for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009263 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009264 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009265 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009266 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009267 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009268 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009269 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9270 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009271 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009272 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009273 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009274 truncate uname unsetenv utimes waitpid wait3 wait4 \
9275 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009276do :
9277 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9278ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Antoine Pitrouc2244582011-01-02 19:34:03 +00009279eval as_val=\$$as_ac_var
9280 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009281 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009282#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009283_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009284
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009285fi
9286done
9287
Michael W. Hudson54241132001-12-07 15:38:26 +00009288
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009289# For some functions, having a definition is not sufficient, since
9290# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9292$as_echo_n "checking for chroot... " >&6; }
9293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009294/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009295#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009296int
9297main ()
9298{
9299void *x=chroot
9300 ;
9301 return 0;
9302}
9303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009304if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009305
Matthias Kloseb9621712010-04-24 17:59:49 +00009306$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009307
Matthias Kloseb159a552010-04-25 21:00:44 +00009308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009309$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009310else
Matthias Kloseb9621712010-04-24 17:59:49 +00009311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9312$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009313
9314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9317$as_echo_n "checking for link... " >&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=link
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_LINK 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 symlink" >&5
9342$as_echo_n "checking for symlink... " >&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=symlink
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_SYMLINK 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 fchdir" >&5
9367$as_echo_n "checking for fchdir... " >&6; }
9368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009369/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009370#include <unistd.h>
9371int
9372main ()
9373{
9374void *x=fchdir
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öwisa64988c2003-09-20 15:30:20 +00009380
Matthias Kloseb9621712010-04-24 17:59:49 +00009381$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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 fsync" >&5
9392$as_echo_n "checking for fsync... " >&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=fsync
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_FSYNC 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 fdatasync" >&5
9417$as_echo_n "checking for fdatasync... " >&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=fdatasync
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_FDATASYNC 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 epoll" >&5
9442$as_echo_n "checking for epoll... " >&6; }
9443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009444/* end confdefs.h. */
9445#include <sys/epoll.h>
9446int
9447main ()
9448{
9449void *x=epoll_create
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öwisc8ad7cc2002-11-11 13:23:45 +00009455
Matthias Kloseb9621712010-04-24 17:59:49 +00009456$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +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; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009460else
Matthias Kloseb9621712010-04-24 17:59:49 +00009461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9462$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009463
9464fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +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 kqueue" >&5
9467$as_echo_n "checking for kqueue... " >&6; }
9468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009469/* end confdefs.h. */
9470
9471#include <sys/types.h>
9472#include <sys/event.h>
9473
9474int
9475main ()
9476{
9477int x=kqueue()
9478 ;
9479 return 0;
9480}
9481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009482if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009483
Matthias Kloseb9621712010-04-24 17:59:49 +00009484$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009485
Matthias Kloseb159a552010-04-25 21:00:44 +00009486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009487$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009488else
Matthias Kloseb9621712010-04-24 17:59:49 +00009489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9490$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009491
9492fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009494# On some systems (eg. FreeBSD 5), we would find a definition of the
9495# functions ctermid_r, setgroups in the library, but no prototype
9496# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9497# address to avoid compiler warnings and potential miscompilations
9498# because of the missing prototypes.
9499
Matthias Kloseb9621712010-04-24 17:59:49 +00009500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9501$as_echo_n "checking for ctermid_r... " >&6; }
9502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009503/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009504
Martin v. Löwisd5843682002-11-21 20:41:28 +00009505#include <stdio.h>
9506
Martin v. Löwisd5843682002-11-21 20:41:28 +00009507int
9508main ()
9509{
9510void* p = ctermid_r
9511 ;
9512 return 0;
9513}
9514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009515if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009516
Matthias Kloseb9621712010-04-24 17:59:49 +00009517$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009518
Matthias Kloseb159a552010-04-25 21:00:44 +00009519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009520$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009521else
Matthias Kloseb9621712010-04-24 17:59:49 +00009522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9523$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009524
9525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9527
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9529$as_echo_n "checking for flock declaration... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009530if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009531 $as_echo_n "(cached) " >&6
9532else
9533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009534/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009535#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009536int
9537main ()
9538{
9539void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009540
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009541 ;
9542 return 0;
9543}
9544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009545if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009546 ac_cv_flock_decl=yes
9547else
9548 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009549
9550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009552
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009553fi
9554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9555$as_echo "$ac_cv_flock_decl" >&6; }
9556if test "x${ac_cv_flock_decl}" = xyes; then
9557 for ac_func in flock
9558do :
9559 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009560if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009561 cat >>confdefs.h <<_ACEOF
9562#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009563_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009564
Antoine Pitroua3000072010-09-07 14:52:42 +00009565else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009567$as_echo_n "checking for flock in -lbsd... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009568if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009569 $as_echo_n "(cached) " >&6
9570else
9571 ac_check_lib_save_LIBS=$LIBS
9572LIBS="-lbsd $LIBS"
9573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9574/* end confdefs.h. */
9575
9576/* Override any GCC internal prototype to avoid an error.
9577 Use char because int might match the return type of a GCC
9578 builtin and then its argument prototype would still apply. */
9579#ifdef __cplusplus
9580extern "C"
9581#endif
9582char flock ();
9583int
9584main ()
9585{
9586return flock ();
9587 ;
9588 return 0;
9589}
9590_ACEOF
9591if ac_fn_c_try_link "$LINENO"; then :
9592 ac_cv_lib_bsd_flock=yes
9593else
9594 ac_cv_lib_bsd_flock=no
9595fi
9596rm -f core conftest.err conftest.$ac_objext \
9597 conftest$ac_exeext conftest.$ac_ext
9598LIBS=$ac_check_lib_save_LIBS
9599fi
9600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9601$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009602if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009603 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009604
9605
9606$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9607
9608
9609fi
9610
9611
9612fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009613done
9614
Antoine Pitroua3000072010-09-07 14:52:42 +00009615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616
Matthias Kloseb9621712010-04-24 17:59:49 +00009617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9618$as_echo_n "checking for getpagesize... " >&6; }
9619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009620/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009621
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009622#include <unistd.h>
9623
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009624int
9625main ()
9626{
9627void* p = getpagesize
9628 ;
9629 return 0;
9630}
9631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009632if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009633
Matthias Kloseb9621712010-04-24 17:59:49 +00009634$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009635
Matthias Kloseb159a552010-04-25 21:00:44 +00009636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009637$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009638else
Matthias Kloseb9621712010-04-24 17:59:49 +00009639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9640$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009641
9642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009644
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009645for ac_prog in true
9646do
9647 # Extract the first word of "$ac_prog", so it can be a program name with args.
9648set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9650$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009651if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009652 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009653else
9654 if test -n "$TRUE"; then
9655 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9656else
9657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9658for as_dir in $PATH
9659do
9660 IFS=$as_save_IFS
9661 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009662 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009663 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 +00009664 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009665 $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 +00009666 break 2
9667 fi
9668done
Matthias Kloseb9621712010-04-24 17:59:49 +00009669 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009670IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009671
9672fi
9673fi
9674TRUE=$ac_cv_prog_TRUE
9675if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9677$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009678else
Matthias Kloseb9621712010-04-24 17:59:49 +00009679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9680$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009681fi
9682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009683
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009684 test -n "$TRUE" && break
9685done
9686test -n "$TRUE" || TRUE="/bin/true"
9687
9688
Matthias Kloseb9621712010-04-24 17:59:49 +00009689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9690$as_echo_n "checking for inet_aton in -lc... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009691if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009692 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009693else
9694 ac_check_lib_save_LIBS=$LIBS
9695LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009697/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009699/* Override any GCC internal prototype to avoid an error.
9700 Use char because int might match the return type of a GCC
9701 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009702#ifdef __cplusplus
9703extern "C"
9704#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009705char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009706int
9707main ()
9708{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009709return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009710 ;
9711 return 0;
9712}
9713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009714if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009715 ac_cv_lib_c_inet_aton=yes
9716else
Matthias Kloseb9621712010-04-24 17:59:49 +00009717 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009719rm -f core conftest.err conftest.$ac_objext \
9720 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009721LIBS=$ac_check_lib_save_LIBS
9722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9724$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009725if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009726 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009727else
Matthias Kloseb9621712010-04-24 17:59:49 +00009728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9729$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009730if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009731 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009732else
9733 ac_check_lib_save_LIBS=$LIBS
9734LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009736/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009738/* Override any GCC internal prototype to avoid an error.
9739 Use char because int might match the return type of a GCC
9740 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009741#ifdef __cplusplus
9742extern "C"
9743#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009744char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009745int
9746main ()
9747{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009748return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009749 ;
9750 return 0;
9751}
9752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009753if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009754 ac_cv_lib_resolv_inet_aton=yes
9755else
Matthias Kloseb9621712010-04-24 17:59:49 +00009756 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009758rm -f core conftest.err conftest.$ac_objext \
9759 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009760LIBS=$ac_check_lib_save_LIBS
9761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9763$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009764if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009765 cat >>confdefs.h <<_ACEOF
9766#define HAVE_LIBRESOLV 1
9767_ACEOF
9768
9769 LIBS="-lresolv $LIBS"
9770
9771fi
9772
9773
9774fi
9775
9776
Christian Heimesd0764e22007-12-04 15:00:33 +00009777# On Tru64, chflags seems to be present, but calling it will
9778# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9780$as_echo_n "checking for chflags... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009781if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009782 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009783else
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009785 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009786else
Matthias Kloseb9621712010-04-24 17:59:49 +00009787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009788/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009789[
Christian Heimesd0764e22007-12-04 15:00:33 +00009790#include <sys/stat.h>
9791#include <unistd.h>
9792int main(int argc, char*argv[])
9793{
9794 if(chflags(argv[0], 0) != 0)
9795 return 1;
9796 return 0;
9797}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009798]
Christian Heimesd0764e22007-12-04 15:00:33 +00009799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009800if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009801 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009802else
Matthias Kloseb9621712010-04-24 17:59:49 +00009803 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9806 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009807fi
9808
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009809
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9812$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009813if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009814 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009815if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009816 ac_cv_have_chflags="yes"
9817else
9818 ac_cv_have_chflags="no"
9819fi
9820
9821fi
9822if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009823
Matthias Kloseb9621712010-04-24 17:59:49 +00009824$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009825
9826fi
9827
Matthias Kloseb9621712010-04-24 17:59:49 +00009828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9829$as_echo_n "checking for lchflags... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009830if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009831 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009832else
Matthias Kloseb9621712010-04-24 17:59:49 +00009833 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009834 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009835else
Matthias Kloseb9621712010-04-24 17:59:49 +00009836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009837/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009838[
Christian Heimesd0764e22007-12-04 15:00:33 +00009839#include <sys/stat.h>
9840#include <unistd.h>
9841int main(int argc, char*argv[])
9842{
9843 if(lchflags(argv[0], 0) != 0)
9844 return 1;
9845 return 0;
9846}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009847]
Christian Heimesd0764e22007-12-04 15:00:33 +00009848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009849if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009850 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009851else
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9855 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009856fi
9857
9858
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9861$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009862if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009863 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009864if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009865 ac_cv_have_lchflags="yes"
9866else
9867 ac_cv_have_lchflags="no"
9868fi
9869
9870fi
9871if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009872
Matthias Kloseb9621712010-04-24 17:59:49 +00009873$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009874
9875fi
9876
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009877case $ac_sys_system/$ac_sys_release in
9878Darwin/*)
9879 _CUR_CFLAGS="${CFLAGS}"
9880 _CUR_LDFLAGS="${LDFLAGS}"
9881 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9882 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9883 ;;
9884esac
9885
Matthias Kloseb9621712010-04-24 17:59:49 +00009886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9887$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009888if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009889 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009890else
9891 ac_check_lib_save_LIBS=$LIBS
9892LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009894/* end confdefs.h. */
9895
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009896/* Override any GCC internal prototype to avoid an error.
9897 Use char because int might match the return type of a GCC
9898 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009899#ifdef __cplusplus
9900extern "C"
9901#endif
9902char inflateCopy ();
9903int
9904main ()
9905{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009907 ;
9908 return 0;
9909}
9910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009911if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009912 ac_cv_lib_z_inflateCopy=yes
9913else
Matthias Kloseb9621712010-04-24 17:59:49 +00009914 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009916rm -f core conftest.err conftest.$ac_objext \
9917 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009918LIBS=$ac_check_lib_save_LIBS
9919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9921$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009922if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009923
Matthias Kloseb9621712010-04-24 17:59:49 +00009924$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009925
9926fi
9927
9928
9929case $ac_sys_system/$ac_sys_release in
9930Darwin/*)
9931 CFLAGS="${_CUR_CFLAGS}"
9932 LDFLAGS="${_CUR_LDFLAGS}"
9933 ;;
9934esac
9935
Matthias Kloseb9621712010-04-24 17:59:49 +00009936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9937$as_echo_n "checking for hstrerror... " >&6; }
9938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009939/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009940
Martin v. Löwise9416172003-05-03 10:12:45 +00009941#include <netdb.h>
9942
Martin v. Löwise9416172003-05-03 10:12:45 +00009943int
9944main ()
9945{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009946void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009947 ;
9948 return 0;
9949}
9950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009951if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009952
Matthias Kloseb9621712010-04-24 17:59:49 +00009953$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009954
Matthias Kloseb159a552010-04-25 21:00:44 +00009955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009956$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009957else
Matthias Kloseb9621712010-04-24 17:59:49 +00009958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9959$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009960
9961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009962rm -f core conftest.err conftest.$ac_objext \
9963 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009964
Matthias Kloseb9621712010-04-24 17:59:49 +00009965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9966$as_echo_n "checking for inet_aton... " >&6; }
9967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009968/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009969
Martin v. Löwis86d66262006-02-17 08:40:11 +00009970#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009971#include <sys/socket.h>
9972#include <netinet/in.h>
9973#include <arpa/inet.h>
9974
Martin v. Löwise9416172003-05-03 10:12:45 +00009975int
9976main ()
9977{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009978void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009979 ;
9980 return 0;
9981}
9982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009983if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009984
Matthias Kloseb9621712010-04-24 17:59:49 +00009985$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009986
Matthias Kloseb159a552010-04-25 21:00:44 +00009987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009988$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009989else
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9991$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009992
9993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009994rm -f core conftest.err conftest.$ac_objext \
9995 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009996
Matthias Kloseb9621712010-04-24 17:59:49 +00009997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9998$as_echo_n "checking for inet_pton... " >&6; }
9999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010000/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010001
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010002#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010003#include <sys/socket.h>
10004#include <netinet/in.h>
10005#include <arpa/inet.h>
10006
Martin v. Löwise9416172003-05-03 10:12:45 +000010007int
10008main ()
10009{
10010void* p = inet_pton
10011 ;
10012 return 0;
10013}
10014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010015if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010016
Matthias Kloseb9621712010-04-24 17:59:49 +000010017$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010018
Matthias Kloseb159a552010-04-25 21:00:44 +000010019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010020$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010021else
Matthias Kloseb9621712010-04-24 17:59:49 +000010022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10023$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010024
10025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010027
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010028# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10030$as_echo_n "checking for setgroups... " >&6; }
10031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010032/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010033
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010034#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010035#ifdef HAVE_GRP_H
10036#include <grp.h>
10037#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010038
Martin v. Löwisd5843682002-11-21 20:41:28 +000010039int
10040main ()
10041{
10042void* p = setgroups
10043 ;
10044 return 0;
10045}
10046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010047if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010048
Matthias Kloseb9621712010-04-24 17:59:49 +000010049$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010050
Matthias Kloseb159a552010-04-25 21:00:44 +000010051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010052$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010053else
Matthias Kloseb9621712010-04-24 17:59:49 +000010054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10055$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010056
10057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010059
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010060# check for openpty and forkpty
10061
10062for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010063do :
10064 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010065if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010066 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010067#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010068_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010069
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010070else
Matthias Kloseb9621712010-04-24 17:59:49 +000010071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10072$as_echo_n "checking for openpty in -lutil... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010073if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010074 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010075else
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010077LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010081/* Override any GCC internal prototype to avoid an error.
10082 Use char because int might match the return type of a GCC
10083 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010084#ifdef __cplusplus
10085extern "C"
10086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010087char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010088int
10089main ()
10090{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010091return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010092 ;
10093 return 0;
10094}
10095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010096if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010097 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010098else
Matthias Kloseb9621712010-04-24 17:59:49 +000010099 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010101rm -f core conftest.err conftest.$ac_objext \
10102 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010103LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10106$as_echo "$ac_cv_lib_util_openpty" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010107if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010108 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010109 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010110else
Matthias Kloseb9621712010-04-24 17:59:49 +000010111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10112$as_echo_n "checking for openpty in -lbsd... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010113if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010114 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010115else
10116 ac_check_lib_save_LIBS=$LIBS
10117LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010119/* end confdefs.h. */
10120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010121/* Override any GCC internal prototype to avoid an error.
10122 Use char because int might match the return type of a GCC
10123 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010124#ifdef __cplusplus
10125extern "C"
10126#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010127char openpty ();
10128int
10129main ()
10130{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010131return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010132 ;
10133 return 0;
10134}
10135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010136if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010137 ac_cv_lib_bsd_openpty=yes
10138else
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010141rm -f core conftest.err conftest.$ac_objext \
10142 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010143LIBS=$ac_check_lib_save_LIBS
10144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10146$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010147if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010149 LIBS="$LIBS -lbsd"
10150fi
10151
10152
10153fi
10154
Fred Drake8cef4cf2000-06-28 16:40:38 +000010155
10156fi
10157done
10158
10159for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010160do :
10161 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010162if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010163 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010164#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010165_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010166
Fred Drake8cef4cf2000-06-28 16:40:38 +000010167else
Matthias Kloseb9621712010-04-24 17:59:49 +000010168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10169$as_echo_n "checking for forkpty in -lutil... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010170if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010171 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010172else
Martin v. Löwis11437992002-04-12 09:54:03 +000010173 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010174LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178/* Override any GCC internal prototype to avoid an error.
10179 Use char because int might match the return type of a GCC
10180 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010181#ifdef __cplusplus
10182extern "C"
10183#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010184char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010185int
10186main ()
10187{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010188return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010189 ;
10190 return 0;
10191}
10192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010193if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010195else
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010198rm -f core conftest.err conftest.$ac_objext \
10199 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010200LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10203$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010204if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010205 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010206 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010207else
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10209$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010210if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010212else
10213 ac_check_lib_save_LIBS=$LIBS
10214LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010216/* end confdefs.h. */
10217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218/* Override any GCC internal prototype to avoid an error.
10219 Use char because int might match the return type of a GCC
10220 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010221#ifdef __cplusplus
10222extern "C"
10223#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010224char forkpty ();
10225int
10226main ()
10227{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010229 ;
10230 return 0;
10231}
10232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010233if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010234 ac_cv_lib_bsd_forkpty=yes
10235else
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010238rm -f core conftest.err conftest.$ac_objext \
10239 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010240LIBS=$ac_check_lib_save_LIBS
10241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10243$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010244if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010245 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010246 LIBS="$LIBS -lbsd"
10247fi
10248
10249
10250fi
10251
Fred Drake8cef4cf2000-06-28 16:40:38 +000010252
10253fi
10254done
10255
Jack Jansendd19cf82001-12-06 22:36:17 +000010256
Christian Heimesb186d002008-03-18 15:15:01 +000010257# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010258for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010259do :
10260 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010261if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010262 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010263#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010264_ACEOF
10265
10266fi
10267done
10268
10269
Michael W. Hudson54241132001-12-07 15:38:26 +000010270# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010271for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010272do :
10273 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10274ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Antoine Pitrouc2244582011-01-02 19:34:03 +000010275eval as_val=\$$as_ac_var
10276 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010277 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010278#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010279_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010280
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010281fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010282done
10283
Michael W. Hudson54241132001-12-07 15:38:26 +000010284
Antoine Pitrouc2244582011-01-02 19:34:03 +000010285for ac_func in dup2 getcwd strdup
10286do :
10287 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10288ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10289eval as_val=\$$as_ac_var
10290 if test "x$as_val" = x""yes; then :
10291 cat >>confdefs.h <<_ACEOF
10292#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10293_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010294
Martin v. Löwis1142de32002-03-29 16:28:31 +000010295else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010296 case " $LIBOBJS " in
Antoine Pitrouc2244582011-01-02 19:34:03 +000010297 *" $ac_func.$ac_objext "* ) ;;
10298 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010299 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010300esac
10301
Martin v. Löwis1142de32002-03-29 16:28:31 +000010302fi
Antoine Pitrouc2244582011-01-02 19:34:03 +000010303done
Martin v. Löwis1142de32002-03-29 16:28:31 +000010304
10305
10306for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010307do :
10308 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010309if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010310 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010311#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010314/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010315#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010316int
10317main ()
10318{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010319getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010320 ;
10321 return 0;
10322}
10323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010325
Matthias Kloseb9621712010-04-24 17:59:49 +000010326$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010327
Guido van Rossum627b2d71993-12-24 10:39:16 +000010328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010330
Guido van Rossum627b2d71993-12-24 10:39:16 +000010331fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010332done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010333
Jack Jansen150753c2003-03-29 22:07:47 +000010334for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010335do :
10336 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010337if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010338 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010339#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010342/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010343#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010344int
10345main ()
10346{
10347setpgrp(0,0);
10348 ;
10349 return 0;
10350}
10351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010352if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010353
Matthias Kloseb9621712010-04-24 17:59:49 +000010354$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010355
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010358
10359fi
10360done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010361
Thomas Wouters3a584202000-08-05 23:28:51 +000010362for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010363do :
10364 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010365if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010366 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010367#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010370/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010371#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010372int
10373main ()
10374{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010375gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 ;
10377 return 0;
10378}
10379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010380if ac_fn_c_try_compile "$LINENO"; then :
10381
Guido van Rossum627b2d71993-12-24 10:39:16 +000010382else
Skip Montanaro6dead952003-09-25 14:50:04 +000010383
Matthias Kloseb9621712010-04-24 17:59:49 +000010384$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010385
Martin v. Löwis11437992002-04-12 09:54:03 +000010386
Guido van Rossum627b2d71993-12-24 10:39:16 +000010387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010389
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010390fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010391done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010392
Michael W. Hudson54241132001-12-07 15:38:26 +000010393
Matthias Kloseb9621712010-04-24 17:59:49 +000010394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10395$as_echo_n "checking for major... " >&6; }
10396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010397/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010398
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010399#if defined(MAJOR_IN_MKDEV)
10400#include <sys/mkdev.h>
10401#elif defined(MAJOR_IN_SYSMACROS)
10402#include <sys/sysmacros.h>
10403#else
10404#include <sys/types.h>
10405#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010406
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010407int
10408main ()
10409{
10410
10411 makedev(major(0),minor(0));
10412
10413 ;
10414 return 0;
10415}
10416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010417if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010418
10419
Matthias Kloseb9621712010-04-24 17:59:49 +000010420$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010421
Matthias Kloseb9621712010-04-24 17:59:49 +000010422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10423$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010424
10425else
Skip Montanaro6dead952003-09-25 14:50:04 +000010426
Matthias Kloseb9621712010-04-24 17:59:49 +000010427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10428$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010429
10430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010431rm -f core conftest.err conftest.$ac_objext \
10432 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010433
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010434# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010435# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10437$as_echo_n "checking for getaddrinfo... " >&6; }
10438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010439/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010440
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010441#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010442#include <sys/socket.h>
10443#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010444#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010445
Martin v. Löwis11437992002-04-12 09:54:03 +000010446int
10447main ()
10448{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010449getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010450 ;
10451 return 0;
10452}
10453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010454if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010455 have_getaddrinfo=yes
10456else
Matthias Kloseb9621712010-04-24 17:59:49 +000010457 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010459rm -f core conftest.err conftest.$ac_objext \
10460 conftest$ac_exeext conftest.$ac_ext
10461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10462$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010463if test $have_getaddrinfo = yes
10464then
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10466$as_echo_n "checking getaddrinfo bug... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010467 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010468 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010469else
Matthias Kloseb9621712010-04-24 17:59:49 +000010470 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010471 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010472else
Matthias Kloseb9621712010-04-24 17:59:49 +000010473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010474/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010475
10476#include <sys/types.h>
10477#include <netdb.h>
10478#include <string.h>
10479#include <sys/socket.h>
10480#include <netinet/in.h>
10481
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010482int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010483{
10484 int passive, gaierr, inet4 = 0, inet6 = 0;
10485 struct addrinfo hints, *ai, *aitop;
10486 char straddr[INET6_ADDRSTRLEN], strport[16];
10487
10488 for (passive = 0; passive <= 1; passive++) {
10489 memset(&hints, 0, sizeof(hints));
10490 hints.ai_family = AF_UNSPEC;
10491 hints.ai_flags = passive ? AI_PASSIVE : 0;
10492 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010493 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010494 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10495 (void)gai_strerror(gaierr);
10496 goto bad;
10497 }
10498 for (ai = aitop; ai; ai = ai->ai_next) {
10499 if (ai->ai_addr == NULL ||
10500 ai->ai_addrlen == 0 ||
10501 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10502 straddr, sizeof(straddr), strport, sizeof(strport),
10503 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10504 goto bad;
10505 }
10506 switch (ai->ai_family) {
10507 case AF_INET:
10508 if (strcmp(strport, "54321") != 0) {
10509 goto bad;
10510 }
10511 if (passive) {
10512 if (strcmp(straddr, "0.0.0.0") != 0) {
10513 goto bad;
10514 }
10515 } else {
10516 if (strcmp(straddr, "127.0.0.1") != 0) {
10517 goto bad;
10518 }
10519 }
10520 inet4++;
10521 break;
10522 case AF_INET6:
10523 if (strcmp(strport, "54321") != 0) {
10524 goto bad;
10525 }
10526 if (passive) {
10527 if (strcmp(straddr, "::") != 0) {
10528 goto bad;
10529 }
10530 } else {
10531 if (strcmp(straddr, "::1") != 0) {
10532 goto bad;
10533 }
10534 }
10535 inet6++;
10536 break;
10537 case AF_UNSPEC:
10538 goto bad;
10539 break;
10540 default:
10541 /* another family support? */
10542 break;
10543 }
10544 }
10545 }
10546
10547 if (!(inet4 == 0 || inet4 == 2))
10548 goto bad;
10549 if (!(inet6 == 0 || inet6 == 2))
10550 goto bad;
10551
10552 if (aitop)
10553 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010554 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010555
10556 bad:
10557 if (aitop)
10558 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010559 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010560}
10561
Martin v. Löwis11437992002-04-12 09:54:03 +000010562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010563if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010564 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010565else
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010568rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10569 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010571
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010572fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010573
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010575
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10577$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10578
Mark Dickinson2df5d282009-12-31 21:22:50 +000010579if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010580then
10581 if test $ipv6 = yes
10582 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010583 echo 'Fatal: You must get working getaddrinfo() function.'
10584 echo ' or you can specify "--disable-ipv6"'.
10585 exit 1
10586 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010587else
Martin v. Löwis11437992002-04-12 09:54:03 +000010588
Matthias Kloseb9621712010-04-24 17:59:49 +000010589$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010590
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010591fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010592
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010593for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010594do :
10595 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010596if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010597 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010598#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010599_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010600
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010601fi
10602done
10603
Michael W. Hudson54241132001-12-07 15:38:26 +000010604
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010605# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10607$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010608if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010610else
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010612/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010613#include <sys/types.h>
10614#include <sys/time.h>
10615#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010616
Martin v. Löwis11437992002-04-12 09:54:03 +000010617int
10618main ()
10619{
10620if ((struct tm *) 0)
10621return 0;
10622 ;
10623 return 0;
10624}
10625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010626if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010627 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010628else
Matthias Kloseb9621712010-04-24 17:59:49 +000010629 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10634$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010635if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010636
Matthias Kloseb9621712010-04-24 17:59:49 +000010637$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010638
10639fi
10640
Matthias Kloseb9621712010-04-24 17:59:49 +000010641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10642$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010643if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010645else
Matthias Kloseb9621712010-04-24 17:59:49 +000010646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010647/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010648#include <sys/types.h>
10649#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010650
Martin v. Löwis11437992002-04-12 09:54:03 +000010651int
10652main ()
10653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654struct tm tm;
10655 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010656 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010657 ;
10658 return 0;
10659}
10660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010661if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010662 ac_cv_struct_tm=time.h
10663else
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10669$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010670if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010671
Matthias Kloseb9621712010-04-24 17:59:49 +000010672$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010673
10674fi
10675
Matthias Kloseb9621712010-04-24 17:59:49 +000010676ac_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 +000010677#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010678
Matthias Kloseb9621712010-04-24 17:59:49 +000010679"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010680if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010681
10682cat >>confdefs.h <<_ACEOF
10683#define HAVE_STRUCT_TM_TM_ZONE 1
10684_ACEOF
10685
10686
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010687fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010688
Martin v. Löwis11437992002-04-12 09:54:03 +000010689if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10690
Matthias Kloseb9621712010-04-24 17:59:49 +000010691$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010692
10693else
Matthias Kloseb9621712010-04-24 17:59:49 +000010694 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10695"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010696if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010698else
Matthias Kloseb9621712010-04-24 17:59:49 +000010699 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700fi
10701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010702cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010703#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010704_ACEOF
10705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10707$as_echo_n "checking for tzname... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010708if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010710else
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010712/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010713#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010714#if !HAVE_DECL_TZNAME
10715extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010716#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010717
Martin v. Löwis11437992002-04-12 09:54:03 +000010718int
10719main ()
10720{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010721return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010722 ;
10723 return 0;
10724}
10725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010726if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010727 ac_cv_var_tzname=yes
10728else
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010731rm -f core conftest.err conftest.$ac_objext \
10732 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10735$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010736 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010737
Matthias Kloseb9621712010-04-24 17:59:49 +000010738$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010739
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010740 fi
10741fi
10742
Matthias Kloseb9621712010-04-24 17:59:49 +000010743ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010744if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010745
10746cat >>confdefs.h <<_ACEOF
10747#define HAVE_STRUCT_STAT_ST_RDEV 1
10748_ACEOF
10749
10750
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010751fi
10752
Matthias Kloseb9621712010-04-24 17:59:49 +000010753ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010754if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010755
Martin v. Löwis11437992002-04-12 09:54:03 +000010756cat >>confdefs.h <<_ACEOF
10757#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10758_ACEOF
10759
10760
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010761fi
10762
Matthias Kloseb9621712010-04-24 17:59:49 +000010763ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010764if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010765
10766cat >>confdefs.h <<_ACEOF
10767#define HAVE_STRUCT_STAT_ST_FLAGS 1
10768_ACEOF
10769
10770
10771fi
10772
Matthias Kloseb9621712010-04-24 17:59:49 +000010773ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010774if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010775
10776cat >>confdefs.h <<_ACEOF
10777#define HAVE_STRUCT_STAT_ST_GEN 1
10778_ACEOF
10779
10780
10781fi
10782
Matthias Kloseb9621712010-04-24 17:59:49 +000010783ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010784if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010785
10786cat >>confdefs.h <<_ACEOF
10787#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10788_ACEOF
10789
10790
10791fi
10792
Matthias Kloseb9621712010-04-24 17:59:49 +000010793ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010794if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010795
Martin v. Löwis11437992002-04-12 09:54:03 +000010796cat >>confdefs.h <<_ACEOF
10797#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10798_ACEOF
10799
10800
Matthias Kloseb9621712010-04-24 17:59:49 +000010801$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010802
10803else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010804 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010805 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010806 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10807 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010808esac
10809
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010810fi
10811
Michael W. Hudson54241132001-12-07 15:38:26 +000010812
Martin v. Löwis11437992002-04-12 09:54:03 +000010813
Matthias Kloseb9621712010-04-24 17:59:49 +000010814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10815$as_echo_n "checking for time.h that defines altzone... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010816if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010818else
Matthias Kloseb159a552010-04-25 21:00:44 +000010819
Matthias Kloseb9621712010-04-24 17:59:49 +000010820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010821/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010822#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010823int
10824main ()
10825{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010826return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010827 ;
10828 return 0;
10829}
10830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010831if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010832 ac_cv_header_time_altzone=yes
10833else
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010838fi
10839
Matthias Kloseb9621712010-04-24 17:59:49 +000010840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10841$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010842if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010843
Matthias Kloseb9621712010-04-24 17:59:49 +000010844$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010845
10846fi
10847
Guido van Rossumda88dad1995-01-26 00:46:29 +000010848was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10850$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010852/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010853
10854#include <sys/types.h>
10855#include <sys/select.h>
10856#include <sys/time.h>
10857
Martin v. Löwis11437992002-04-12 09:54:03 +000010858int
10859main ()
10860{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010861;
Martin v. Löwis11437992002-04-12 09:54:03 +000010862 ;
10863 return 0;
10864}
10865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010866if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010867
10868
Matthias Kloseb9621712010-04-24 17:59:49 +000010869$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010870
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010871 was_it_defined=yes
10872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10876$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010877
Matthias Kloseb9621712010-04-24 17:59:49 +000010878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10879$as_echo_n "checking for addrinfo... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010880if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010881 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010882else
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010884/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010885#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010886int
10887main ()
10888{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010889struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010890 ;
10891 return 0;
10892}
10893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010894if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010895 ac_cv_struct_addrinfo=yes
10896else
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10900fi
10901
Matthias Kloseb9621712010-04-24 17:59:49 +000010902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10903$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010904if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010905
Matthias Kloseb9621712010-04-24 17:59:49 +000010906$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010907
10908fi
10909
Matthias Kloseb9621712010-04-24 17:59:49 +000010910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10911$as_echo_n "checking for sockaddr_storage... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010912if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010913 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010914else
Matthias Kloseb9621712010-04-24 17:59:49 +000010915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010916/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010917
10918# include <sys/types.h>
10919# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010920int
10921main ()
10922{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010923struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010924 ;
10925 return 0;
10926}
10927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010928if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010929 ac_cv_struct_sockaddr_storage=yes
10930else
Matthias Kloseb9621712010-04-24 17:59:49 +000010931 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10934fi
10935
Matthias Kloseb9621712010-04-24 17:59:49 +000010936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10937$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010938if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010939
Matthias Kloseb9621712010-04-24 17:59:49 +000010940$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010941
10942fi
10943
Guido van Rossum627b2d71993-12-24 10:39:16 +000010944# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010945
Matthias Kloseb9621712010-04-24 17:59:49 +000010946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10947$as_echo_n "checking whether char is unsigned... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010948if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010949 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010950else
Matthias Kloseb9621712010-04-24 17:59:49 +000010951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010953$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010954int
10955main ()
10956{
10957static int test_array [1 - 2 * !(((char) -1) < 0)];
10958test_array [0] = 0
10959
10960 ;
10961 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010962}
Martin v. Löwis11437992002-04-12 09:54:03 +000010963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010964if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010965 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010966else
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10972$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010973if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010974 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010975
10976fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010977
Matthias Kloseb9621712010-04-24 17:59:49 +000010978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10979$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010980if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010981 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010982else
Matthias Kloseb9621712010-04-24 17:59:49 +000010983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010984/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010985
Martin v. Löwis11437992002-04-12 09:54:03 +000010986int
10987main ()
10988{
10989/* FIXME: Include the comments suggested by Paul. */
10990#ifndef __cplusplus
10991 /* Ultrix mips cc rejects this. */
10992 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010994 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995 char const *const *pcpcc;
10996 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010997 /* NEC SVR4.0.2 mips cc rejects this. */
10998 struct point {int x, y;};
10999 static struct point const zero = {0,0};
11000 /* AIX XL C 1.02.0.0 rejects this.
11001 It does not let you subtract one const X* pointer from another in
11002 an arm of an if-expression whose if-part is not a constant
11003 expression */
11004 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011005 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011006 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011007 ++pcpcc;
11008 ppc = (char**) pcpcc;
11009 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011010 { /* SCO 3.2v4 cc rejects this. */
11011 char *t;
11012 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011013
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011015 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011016 }
11017 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11018 int x[] = {25, 17};
11019 const int *foo = &x[0];
11020 ++foo;
11021 }
11022 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11023 typedef const int *iptr;
11024 iptr p = 0;
11025 ++p;
11026 }
11027 { /* AIX XL C 1.02.0.0 rejects this saying
11028 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11029 struct s { int j; const int *ap[3]; };
11030 struct s *b; b->j = 5;
11031 }
11032 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11033 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011034 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011035 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011036 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011037#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011038
Martin v. Löwis11437992002-04-12 09:54:03 +000011039 ;
11040 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011041}
Martin v. Löwis11437992002-04-12 09:54:03 +000011042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011043if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011044 ac_cv_c_const=yes
11045else
Matthias Kloseb9621712010-04-24 17:59:49 +000011046 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11051$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011052if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011053
Matthias Kloseb9621712010-04-24 17:59:49 +000011054$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011055
11056fi
11057
Michael W. Hudson54241132001-12-07 15:38:26 +000011058
Guido van Rossumda88dad1995-01-26 00:46:29 +000011059works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11061$as_echo_n "checking for working volatile... " >&6; }
11062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011063/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011064
Martin v. Löwis11437992002-04-12 09:54:03 +000011065int
11066main ()
11067{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011068volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011069 ;
11070 return 0;
11071}
11072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011073if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011074 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011075else
Skip Montanaro6dead952003-09-25 14:50:04 +000011076
Matthias Kloseb9621712010-04-24 17:59:49 +000011077$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011078
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011079
Guido van Rossum627b2d71993-12-24 10:39:16 +000011080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11083$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011084
Guido van Rossumda88dad1995-01-26 00:46:29 +000011085works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11087$as_echo_n "checking for working signed char... " >&6; }
11088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011089/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011090
Martin v. Löwis11437992002-04-12 09:54:03 +000011091int
11092main ()
11093{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011094signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011095 ;
11096 return 0;
11097}
11098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011099if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011100 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011101else
Skip Montanaro6dead952003-09-25 14:50:04 +000011102
Matthias Kloseb9621712010-04-24 17:59:49 +000011103$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011104
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011105
Guido van Rossum7f43da71994-08-01 12:15:30 +000011106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11109$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011110
Guido van Rossumda88dad1995-01-26 00:46:29 +000011111have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11113$as_echo_n "checking for prototypes... " >&6; }
11114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011115/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011116int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011117int
11118main ()
11119{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011120return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011121 ;
11122 return 0;
11123}
11124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011125if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011126
Matthias Kloseb9621712010-04-24 17:59:49 +000011127$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011128
Matthias Kloseb159a552010-04-25 21:00:44 +000011129 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11133$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011134
Guido van Rossumda88dad1995-01-26 00:46:29 +000011135works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11137$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011139/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011140
11141#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011142int foo(int x, ...) {
11143 va_list va;
11144 va_start(va, x);
11145 va_arg(va, int);
11146 va_arg(va, char *);
11147 va_arg(va, double);
11148 return 0;
11149}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011150
Martin v. Löwis11437992002-04-12 09:54:03 +000011151int
11152main ()
11153{
Guido van Rossum90eea071996-08-30 20:58:57 +000011154return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011155 ;
11156 return 0;
11157}
11158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011159if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011160
11161
Matthias Kloseb9621712010-04-24 17:59:49 +000011162$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011163
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011164 works=yes
11165
Guido van Rossum627b2d71993-12-24 10:39:16 +000011166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11169$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011170
Martin v. Löwisd6320502004-08-12 13:45:08 +000011171# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11173$as_echo_n "checking for socketpair... " >&6; }
11174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011175/* end confdefs.h. */
11176
11177#include <sys/types.h>
11178#include <sys/socket.h>
11179
11180int
11181main ()
11182{
11183void *x=socketpair
11184 ;
11185 return 0;
11186}
11187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011188if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011189
Matthias Kloseb9621712010-04-24 17:59:49 +000011190$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011191
Matthias Kloseb159a552010-04-25 21:00:44 +000011192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011193$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011194else
Matthias Kloseb9621712010-04-24 17:59:49 +000011195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11196$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011197
11198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011200
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011201# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11203$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011205/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011206#include <sys/types.h>
11207#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011208int
11209main ()
11210{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011211struct sockaddr x;
11212x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011213 ;
11214 return 0;
11215}
11216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011217if ac_fn_c_try_compile "$LINENO"; then :
11218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11219$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011220
Matthias Kloseb9621712010-04-24 17:59:49 +000011221$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011222
11223else
Matthias Kloseb9621712010-04-24 17:59:49 +000011224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11225$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011226
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011229
Guido van Rossumda88dad1995-01-26 00:46:29 +000011230va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11232$as_echo_n "checking whether va_list is an array... " >&6; }
11233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011234/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011235
11236#ifdef HAVE_STDARG_PROTOTYPES
11237#include <stdarg.h>
11238#else
11239#include <varargs.h>
11240#endif
11241
Martin v. Löwis11437992002-04-12 09:54:03 +000011242int
11243main ()
11244{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011245va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011246 ;
11247 return 0;
11248}
11249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011250if ac_fn_c_try_compile "$LINENO"; then :
11251
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011252else
Skip Montanaro6dead952003-09-25 14:50:04 +000011253
Martin v. Löwis11437992002-04-12 09:54:03 +000011254
Matthias Kloseb9621712010-04-24 17:59:49 +000011255$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011256
Guido van Rossumda88dad1995-01-26 00:46:29 +000011257 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011258
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11262$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011263
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011264# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011265
11266
Matthias Kloseb9621712010-04-24 17:59:49 +000011267ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011268if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011269
Matthias Kloseb9621712010-04-24 17:59:49 +000011270 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011271
Matthias Kloseb9621712010-04-24 17:59:49 +000011272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11273$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011274 OLD_CFLAGS=$CFLAGS
11275 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011277/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011278
11279# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011280
Martin v. Löwis11437992002-04-12 09:54:03 +000011281int
11282main ()
11283{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011284
11285 char *name;
11286 struct hostent *he, *res;
11287 char buffer[2048];
11288 int buflen = 2048;
11289 int h_errnop;
11290
11291 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011292
11293 ;
11294 return 0;
11295}
11296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011297if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011298
Matthias Kloseb9621712010-04-24 17:59:49 +000011299 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011300
Martin v. Löwis11437992002-04-12 09:54:03 +000011301
Matthias Kloseb9621712010-04-24 17:59:49 +000011302$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011303
Matthias Kloseb9621712010-04-24 17:59:49 +000011304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11305$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011306
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011307else
Skip Montanaro6dead952003-09-25 14:50:04 +000011308
Matthias Kloseb9621712010-04-24 17:59:49 +000011309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11310$as_echo "no" >&6; }
11311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11312$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011314/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011315
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011316# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011317
Martin v. Löwis11437992002-04-12 09:54:03 +000011318int
11319main ()
11320{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011321
11322 char *name;
11323 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011324 char buffer[2048];
11325 int buflen = 2048;
11326 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011327
Matthias Kloseb159a552010-04-25 21:00:44 +000011328 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011329
11330 ;
11331 return 0;
11332}
11333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011334if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011335
Matthias Kloseb9621712010-04-24 17:59:49 +000011336 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011337
Martin v. Löwis11437992002-04-12 09:54:03 +000011338
Matthias Kloseb159a552010-04-25 21:00:44 +000011339$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011340
Matthias Kloseb9621712010-04-24 17:59:49 +000011341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11342$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011343
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011344else
Skip Montanaro6dead952003-09-25 14:50:04 +000011345
Matthias Kloseb9621712010-04-24 17:59:49 +000011346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11347$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11349$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11351/* end confdefs.h. */
11352
11353# include <netdb.h>
11354
11355int
11356main ()
11357{
11358
11359 char *name;
11360 struct hostent *he;
11361 struct hostent_data data;
11362
11363 (void) gethostbyname_r(name, he, &data);
11364
11365 ;
11366 return 0;
11367}
11368_ACEOF
11369if ac_fn_c_try_compile "$LINENO"; then :
11370
11371 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11372
11373
11374$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11375
11376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11377$as_echo "yes" >&6; }
11378
11379else
11380
11381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11382$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011383
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011386
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011389
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011392 CFLAGS=$OLD_CFLAGS
11393
11394else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011395
Matthias Kloseb9621712010-04-24 17:59:49 +000011396 for ac_func in gethostbyname
11397do :
11398 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011399if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011400 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011401#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011402_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011403
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011404fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011405done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011406
Michael W. Hudson54241132001-12-07 15:38:26 +000011407
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011408fi
11409
Michael W. Hudson54241132001-12-07 15:38:26 +000011410
11411
11412
11413
11414
11415
Guido van Rossum627b2d71993-12-24 10:39:16 +000011416# checks for system services
11417# (none yet)
11418
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011419# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011420ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011421if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011422
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011423else
Matthias Kloseb9621712010-04-24 17:59:49 +000011424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11425$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011426if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011427 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011428else
Martin v. Löwis11437992002-04-12 09:54:03 +000011429 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011430LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011432/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011434/* Override any GCC internal prototype to avoid an error.
11435 Use char because int might match the return type of a GCC
11436 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011437#ifdef __cplusplus
11438extern "C"
11439#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011440char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011441int
11442main ()
11443{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011444return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011445 ;
11446 return 0;
11447}
11448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011449if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011450 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011451else
Matthias Kloseb9621712010-04-24 17:59:49 +000011452 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011454rm -f core conftest.err conftest.$ac_objext \
11455 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011456LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11459$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011460if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011461 cat >>confdefs.h <<_ACEOF
11462#define HAVE_LIBIEEE 1
11463_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011464
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011465 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011466
Guido van Rossum627b2d71993-12-24 10:39:16 +000011467fi
11468
Michael W. Hudson54241132001-12-07 15:38:26 +000011469
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011470fi
11471
Michael W. Hudson54241132001-12-07 15:38:26 +000011472
Guido van Rossum7f253911997-05-09 02:42:48 +000011473# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11475$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011477# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011478if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011479 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011480if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011481then
11482
Matthias Kloseb9621712010-04-24 17:59:49 +000011483$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011484
Matthias Kloseb9621712010-04-24 17:59:49 +000011485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11486$as_echo "yes" >&6; }
11487else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11488$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011489fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011490else
Matthias Kloseb9621712010-04-24 17:59:49 +000011491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11492$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011493fi
11494
Guido van Rossum7f253911997-05-09 02:42:48 +000011495
Guido van Rossum7f43da71994-08-01 12:15:30 +000011496# check for --with-libm=...
11497
Guido van Rossum563e7081996-09-10 18:20:48 +000011498case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011499Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011500*) LIBM=-lm
11501esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11503$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011505# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011506if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011508if test "$withval" = no
11509then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11511$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011512elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011513then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11515$as_echo "set LIBM=\"$withval\"" >&6; }
Antoine Pitrouc2244582011-01-02 19:34:03 +000011516else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011517fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011518else
Matthias Kloseb9621712010-04-24 17:59:49 +000011519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11520$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011521fi
11522
Guido van Rossum7f43da71994-08-01 12:15:30 +000011523
11524# check for --with-libc=...
11525
Matthias Kloseb9621712010-04-24 17:59:49 +000011526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11527$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011530if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011531 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011532if test "$withval" = no
11533then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11535$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011536elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011537then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11539$as_echo "set LIBC=\"$withval\"" >&6; }
Antoine Pitrouc2244582011-01-02 19:34:03 +000011540else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011541fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011542else
Matthias Kloseb9621712010-04-24 17:59:49 +000011543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11544$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011545fi
11546
Guido van Rossum7f43da71994-08-01 12:15:30 +000011547
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011548# **************************************************
11549# * Check for various properties of floating point *
11550# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011551
Matthias Kloseb9621712010-04-24 17:59:49 +000011552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11553$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011554if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011555 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011556else
11557
Matthias Kloseb9621712010-04-24 17:59:49 +000011558if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011559 ac_cv_little_endian_double=no
11560else
Matthias Kloseb9621712010-04-24 17:59:49 +000011561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011562/* end confdefs.h. */
11563
11564#include <string.h>
11565int main() {
11566 double x = 9006104071832581.0;
11567 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11568 return 0;
11569 else
11570 return 1;
11571}
11572
11573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011574if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011575 ac_cv_little_endian_double=yes
11576else
Matthias Kloseb9621712010-04-24 17:59:49 +000011577 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011579rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11580 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011581fi
11582
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011583fi
11584
Matthias Kloseb9621712010-04-24 17:59:49 +000011585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11586$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011587if test "$ac_cv_little_endian_double" = yes
11588then
11589
Matthias Kloseb9621712010-04-24 17:59:49 +000011590$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011591
11592fi
11593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11595$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011596if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011597 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011598else
11599
Matthias Kloseb9621712010-04-24 17:59:49 +000011600if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011601 ac_cv_big_endian_double=no
11602else
Matthias Kloseb9621712010-04-24 17:59:49 +000011603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011604/* end confdefs.h. */
11605
11606#include <string.h>
11607int main() {
11608 double x = 9006104071832581.0;
11609 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11610 return 0;
11611 else
11612 return 1;
11613}
11614
11615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011616if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011617 ac_cv_big_endian_double=yes
11618else
Matthias Kloseb9621712010-04-24 17:59:49 +000011619 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011620fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11622 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011623fi
11624
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011625fi
11626
Matthias Kloseb9621712010-04-24 17:59:49 +000011627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11628$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011629if test "$ac_cv_big_endian_double" = yes
11630then
11631
Matthias Kloseb9621712010-04-24 17:59:49 +000011632$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011633
11634fi
11635
11636# Some ARM platforms use a mixed-endian representation for doubles.
11637# While Python doesn't currently have full support for these platforms
11638# (see e.g., issue 1762561), we can at least make sure that float <-> string
11639# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11641$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011642if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011643 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011644else
11645
Matthias Kloseb9621712010-04-24 17:59:49 +000011646if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011647 ac_cv_mixed_endian_double=no
11648else
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011650/* end confdefs.h. */
11651
11652#include <string.h>
11653int main() {
11654 double x = 9006104071832581.0;
11655 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11656 return 0;
11657 else
11658 return 1;
11659}
11660
11661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011662if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011663 ac_cv_mixed_endian_double=yes
11664else
Matthias Kloseb9621712010-04-24 17:59:49 +000011665 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011666fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011667rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11668 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011669fi
11670
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011671fi
11672
Matthias Kloseb9621712010-04-24 17:59:49 +000011673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11674$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011675if test "$ac_cv_mixed_endian_double" = yes
11676then
11677
Matthias Kloseb9621712010-04-24 17:59:49 +000011678$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011679
11680fi
11681
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011682# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011683# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011684# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011685# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011686# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011687# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011688
11689# This inline assembler syntax may also work for suncc and icc,
11690# so we try it on all platforms.
11691
Matthias Kloseb9621712010-04-24 17:59:49 +000011692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11693$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011695/* end confdefs.h. */
11696
11697int
11698main ()
11699{
11700
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011701 unsigned short cw;
11702 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11703 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011704
11705 ;
11706 return 0;
11707}
11708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011709if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011710 have_gcc_asm_for_x87=yes
11711else
Matthias Kloseb9621712010-04-24 17:59:49 +000011712 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011713fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11716$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011717if test "$have_gcc_asm_for_x87" = yes
11718then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719
Matthias Kloseb9621712010-04-24 17:59:49 +000011720$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011721
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011722fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011723
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011724# Detect whether system arithmetic is subject to x87-style double
11725# rounding issues. The result of this test has little meaning on non
11726# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11727# mode is round-to-nearest and double rounding issues are present, and
11728# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11730$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011731# $BASECFLAGS may affect the result
11732ac_save_cc="$CC"
11733CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011734if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011735 ac_cv_x87_double_rounding=no
11736else
Matthias Kloseb9621712010-04-24 17:59:49 +000011737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011738/* end confdefs.h. */
11739
11740#include <stdlib.h>
11741#include <math.h>
11742int main() {
11743 volatile double x, y, z;
11744 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11745 x = 0.99999999999999989; /* 1-2**-53 */
11746 y = 1./x;
11747 if (y != 1.)
11748 exit(0);
11749 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11750 x = 1e16;
11751 y = 2.99999;
11752 z = x + y;
11753 if (z != 1e16+4.)
11754 exit(0);
11755 /* both tests show evidence of double rounding */
11756 exit(1);
11757}
11758
11759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011760if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011761 ac_cv_x87_double_rounding=no
11762else
Matthias Kloseb9621712010-04-24 17:59:49 +000011763 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011764fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11766 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011767fi
11768
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011769CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11771$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011772if test "$ac_cv_x87_double_rounding" = yes
11773then
11774
Matthias Kloseb9621712010-04-24 17:59:49 +000011775$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011776
11777fi
11778
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011779# ************************************
11780# * Check for mathematical functions *
11781# ************************************
11782
11783LIBS_SAVE=$LIBS
11784LIBS="$LIBS $LIBM"
11785
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011786for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11787do :
11788 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11789ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Antoine Pitrouc2244582011-01-02 19:34:03 +000011790eval as_val=\$$as_ac_var
11791 if test "x$as_val" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011792 cat >>confdefs.h <<_ACEOF
11793#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11794_ACEOF
11795
11796fi
11797done
11798
11799for ac_func in hypot lgamma log1p round tgamma
11800do :
11801 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11802ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Antoine Pitrouc2244582011-01-02 19:34:03 +000011803eval as_val=\$$as_ac_var
11804 if test "x$as_val" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011805 cat >>confdefs.h <<_ACEOF
11806#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11807_ACEOF
11808
11809fi
11810done
11811
11812ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11813"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011814if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011815 ac_have_decl=1
11816else
11817 ac_have_decl=0
11818fi
11819
11820cat >>confdefs.h <<_ACEOF
11821#define HAVE_DECL_ISINF $ac_have_decl
11822_ACEOF
11823ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11824"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011825if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011826 ac_have_decl=1
11827else
11828 ac_have_decl=0
11829fi
11830
11831cat >>confdefs.h <<_ACEOF
11832#define HAVE_DECL_ISNAN $ac_have_decl
11833_ACEOF
11834ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11835"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011836if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011837 ac_have_decl=1
11838else
11839 ac_have_decl=0
11840fi
11841
11842cat >>confdefs.h <<_ACEOF
11843#define HAVE_DECL_ISFINITE $ac_have_decl
11844_ACEOF
11845
11846
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011847# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11848# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11850$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011851if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011853else
11854
Matthias Kloseb9621712010-04-24 17:59:49 +000011855if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011856 ac_cv_tanh_preserves_zero_sign=no
11857else
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011859/* end confdefs.h. */
11860
11861#include <math.h>
11862#include <stdlib.h>
11863int main() {
11864 /* return 0 if either negative zeros don't exist
11865 on this platform or if negative zeros exist
11866 and tanh(-0.) == -0. */
11867 if (atan2(0., -1.) == atan2(-0., -1.) ||
11868 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11869 else exit(1);
11870}
11871
11872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011873if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011874 ac_cv_tanh_preserves_zero_sign=yes
11875else
Matthias Kloseb9621712010-04-24 17:59:49 +000011876 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11879 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011880fi
11881
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011882fi
11883
Matthias Kloseb9621712010-04-24 17:59:49 +000011884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11885$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011886if test "$ac_cv_tanh_preserves_zero_sign" = yes
11887then
11888
Matthias Kloseb9621712010-04-24 17:59:49 +000011889$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011890
11891fi
11892
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011893if test "$ac_cv_func_log1p" = yes
11894then
11895 # On some versions of AIX, log1p(-0.) returns 0. instead of
11896 # -0. See issue #9920.
11897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11898$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011899 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011900 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011901else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011902
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011903 if test "$cross_compiling" = yes; then :
11904 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011905else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11907/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011908
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011909 #include <math.h>
11910 #include <stdlib.h>
11911 int main() {
11912 /* Fail if the signs of log1p(-0.) and -0. can be
11913 distinguished. */
11914 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11915 return 0;
11916 else
11917 return 1;
11918 }
11919
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011920_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011921if ac_fn_c_try_run "$LINENO"; then :
11922 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011923else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011924 ac_cv_log1p_drops_zero_sign=yes
11925fi
11926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11927 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011928fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011929
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011930fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011931
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
11933$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
11934fi
11935if test "$ac_cv_log1p_drops_zero_sign" = yes
11936then
11937
11938$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
11939
11940fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011941
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011942LIBS=$LIBS_SAVE
11943
Mark Dickinsona614f042009-11-28 12:48:43 +000011944# For multiprocessing module, check that sem_open
11945# actually works. For FreeBSD versions <= 7.2,
11946# the kernel module that provides POSIX semaphores
11947# isn't loaded by default, so an attempt to call
11948# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11950$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011951if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011952 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011953else
Matthias Kloseb9621712010-04-24 17:59:49 +000011954 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011955 ac_cv_posix_semaphores_enabled=yes
11956else
Matthias Kloseb9621712010-04-24 17:59:49 +000011957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011958/* end confdefs.h. */
11959
11960#include <unistd.h>
11961#include <fcntl.h>
11962#include <stdio.h>
11963#include <semaphore.h>
11964#include <sys/stat.h>
11965
11966int main(void) {
11967 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11968 if (a == SEM_FAILED) {
11969 perror("sem_open");
11970 return 1;
11971 }
11972 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011973 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011974 return 0;
11975}
11976
11977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011978if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011979 ac_cv_posix_semaphores_enabled=yes
11980else
Matthias Kloseb9621712010-04-24 17:59:49 +000011981 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011982fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011983rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11984 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011985fi
11986
11987
Mark Dickinsona614f042009-11-28 12:48:43 +000011988fi
11989
Matthias Kloseb9621712010-04-24 17:59:49 +000011990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11991$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011992if test $ac_cv_posix_semaphores_enabled = no
11993then
11994
Matthias Kloseb9621712010-04-24 17:59:49 +000011995$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011996
11997fi
11998
Mark Dickinson10683072009-04-18 21:18:19 +000011999# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12001$as_echo_n "checking for broken sem_getvalue... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012002if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012003 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012004else
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012006 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012007else
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012009/* end confdefs.h. */
12010
12011#include <unistd.h>
12012#include <fcntl.h>
12013#include <stdio.h>
12014#include <semaphore.h>
12015#include <sys/stat.h>
12016
12017int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012018 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012019 int count;
12020 int res;
12021 if(a==SEM_FAILED){
12022 perror("sem_open");
12023 return 1;
12024
12025 }
12026 res = sem_getvalue(a, &count);
12027 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012028 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012029 return res==-1 ? 1 : 0;
12030}
12031
Mark Dickinson10683072009-04-18 21:18:19 +000012032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012033if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012034 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012035else
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12039 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012040fi
12041
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012042
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012043fi
12044
Matthias Kloseb9621712010-04-24 17:59:49 +000012045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12046$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012047if test $ac_cv_broken_sem_getvalue = yes
12048then
12049
Matthias Kloseb9621712010-04-24 17:59:49 +000012050$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012051
12052fi
12053
Mark Dickinsonbd792642009-03-18 20:06:12 +000012054# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12056$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012057# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012058if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012059 enableval=$enable_big_digits; case $enable_big_digits in
12060yes)
12061 enable_big_digits=30 ;;
12062no)
12063 enable_big_digits=15 ;;
1206415|30)
12065 ;;
12066*)
Antoine Pitrouc2244582011-01-02 19:34:03 +000012067 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 +000012068esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12070$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012071
12072cat >>confdefs.h <<_ACEOF
12073#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12074_ACEOF
12075
12076
12077else
Matthias Kloseb9621712010-04-24 17:59:49 +000012078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12079$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012080fi
12081
12082
Guido van Rossumef2255b2000-03-10 22:30:29 +000012083# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012084ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012085if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012086
12087
Matthias Kloseb9621712010-04-24 17:59:49 +000012088$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012089
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012090 wchar_h="yes"
12091
Guido van Rossumef2255b2000-03-10 22:30:29 +000012092else
Martin v. Löwis11437992002-04-12 09:54:03 +000012093 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012094
12095fi
12096
Michael W. Hudson54241132001-12-07 15:38:26 +000012097
Martin v. Löwis11437992002-04-12 09:54:03 +000012098
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012099# determine wchar_t size
12100if test "$wchar_h" = yes
12101then
Matthias Kloseb9621712010-04-24 17:59:49 +000012102 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012103# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12104# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12105# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12107$as_echo_n "checking size of wchar_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012108if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012110else
Matthias Kloseb9621712010-04-24 17:59:49 +000012111 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12112"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012113
Martin v. Löwis11437992002-04-12 09:54:03 +000012114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 if test "$ac_cv_type_wchar_t" = yes; then
12116 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12117$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouc2244582011-01-02 19:34:03 +000012118{ as_fn_set_status 77
12119as_fn_error "cannot compute sizeof (wchar_t)
12120See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012121 else
12122 ac_cv_sizeof_wchar_t=0
12123 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012125
Martin v. Löwis11437992002-04-12 09:54:03 +000012126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12128$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012129
12130
12131
Martin v. Löwis11437992002-04-12 09:54:03 +000012132cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012133#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012134_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012135
Michael W. Hudson54241132001-12-07 15:38:26 +000012136
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012137fi
12138
Matthias Kloseb9621712010-04-24 17:59:49 +000012139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12140$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012141have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012143/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012144
12145#include <tcl.h>
12146#if TCL_UTF_MAX != 6
12147# error "NOT UCS4_TCL"
12148#endif
12149int
12150main ()
12151{
12152
12153 ;
12154 return 0;
12155}
12156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012157if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012158
12159
Matthias Kloseb9621712010-04-24 17:59:49 +000012160$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012161
12162 have_ucs4_tcl=yes
12163
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12167$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012168
Skip Montanaro6dead952003-09-25 14:50:04 +000012169# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012170if test "$wchar_h" = yes
12171then
12172 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12174$as_echo_n "checking whether wchar_t is signed... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012175 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012177else
12178
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012180 ac_cv_wchar_t_signed=yes
12181else
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012183/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012184
12185 #include <wchar.h>
12186 int main()
12187 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012188 /* Success: exit code 0 */
12189 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012190 }
12191
12192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012193if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012194 ac_cv_wchar_t_signed=yes
12195else
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12199 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012200fi
12201
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012202fi
12203
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12205$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012206fi
12207
Matthias Kloseb9621712010-04-24 17:59:49 +000012208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12209$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012210
12211# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012212if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012213 withval=$with_wide_unicode;
12214if test "$withval" != no
12215then unicode_size="4"
12216else unicode_size="2"
12217fi
12218
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012219else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012220
Georg Brandl52d168a2008-01-07 18:10:24 +000012221case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012222 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012223 *) unicode_size="2" ;;
12224esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012225
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012226fi
12227
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012228
12229
Georg Brandl52d168a2008-01-07 18:10:24 +000012230case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012231 4)
12232 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12233
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012234 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012235 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012236 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012237 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012238esac
12239
Michael W. Hudson54241132001-12-07 15:38:26 +000012240
Martin v. Löwis11437992002-04-12 09:54:03 +000012241
Georg Brandl52d168a2008-01-07 18:10:24 +000012242# wchar_t is only usable if it maps to an unsigned type
12243if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012244 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012245then
12246 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012247
Matthias Kloseb9621712010-04-24 17:59:49 +000012248$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012249
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012251
Georg Brandl52d168a2008-01-07 18:10:24 +000012252elif test "$ac_cv_sizeof_short" = "$unicode_size"
12253then
12254 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012256
Georg Brandl52d168a2008-01-07 18:10:24 +000012257elif test "$ac_cv_sizeof_long" = "$unicode_size"
12258then
12259 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012260 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012261
Georg Brandl52d168a2008-01-07 18:10:24 +000012262else
12263 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12266$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012267
12268# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12270$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012271if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012272 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012273else
Matthias Kloseb9621712010-04-24 17:59:49 +000012274 ac_cv_c_bigendian=unknown
12275 # See if we're dealing with a universal compiler.
12276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12277/* end confdefs.h. */
12278#ifndef __APPLE_CC__
12279 not a universal capable compiler
12280 #endif
12281 typedef int dummy;
12282
Skip Montanaro6dead952003-09-25 14:50:04 +000012283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012284if ac_fn_c_try_compile "$LINENO"; then :
12285
12286 # Check for potential -arch flags. It is not universal unless
12287 # there are at least two -arch flags with different values.
12288 ac_arch=
12289 ac_prev=
12290 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12291 if test -n "$ac_prev"; then
12292 case $ac_word in
12293 i?86 | x86_64 | ppc | ppc64)
12294 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12295 ac_arch=$ac_word
12296 else
12297 ac_cv_c_bigendian=universal
12298 break
12299 fi
12300 ;;
12301 esac
12302 ac_prev=
12303 elif test "x$ac_word" = "x-arch"; then
12304 ac_prev=arch
12305 fi
12306 done
12307fi
12308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12309 if test $ac_cv_c_bigendian = unknown; then
12310 # See if sys/param.h defines the BYTE_ORDER macro.
12311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012312/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012313#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012315
Martin v. Löwis11437992002-04-12 09:54:03 +000012316int
12317main ()
12318{
Matthias Kloseb9621712010-04-24 17:59:49 +000012319#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12320 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12321 && LITTLE_ENDIAN)
12322 bogus endian macros
12323 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012324
12325 ;
12326 return 0;
12327}
12328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012329if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012330 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012332/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012333#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012335
Martin v. Löwis11437992002-04-12 09:54:03 +000012336int
12337main ()
12338{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012339#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012340 not big endian
12341 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012342
12343 ;
12344 return 0;
12345}
12346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012347if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012348 ac_cv_c_bigendian=yes
12349else
Matthias Kloseb9621712010-04-24 17:59:49 +000012350 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012353fi
12354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12355 fi
12356 if test $ac_cv_c_bigendian = unknown; then
12357 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012359/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012360#include <limits.h>
12361
Martin v. Löwis11437992002-04-12 09:54:03 +000012362int
12363main ()
12364{
Matthias Kloseb9621712010-04-24 17:59:49 +000012365#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12366 bogus endian macros
12367 #endif
12368
Martin v. Löwis11437992002-04-12 09:54:03 +000012369 ;
12370 return 0;
12371}
12372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012373if ac_fn_c_try_compile "$LINENO"; then :
12374 # It does; now see whether it defined to _BIG_ENDIAN or not.
12375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12376/* end confdefs.h. */
12377#include <limits.h>
12378
12379int
12380main ()
12381{
12382#ifndef _BIG_ENDIAN
12383 not big endian
12384 #endif
12385
12386 ;
12387 return 0;
12388}
12389_ACEOF
12390if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012391 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012392else
Matthias Kloseb9621712010-04-24 17:59:49 +000012393 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012394fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12396fi
12397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12398 fi
12399 if test $ac_cv_c_bigendian = unknown; then
12400 # Compile a test program.
12401 if test "$cross_compiling" = yes; then :
12402 # Try to guess by grepping values from an object file.
12403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12404/* end confdefs.h. */
12405short int ascii_mm[] =
12406 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12407 short int ascii_ii[] =
12408 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12409 int use_ascii (int i) {
12410 return ascii_mm[i] + ascii_ii[i];
12411 }
12412 short int ebcdic_ii[] =
12413 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12414 short int ebcdic_mm[] =
12415 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12416 int use_ebcdic (int i) {
12417 return ebcdic_mm[i] + ebcdic_ii[i];
12418 }
12419 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012420
Matthias Kloseb9621712010-04-24 17:59:49 +000012421int
12422main ()
12423{
12424return use_ascii (foo) == use_ebcdic (foo);
12425 ;
12426 return 0;
12427}
12428_ACEOF
12429if ac_fn_c_try_compile "$LINENO"; then :
12430 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12431 ac_cv_c_bigendian=yes
12432 fi
12433 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12434 if test "$ac_cv_c_bigendian" = unknown; then
12435 ac_cv_c_bigendian=no
12436 else
12437 # finding both strings is unlikely to happen, but who knows?
12438 ac_cv_c_bigendian=unknown
12439 fi
12440 fi
12441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012443else
Matthias Kloseb9621712010-04-24 17:59:49 +000012444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012445/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012446$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012447int
12448main ()
12449{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012450
Matthias Kloseb9621712010-04-24 17:59:49 +000012451 /* Are we little or big endian? From Harbison&Steele. */
12452 union
12453 {
12454 long int l;
12455 char c[sizeof (long int)];
12456 } u;
12457 u.l = 1;
12458 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012459
12460 ;
12461 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012462}
Martin v. Löwis11437992002-04-12 09:54:03 +000012463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012464if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012465 ac_cv_c_bigendian=no
12466else
Matthias Kloseb9621712010-04-24 17:59:49 +000012467 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012469rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12470 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012472
Matthias Kloseb9621712010-04-24 17:59:49 +000012473 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12476$as_echo "$ac_cv_c_bigendian" >&6; }
12477 case $ac_cv_c_bigendian in #(
12478 yes)
12479 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12480;; #(
12481 no)
12482 ;; #(
12483 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012486
Matthias Kloseb9621712010-04-24 17:59:49 +000012487 ;; #(
12488 *)
Antoine Pitrouc2244582011-01-02 19:34:03 +000012489 as_fn_error "unknown endianness
12490 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012492
Michael W. Hudson54241132001-12-07 15:38:26 +000012493
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012494# ABI version string for Python extension modules. This appears between the
12495# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12496# from the following attributes which affect the ABI of this Python build (in
12497# this order):
12498#
12499# * The Python implementation (always 'cpython-' for us)
12500# * The major and minor version numbers
12501# * --with-pydebug (adds a 'd')
12502# * --with-pymalloc (adds a 'm')
12503# * --with-wide-unicode (adds a 'u')
12504#
12505# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012506# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12507# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012508
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12510$as_echo_n "checking ABIFLAGS... " >&6; }
12511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12512$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12514$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012515SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12517$as_echo "$SOABI" >&6; }
12518
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12520$as_echo_n "checking LDVERSION... " >&6; }
12521LDVERSION='$(VERSION)$(ABIFLAGS)'
12522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12523$as_echo "$LDVERSION" >&6; }
12524
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012525# SO is the extension of shared libraries `(including the dot!)
12526# -- usually .so, .sl on HP-UX, .dll on Cygwin
12527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12528$as_echo_n "checking SO... " >&6; }
12529if test -z "$SO"
12530then
12531 case $ac_sys_system in
12532 hp*|HP*)
12533 case `uname -m` in
12534 ia64) SO=.so;;
12535 *) SO=.sl;;
12536 esac
12537 ;;
12538 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012539 Linux*|GNU*)
12540 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012541 *) SO=.so;;
12542 esac
12543else
12544 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012545 echo
12546 echo '====================================================================='
12547 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012548 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012549 echo '+ Do you really mean to change the extension for shared libraries? +'
12550 echo '+ Continuing in 10 seconds to let you to ponder. +'
12551 echo '+ +'
12552 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012553 sleep 10
12554fi
12555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12556$as_echo "$SO" >&6; }
12557
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012558# Check whether right shifting a negative integer extends the sign bit
12559# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12561$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012562if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012563 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012564else
Martin v. Löwis11437992002-04-12 09:54:03 +000012565
Matthias Kloseb9621712010-04-24 17:59:49 +000012566if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012567 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012568else
Matthias Kloseb9621712010-04-24 17:59:49 +000012569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012570/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012571
12572int main()
12573{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012574 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012575}
12576
Martin v. Löwis11437992002-04-12 09:54:03 +000012577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012578if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012579 ac_cv_rshift_extends_sign=yes
12580else
Matthias Kloseb9621712010-04-24 17:59:49 +000012581 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012583rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12584 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012585fi
12586
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012587fi
12588
Matthias Kloseb9621712010-04-24 17:59:49 +000012589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12590$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012591if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012592then
Martin v. Löwis11437992002-04-12 09:54:03 +000012593
Matthias Kloseb9621712010-04-24 17:59:49 +000012594$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012595
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012596fi
12597
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012598# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12600$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012601if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012602 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012603else
Martin v. Löwis11437992002-04-12 09:54:03 +000012604
Matthias Kloseb9621712010-04-24 17:59:49 +000012605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012606/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012607#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012608int
12609main ()
12610{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012611
12612 FILE *f = fopen("/dev/null", "r");
12613 flockfile(f);
12614 getc_unlocked(f);
12615 funlockfile(f);
12616
Martin v. Löwis11437992002-04-12 09:54:03 +000012617 ;
12618 return 0;
12619}
12620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012621if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012622 ac_cv_have_getc_unlocked=yes
12623else
Matthias Kloseb9621712010-04-24 17:59:49 +000012624 ac_cv_have_getc_unlocked=no
12625fi
12626rm -f core conftest.err conftest.$ac_objext \
12627 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012629
Matthias Kloseb9621712010-04-24 17:59:49 +000012630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12631$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012632if test "$ac_cv_have_getc_unlocked" = yes
12633then
Martin v. Löwis11437992002-04-12 09:54:03 +000012634
Matthias Kloseb9621712010-04-24 17:59:49 +000012635$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012636
12637fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012638
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012639# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012640# save the value of LIBS so we don't actually link Python with readline
12641LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012642
Gregory P. Smith18820942008-09-07 06:24:49 +000012643# On some systems we need to link readline to a termcap compatible
12644# library. NOTE: Keep the precedence of listed libraries synchronised
12645# with setup.py.
12646py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12648$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012649for py_libtermcap in "" ncursesw ncurses curses termcap; do
12650 if test -z "$py_libtermcap"; then
12651 READLINE_LIBS="-lreadline"
12652 else
12653 READLINE_LIBS="-lreadline -l$py_libtermcap"
12654 fi
12655 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012657/* end confdefs.h. */
12658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012659/* Override any GCC internal prototype to avoid an error.
12660 Use char because int might match the return type of a GCC
12661 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012662#ifdef __cplusplus
12663extern "C"
12664#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012665char readline ();
12666int
12667main ()
12668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012669return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012670 ;
12671 return 0;
12672}
12673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012674if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012675 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012677rm -f core conftest.err conftest.$ac_objext \
12678 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012679 if test $py_cv_lib_readline = yes; then
12680 break
12681 fi
12682done
12683# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12684#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012685if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12687$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012688else
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12690$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012691
Matthias Kloseb9621712010-04-24 17:59:49 +000012692$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012693
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012694fi
12695
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012696# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12698$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012699if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012701else
12702 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012703LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012705/* end confdefs.h. */
12706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012707/* Override any GCC internal prototype to avoid an error.
12708 Use char because int might match the return type of a GCC
12709 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012710#ifdef __cplusplus
12711extern "C"
12712#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012713char rl_callback_handler_install ();
12714int
12715main ()
12716{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012717return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012718 ;
12719 return 0;
12720}
12721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012722if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012723 ac_cv_lib_readline_rl_callback_handler_install=yes
12724else
Matthias Kloseb9621712010-04-24 17:59:49 +000012725 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012727rm -f core conftest.err conftest.$ac_objext \
12728 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012729LIBS=$ac_check_lib_save_LIBS
12730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12732$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012733if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012734
Matthias Kloseb9621712010-04-24 17:59:49 +000012735$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012736
12737fi
12738
12739
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012740# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012742/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012743#include <readline/readline.h>
12744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012745if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012746 have_readline=yes
12747else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012748 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012749
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012750fi
Antoine Pitrouc2244582011-01-02 19:34:03 +000012751rm -f conftest.err conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012752if test $have_readline = yes
12753then
Matthias Kloseb9621712010-04-24 17:59:49 +000012754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012755/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012756#include <readline/readline.h>
12757
12758_ACEOF
12759if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012760 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012761
Matthias Kloseb9621712010-04-24 17:59:49 +000012762$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012763
12764fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012765rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012766
Matthias Kloseb9621712010-04-24 17:59:49 +000012767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012768/* end confdefs.h. */
12769#include <readline/readline.h>
12770
12771_ACEOF
12772if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012774
Matthias Kloseb9621712010-04-24 17:59:49 +000012775$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012776
12777fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012778rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012779
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012780fi
12781
Martin v. Löwis0daad592001-09-30 21:09:59 +000012782# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12784$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012785if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012786 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012787else
Martin v. Löwis11437992002-04-12 09:54:03 +000012788 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012789LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012791/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012793/* Override any GCC internal prototype to avoid an error.
12794 Use char because int might match the return type of a GCC
12795 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012796#ifdef __cplusplus
12797extern "C"
12798#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012799char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012800int
12801main ()
12802{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012803return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012804 ;
12805 return 0;
12806}
12807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012808if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012809 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012810else
Matthias Kloseb9621712010-04-24 17:59:49 +000012811 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012813rm -f core conftest.err conftest.$ac_objext \
12814 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012815LIBS=$ac_check_lib_save_LIBS
12816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12818$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012819if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012820
Matthias Kloseb9621712010-04-24 17:59:49 +000012821$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012822
Martin v. Löwis0daad592001-09-30 21:09:59 +000012823fi
12824
Michael W. Hudson54241132001-12-07 15:38:26 +000012825
Thomas Wouters89d996e2007-09-08 17:39:28 +000012826# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12828$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012829if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012830 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012831else
12832 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012833LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012835/* end confdefs.h. */
12836
12837/* Override any GCC internal prototype to avoid an error.
12838 Use char because int might match the return type of a GCC
12839 builtin and then its argument prototype would still apply. */
12840#ifdef __cplusplus
12841extern "C"
12842#endif
12843char rl_completion_display_matches_hook ();
12844int
12845main ()
12846{
12847return rl_completion_display_matches_hook ();
12848 ;
12849 return 0;
12850}
12851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012852if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012853 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12854else
Matthias Kloseb9621712010-04-24 17:59:49 +000012855 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012856fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012857rm -f core conftest.err conftest.$ac_objext \
12858 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012859LIBS=$ac_check_lib_save_LIBS
12860fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12862$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012863if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012864
Matthias Kloseb9621712010-04-24 17:59:49 +000012865$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012866
12867fi
12868
12869
Martin v. Löwis0daad592001-09-30 21:09:59 +000012870# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12872$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012873if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012874 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012875else
Martin v. Löwis11437992002-04-12 09:54:03 +000012876 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012877LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881/* Override any GCC internal prototype to avoid an error.
12882 Use char because int might match the return type of a GCC
12883 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012884#ifdef __cplusplus
12885extern "C"
12886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012887char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012888int
12889main ()
12890{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 ;
12893 return 0;
12894}
12895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012896if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012897 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012898else
Matthias Kloseb9621712010-04-24 17:59:49 +000012899 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012901rm -f core conftest.err conftest.$ac_objext \
12902 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012903LIBS=$ac_check_lib_save_LIBS
12904fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12906$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012907if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012908
Matthias Kloseb9621712010-04-24 17:59:49 +000012909$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012910
Guido van Rossum353ae582001-07-10 16:45:32 +000012911fi
12912
Jack Jansendd19cf82001-12-06 22:36:17 +000012913
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012914# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012916/* end confdefs.h. */
12917#include <readline/readline.h>
12918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012919if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012920 have_readline=yes
12921else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012922 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012923
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012924fi
Antoine Pitrouc2244582011-01-02 19:34:03 +000012925rm -f conftest.err conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012926if test $have_readline = yes
12927then
Matthias Kloseb9621712010-04-24 17:59:49 +000012928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012929/* end confdefs.h. */
12930#include <readline/readline.h>
12931
12932_ACEOF
12933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012934 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012935
Matthias Kloseb9621712010-04-24 17:59:49 +000012936$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012937
12938fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012939rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012940
12941fi
12942
Martin v. Löwis82bca632006-02-10 20:49:30 +000012943# End of readline checks: restore LIBS
12944LIBS=$LIBS_no_readline
12945
Matthias Kloseb9621712010-04-24 17:59:49 +000012946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12947$as_echo_n "checking for broken nice()... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012948if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012949 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012950else
Martin v. Löwis11437992002-04-12 09:54:03 +000012951
Matthias Kloseb9621712010-04-24 17:59:49 +000012952if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012953 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012954else
Matthias Kloseb9621712010-04-24 17:59:49 +000012955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012956/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012957
12958int main()
12959{
12960 int val1 = nice(1);
12961 if (val1 != -1 && val1 == nice(2))
12962 exit(0);
12963 exit(1);
12964}
12965
Martin v. Löwis11437992002-04-12 09:54:03 +000012966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012967if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012968 ac_cv_broken_nice=yes
12969else
Matthias Kloseb9621712010-04-24 17:59:49 +000012970 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12973 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012974fi
12975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012976fi
12977
Matthias Kloseb9621712010-04-24 17:59:49 +000012978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12979$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012980if test "$ac_cv_broken_nice" = yes
12981then
Martin v. Löwis11437992002-04-12 09:54:03 +000012982
Matthias Kloseb9621712010-04-24 17:59:49 +000012983$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012984
12985fi
12986
Matthias Kloseb9621712010-04-24 17:59:49 +000012987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12988$as_echo_n "checking for broken poll()... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012989if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012990 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012991else
Matthias Kloseb9621712010-04-24 17:59:49 +000012992 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012993 ac_cv_broken_poll=no
12994else
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012996/* end confdefs.h. */
12997
12998#include <poll.h>
12999
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013000int main()
13001{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013002 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013003 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013004
13005 close (42);
13006
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013007 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013008 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013009 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013010 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013011 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013012 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013013 return 1;
13014}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013015
13016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013017if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013018 ac_cv_broken_poll=yes
13019else
Matthias Kloseb9621712010-04-24 17:59:49 +000013020 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13023 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013025
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013026fi
13027
Matthias Kloseb9621712010-04-24 17:59:49 +000013028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13029$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013030if test "$ac_cv_broken_poll" = yes
13031then
13032
Matthias Kloseb9621712010-04-24 17:59:49 +000013033$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013034
13035fi
13036
Brett Cannon43802422005-02-10 20:48:03 +000013037# 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 +000013038# (which is not required by ISO C or UNIX spec) and/or if we support
13039# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013040ac_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 +000013041#include <$ac_cv_struct_tm>
13042
Matthias Kloseb9621712010-04-24 17:59:49 +000013043"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013044if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013045
13046cat >>confdefs.h <<_ACEOF
13047#define HAVE_STRUCT_TM_TM_ZONE 1
13048_ACEOF
13049
13050
13051fi
13052
13053if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013056
13057else
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13059"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013060if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013061 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013062else
Matthias Kloseb9621712010-04-24 17:59:49 +000013063 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013064fi
13065
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013066cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013067#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013068_ACEOF
13069
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13071$as_echo_n "checking for tzname... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013072if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013073 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013074else
Matthias Kloseb9621712010-04-24 17:59:49 +000013075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013076/* end confdefs.h. */
13077#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013078#if !HAVE_DECL_TZNAME
13079extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013080#endif
13081
13082int
13083main ()
13084{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013085return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013086 ;
13087 return 0;
13088}
13089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013090if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013091 ac_cv_var_tzname=yes
13092else
Matthias Kloseb9621712010-04-24 17:59:49 +000013093 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013095rm -f core conftest.err conftest.$ac_objext \
13096 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13099$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013100 if test $ac_cv_var_tzname = yes; then
13101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013103
13104 fi
13105fi
13106
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013107
Martin v. Löwis1d459062005-03-14 21:23:33 +000013108# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13110$as_echo_n "checking for working tzset()... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013111if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013113else
13114
Matthias Kloseb9621712010-04-24 17:59:49 +000013115if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013116 ac_cv_working_tzset=no
13117else
Matthias Kloseb9621712010-04-24 17:59:49 +000013118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013119/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013120
13121#include <stdlib.h>
13122#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013123#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013124
13125#if HAVE_TZNAME
13126extern char *tzname[];
13127#endif
13128
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013129int main()
13130{
Brett Cannon18367812003-09-19 00:59:16 +000013131 /* Note that we need to ensure that not only does tzset(3)
13132 do 'something' with localtime, but it works as documented
13133 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013134 This includes making sure that tzname is set properly if
13135 tm->tm_zone does not exist since it is the alternative way
13136 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013137
13138 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013139 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013140 */
13141
Martin v. Löwis1d459062005-03-14 21:23:33 +000013142 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013143 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13144
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013145 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013146 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013147 if (localtime(&groundhogday)->tm_hour != 0)
13148 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013149#if HAVE_TZNAME
13150 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13151 if (strcmp(tzname[0], "UTC") ||
13152 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13153 exit(1);
13154#endif
Brett Cannon18367812003-09-19 00:59:16 +000013155
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013156 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013157 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013158 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013159 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013160#if HAVE_TZNAME
13161 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13162 exit(1);
13163#endif
Brett Cannon18367812003-09-19 00:59:16 +000013164
13165 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13166 tzset();
13167 if (localtime(&groundhogday)->tm_hour != 11)
13168 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013169#if HAVE_TZNAME
13170 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13171 exit(1);
13172#endif
13173
13174#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013175 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13176 exit(1);
13177 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13178 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013179#endif
Brett Cannon18367812003-09-19 00:59:16 +000013180
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013181 exit(0);
13182}
13183
13184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013185if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013186 ac_cv_working_tzset=yes
13187else
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13191 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013192fi
13193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013194fi
13195
Matthias Kloseb9621712010-04-24 17:59:49 +000013196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13197$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013198if test "$ac_cv_working_tzset" = yes
13199then
13200
Matthias Kloseb9621712010-04-24 17:59:49 +000013201$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013202
13203fi
13204
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013205# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13207$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013208if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013209 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013210else
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013212/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013213#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013214int
13215main ()
13216{
13217
13218struct stat st;
13219st.st_mtim.tv_nsec = 1;
13220
13221 ;
13222 return 0;
13223}
13224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013225if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013226 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013227else
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13231fi
13232
Matthias Kloseb9621712010-04-24 17:59:49 +000013233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13234$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013235if test "$ac_cv_stat_tv_nsec" = yes
13236then
13237
Matthias Kloseb9621712010-04-24 17:59:49 +000013238$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013239
13240fi
13241
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013242# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13244$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013245if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013246 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013247else
Matthias Kloseb9621712010-04-24 17:59:49 +000013248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013249/* end confdefs.h. */
13250#include <sys/stat.h>
13251int
13252main ()
13253{
13254
13255struct stat st;
13256st.st_mtimespec.tv_nsec = 1;
13257
13258 ;
13259 return 0;
13260}
13261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013262if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013263 ac_cv_stat_tv_nsec2=yes
13264else
Matthias Kloseb9621712010-04-24 17:59:49 +000013265 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13268fi
13269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13271$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013272if test "$ac_cv_stat_tv_nsec2" = yes
13273then
13274
Matthias Kloseb9621712010-04-24 17:59:49 +000013275$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013276
13277fi
13278
Jack Jansen666b1e72001-10-31 12:11:48 +000013279# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13281$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013282if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013283 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013284else
Matthias Kloseb9621712010-04-24 17:59:49 +000013285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013286/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013287#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013288int
13289main ()
13290{
Jack Jansen666b1e72001-10-31 12:11:48 +000013291
13292 int rtn;
13293 rtn = mvwdelch(0,0,0);
13294
Martin v. Löwis11437992002-04-12 09:54:03 +000013295 ;
13296 return 0;
13297}
13298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013299if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013300 ac_cv_mvwdelch_is_expression=yes
13301else
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13305fi
13306
Matthias Kloseb9621712010-04-24 17:59:49 +000013307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13308$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013309
13310if test "$ac_cv_mvwdelch_is_expression" = yes
13311then
Martin v. Löwis11437992002-04-12 09:54:03 +000013312
Matthias Kloseb9621712010-04-24 17:59:49 +000013313$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013314
13315fi
13316
Matthias Kloseb9621712010-04-24 17:59:49 +000013317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13318$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013319if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013320 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013321else
Matthias Kloseb9621712010-04-24 17:59:49 +000013322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013323/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013324#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013325int
13326main ()
13327{
Jack Jansen666b1e72001-10-31 12:11:48 +000013328
13329 WINDOW *w;
13330 w->_flags = 0;
13331
Martin v. Löwis11437992002-04-12 09:54:03 +000013332 ;
13333 return 0;
13334}
13335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013336if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013337 ac_cv_window_has_flags=yes
13338else
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13342fi
13343
Matthias Kloseb9621712010-04-24 17:59:49 +000013344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13345$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013346
Jack Jansen666b1e72001-10-31 12:11:48 +000013347
13348if test "$ac_cv_window_has_flags" = yes
13349then
Martin v. Löwis11437992002-04-12 09:54:03 +000013350
Matthias Kloseb9621712010-04-24 17:59:49 +000013351$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013352
13353fi
13354
Matthias Kloseb9621712010-04-24 17:59:49 +000013355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13356$as_echo_n "checking for is_term_resized... " >&6; }
13357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013358/* end confdefs.h. */
13359#include <curses.h>
13360int
13361main ()
13362{
13363void *x=is_term_resized
13364 ;
13365 return 0;
13366}
13367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013369
Matthias Kloseb9621712010-04-24 17:59:49 +000013370$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013371
Matthias Kloseb159a552010-04-25 21:00:44 +000013372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013373$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013374else
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13376$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013377
13378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13382$as_echo_n "checking for resize_term... " >&6; }
13383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013384/* end confdefs.h. */
13385#include <curses.h>
13386int
13387main ()
13388{
13389void *x=resize_term
13390 ;
13391 return 0;
13392}
13393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013394if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013395
Matthias Kloseb9621712010-04-24 17:59:49 +000013396$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013397
Matthias Kloseb159a552010-04-25 21:00:44 +000013398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013399$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013400else
Matthias Kloseb9621712010-04-24 17:59:49 +000013401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13402$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013403
13404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13406
Matthias Kloseb9621712010-04-24 17:59:49 +000013407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13408$as_echo_n "checking for resizeterm... " >&6; }
13409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013410/* end confdefs.h. */
13411#include <curses.h>
13412int
13413main ()
13414{
13415void *x=resizeterm
13416 ;
13417 return 0;
13418}
13419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013420if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013421
Matthias Kloseb9621712010-04-24 17:59:49 +000013422$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013423
Matthias Kloseb159a552010-04-25 21:00:44 +000013424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013425$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013426else
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13428$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013429
13430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13434$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013435
13436if test -r /dev/ptmx
13437then
Matthias Kloseb9621712010-04-24 17:59:49 +000013438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13439$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013440
Matthias Kloseb9621712010-04-24 17:59:49 +000013441$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013442
Thomas Wouters89f507f2006-12-13 04:49:30 +000013443else
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13445$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013446fi
13447
Matthias Kloseb9621712010-04-24 17:59:49 +000013448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13449$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013450
13451if test -r /dev/ptc
13452then
Matthias Kloseb9621712010-04-24 17:59:49 +000013453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13454$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013455
Matthias Kloseb9621712010-04-24 17:59:49 +000013456$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013457
Thomas Wouters89f507f2006-12-13 04:49:30 +000013458else
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13460$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013461fi
13462
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013463if test "$have_long_long" = yes
13464then
Matthias Kloseb9621712010-04-24 17:59:49 +000013465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13466$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013467 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013469else
Matthias Kloseb9621712010-04-24 17:59:49 +000013470 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013471 ac_cv_have_long_long_format=no
13472else
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013474/* end confdefs.h. */
13475
13476 #include <stdio.h>
13477 #include <stddef.h>
13478 #include <string.h>
13479
13480 #ifdef HAVE_SYS_TYPES_H
13481 #include <sys/types.h>
13482 #endif
13483
13484 int main()
13485 {
13486 char buffer[256];
13487
13488 if (sprintf(buffer, "%lld", (long long)123) < 0)
13489 return 1;
13490 if (strcmp(buffer, "123"))
13491 return 1;
13492
13493 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13494 return 1;
13495 if (strcmp(buffer, "-123"))
13496 return 1;
13497
13498 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13499 return 1;
13500 if (strcmp(buffer, "123"))
13501 return 1;
13502
13503 return 0;
13504 }
13505
13506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013507if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013508 ac_cv_have_long_long_format=yes
13509else
Matthias Kloseb9621712010-04-24 17:59:49 +000013510 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13513 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013514fi
13515
13516
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013517fi
13518
Matthias Kloseb9621712010-04-24 17:59:49 +000013519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13520$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013521fi
13522
Mark Dickinson89d7d412009-12-31 20:50:59 +000013523if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013524then
13525
Matthias Kloseb9621712010-04-24 17:59:49 +000013526$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013527
13528fi
13529
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013530if test $ac_sys_system = Darwin
13531then
13532 LIBS="$LIBS -framework CoreFoundation"
13533fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13536$as_echo_n "checking for %zd printf() format support... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013537if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013539else
Matthias Kloseb9621712010-04-24 17:59:49 +000013540 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013541 ac_cv_have_size_t_format="cross -- assuming yes"
13542
Thomas Wouters477c8d52006-05-27 19:21:47 +000013543else
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013545/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013546
Thomas Wouters477c8d52006-05-27 19:21:47 +000013547#include <stdio.h>
13548#include <stddef.h>
13549#include <string.h>
13550
Christian Heimes2c181612007-12-17 20:04:13 +000013551#ifdef HAVE_SYS_TYPES_H
13552#include <sys/types.h>
13553#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013554
13555#ifdef HAVE_SSIZE_T
13556typedef ssize_t Py_ssize_t;
13557#elif SIZEOF_VOID_P == SIZEOF_LONG
13558typedef long Py_ssize_t;
13559#else
13560typedef int Py_ssize_t;
13561#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013562
Christian Heimes2c181612007-12-17 20:04:13 +000013563int main()
13564{
13565 char buffer[256];
13566
Thomas Wouters477c8d52006-05-27 19:21:47 +000013567 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13568 return 1;
13569
Thomas Wouters89f507f2006-12-13 04:49:30 +000013570 if (strcmp(buffer, "123"))
13571 return 1;
13572
13573 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13574 return 1;
13575
13576 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013577 return 1;
13578
13579 return 0;
13580}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013581
Thomas Wouters477c8d52006-05-27 19:21:47 +000013582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013583if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013584 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013585else
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13589 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013590fi
13591
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13594$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013595if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013596
Matthias Kloseb9621712010-04-24 17:59:49 +000013597$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013598
13599fi
13600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013602#ifdef HAVE_SYS_TYPES_H
13603#include <sys/types.h>
13604#endif
13605#ifdef HAVE_SYS_SOCKET_H
13606#include <sys/socket.h>
13607#endif
13608
Matthias Kloseb9621712010-04-24 17:59:49 +000013609"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013610if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013611
Martin v. Löwis11437992002-04-12 09:54:03 +000013612else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013613
Matthias Kloseb9621712010-04-24 17:59:49 +000013614$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013615
13616fi
13617
Michael W. Hudson54241132001-12-07 15:38:26 +000013618
Matthias Kloseb9621712010-04-24 17:59:49 +000013619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13620$as_echo_n "checking for broken mbstowcs... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013621if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013623else
Matthias Kloseb9621712010-04-24 17:59:49 +000013624 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013625 ac_cv_broken_mbstowcs=no
13626else
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013628/* end confdefs.h. */
13629
13630#include<stdlib.h>
13631int main() {
13632 size_t len = -1;
13633 const char *str = "text";
13634 len = mbstowcs(NULL, str, 0);
13635 return (len != 4);
13636}
13637
13638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013639if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013640 ac_cv_broken_mbstowcs=no
13641else
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13645 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013646fi
13647
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013648fi
13649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13651$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013652if test "$ac_cv_broken_mbstowcs" = yes
13653then
13654
Matthias Kloseb9621712010-04-24 17:59:49 +000013655$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013656
13657fi
13658
Antoine Pitrou042b1282010-08-13 21:15:58 +000013659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13660$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013661if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013662 $as_echo_n "(cached) " >&6
13663else
13664 if test "$cross_compiling" = yes; then :
13665 ac_cv_computed_gotos=no
13666else
13667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13668/* end confdefs.h. */
13669
13670int main(int argc, char **argv)
13671{
13672 static void *targets[1] = { &&LABEL1 };
13673 goto LABEL2;
13674LABEL1:
13675 return 0;
13676LABEL2:
13677 goto *targets[0];
13678 return 1;
13679}
13680
13681_ACEOF
13682if ac_fn_c_try_run "$LINENO"; then :
13683 ac_cv_computed_gotos=yes
13684else
13685 ac_cv_computed_gotos=no
13686fi
13687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13688 conftest.$ac_objext conftest.beam conftest.$ac_ext
13689fi
13690
13691fi
13692
13693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13694$as_echo "$ac_cv_computed_gotos" >&6; }
13695if test "$ac_cv_computed_gotos" = yes
13696then
13697
13698$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13699
13700fi
13701
Antoine Pitroub52ec782009-01-25 16:34:23 +000013702# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13704$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013705
13706# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013707if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013708 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013709if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013710then
13711
Matthias Kloseb9621712010-04-24 17:59:49 +000013712$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013713
Matthias Kloseb9621712010-04-24 17:59:49 +000013714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13715$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013716fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013717if test "$withval" = no
13718then
13719
13720$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13721
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13723$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013724fi
13725
Antoine Pitrou042b1282010-08-13 21:15:58 +000013726else
13727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13728$as_echo "no value specified" >&6; }
13729fi
13730
Antoine Pitroub52ec782009-01-25 16:34:23 +000013731
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013732case $ac_sys_system in
13733AIX*)
13734
13735$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13736 ;;
13737esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013738
Michael W. Hudson54241132001-12-07 15:38:26 +000013739
Jesus Cea6a792292010-05-03 21:18:48 +000013740case $ac_sys_system in
Antoine Pitrouc2244582011-01-02 19:34:03 +000013741 OSF*) as_fn_error "OSF* systems are deprecated unless somebody volunteers. Check http://bugs.python.org/issue8606" "$LINENO" 5 ;;
Jesus Cea6a792292010-05-03 21:18:48 +000013742esac
13743
Gregory P. Smith138fa432010-12-13 08:00:52 +000013744ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
13745if test "x$ac_cv_func_pipe2" = x""yes; then :
13746
13747$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13748
13749fi
Jesus Cea6a792292010-05-03 21:18:48 +000013750
13751
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013752
13753
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013754for h in `(cd $srcdir;echo Python/thread_*.h)`
13755do
13756 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13757done
13758
Michael W. Hudson54241132001-12-07 15:38:26 +000013759
Neal Norwitzd24499d2005-12-18 21:36:39 +000013760SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13762$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013763for dir in $SRCDIRS; do
13764 if test ! -d $dir; then
13765 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013766 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013767done
Matthias Kloseb9621712010-04-24 17:59:49 +000013768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13769$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013770
Guido van Rossum627b2d71993-12-24 10:39:16 +000013771# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013772ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013773
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013774ac_config_files="$ac_config_files Modules/ld_so_aix"
13775
Martin v. Löwis11437992002-04-12 09:54:03 +000013776cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013777# This file is a shell script that caches the results of configure
13778# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013779# scripts and configure runs, see configure's option --config-cache.
13780# It is not useful on other systems. If it contains results you don't
13781# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013782#
Martin v. Löwis11437992002-04-12 09:54:03 +000013783# config.status only pays attention to the cache file if you give it
13784# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013785#
Skip Montanaro6dead952003-09-25 14:50:04 +000013786# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013787# loading this file, other *unset* `ac_cv_foo' will be assigned the
13788# following values.
13789
13790_ACEOF
13791
Guido van Rossumf78abae1997-01-21 22:02:36 +000013792# The following way of writing the cache mishandles newlines in values,
13793# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013794# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013795# Ultrix sh set writes to stderr and can't be redirected directly,
13796# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013797(
13798 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13799 eval ac_val=\$$ac_var
13800 case $ac_val in #(
13801 *${as_nl}*)
13802 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013803 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13804$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013805 esac
13806 case $ac_var in #(
13807 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13809 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013810 esac ;;
13811 esac
13812 done
13813
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013815 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13816 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013817 # `set' does not quote correctly, so add quotes: double-quote
13818 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013819 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013820 "s/'/'\\\\''/g;
13821 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013822 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013823 *)
13824 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013825 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013826 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013827 esac |
13828 sort
13829) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013830 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013832 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013833 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13835 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013836 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13837 :end' >>confcache
13838if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13839 if test -w "$cache_file"; then
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013840 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013841 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13842$as_echo "$as_me: updating cache $cache_file" >&6;}
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013843 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013844 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013845 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13846$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013847 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013848fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013849rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013850
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013851test "x$prefix" = xNONE && prefix=$ac_default_prefix
13852# Let make expand exec_prefix.
13853test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013854
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013855DEFS=-DHAVE_CONFIG_H
13856
Skip Montanaro6dead952003-09-25 14:50:04 +000013857ac_libobjs=
13858ac_ltlibobjs=
13859for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13860 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013862 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13864 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013865 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13866 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013867done
13868LIBOBJS=$ac_libobjs
13869
13870LTLIBOBJS=$ac_ltlibobjs
13871
13872
Martin v. Löwis11437992002-04-12 09:54:03 +000013873
Matthias Kloseb9621712010-04-24 17:59:49 +000013874
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013875: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013876ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013877ac_clean_files_save=$ac_clean_files
13878ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013879{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13880$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13881as_write_fail=0
13882cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013883#! $SHELL
13884# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013885# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013886# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013887# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013888
Martin v. Löwis11437992002-04-12 09:54:03 +000013889debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013890ac_cs_recheck=false
13891ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013892
Matthias Kloseb9621712010-04-24 17:59:49 +000013893SHELL=\${CONFIG_SHELL-$SHELL}
13894export SHELL
13895_ASEOF
13896cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13897## -------------------- ##
13898## M4sh Initialization. ##
13899## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013901# Be more Bourne compatible
13902DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013903if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 emulate sh
13905 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013906 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013907 # is contrary to our usage. Disable this feature.
13908 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013909 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013910else
Matthias Kloseb9621712010-04-24 17:59:49 +000013911 case `(set -o) 2>/dev/null` in #(
13912 *posix*) :
13913 set -o posix ;; #(
13914 *) :
13915 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013916esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013917fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013918
13919
Matthias Kloseb9621712010-04-24 17:59:49 +000013920as_nl='
13921'
13922export as_nl
13923# Printing a long string crashes Solaris 7 /usr/bin/printf.
13924as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13925as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13926as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13927# Prefer a ksh shell builtin over an external printf program on Solaris,
13928# but without wasting forks for bash or zsh.
13929if test -z "$BASH_VERSION$ZSH_VERSION" \
13930 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13931 as_echo='print -r --'
13932 as_echo_n='print -rn --'
13933elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13934 as_echo='printf %s\n'
13935 as_echo_n='printf %s'
13936else
13937 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13938 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13939 as_echo_n='/usr/ucb/echo -n'
13940 else
13941 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13942 as_echo_n_body='eval
13943 arg=$1;
13944 case $arg in #(
13945 *"$as_nl"*)
13946 expr "X$arg" : "X\\(.*\\)$as_nl";
13947 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13948 esac;
13949 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13950 '
13951 export as_echo_n_body
13952 as_echo_n='sh -c $as_echo_n_body as_echo'
13953 fi
13954 export as_echo_body
13955 as_echo='sh -c $as_echo_body as_echo'
13956fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013957
13958# The user is always right.
13959if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 PATH_SEPARATOR=:
13961 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13962 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13963 PATH_SEPARATOR=';'
13964 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013967
13968# IFS
13969# We need space, tab and new line, in precisely that order. Quoting is
13970# there to prevent editors from complaining about space-tab.
13971# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13972# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013973IFS=" "" $as_nl"
13974
13975# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013976case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013977 *[\\/]* ) as_myself=$0 ;;
13978 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013979for as_dir in $PATH
13980do
13981 IFS=$as_save_IFS
13982 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13984 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013985IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013987 ;;
13988esac
13989# We did not find ourselves, most probably we were run as `sh COMMAND'
13990# in which case we are not to be found in the path.
13991if test "x$as_myself" = x; then
13992 as_myself=$0
13993fi
13994if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013995 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13996 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013997fi
13998
Matthias Kloseb9621712010-04-24 17:59:49 +000013999# Unset variables that we do not need and which cause bugs (e.g. in
14000# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14001# suppresses any "Segmentation fault" message there. '((' could
14002# trigger a bug in pdksh 5.2.14.
14003for as_var in BASH_ENV ENV MAIL MAILPATH
14004do eval test x\${$as_var+set} = xset \
14005 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014006done
14007PS1='$ '
14008PS2='> '
14009PS4='+ '
14010
14011# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014012LC_ALL=C
14013export LC_ALL
14014LANGUAGE=C
14015export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014016
Matthias Kloseb9621712010-04-24 17:59:49 +000014017# CDPATH.
14018(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14019
14020
Antoine Pitrouc2244582011-01-02 19:34:03 +000014021# as_fn_error ERROR [LINENO LOG_FD]
14022# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014023# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14024# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Antoine Pitrouc2244582011-01-02 19:34:03 +000014025# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014026as_fn_error ()
14027{
Antoine Pitrouc2244582011-01-02 19:34:03 +000014028 as_status=$?; test $as_status -eq 0 && as_status=1
14029 if test "$3"; then
14030 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14031 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +000014032 fi
Antoine Pitrouc2244582011-01-02 19:34:03 +000014033 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014034 as_fn_exit $as_status
14035} # as_fn_error
14036
14037
14038# as_fn_set_status STATUS
14039# -----------------------
14040# Set $? to STATUS, without forking.
14041as_fn_set_status ()
14042{
14043 return $1
14044} # as_fn_set_status
14045
14046# as_fn_exit STATUS
14047# -----------------
14048# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14049as_fn_exit ()
14050{
14051 set +e
14052 as_fn_set_status $1
14053 exit $1
14054} # as_fn_exit
14055
14056# as_fn_unset VAR
14057# ---------------
14058# Portably unset VAR.
14059as_fn_unset ()
14060{
14061 { eval $1=; unset $1;}
14062}
14063as_unset=as_fn_unset
14064# as_fn_append VAR VALUE
14065# ----------------------
14066# Append the text in VALUE to the end of the definition contained in VAR. Take
14067# advantage of any shell optimizations that allow amortized linear growth over
14068# repeated appends, instead of the typical quadratic growth present in naive
14069# implementations.
14070if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14071 eval 'as_fn_append ()
14072 {
14073 eval $1+=\$2
14074 }'
14075else
14076 as_fn_append ()
14077 {
14078 eval $1=\$$1\$2
14079 }
14080fi # as_fn_append
14081
14082# as_fn_arith ARG...
14083# ------------------
14084# Perform arithmetic evaluation on the ARGs, and store the result in the
14085# global $as_val. Take advantage of shells that can avoid forks. The arguments
14086# must be portable across $(()) and expr.
14087if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14088 eval 'as_fn_arith ()
14089 {
14090 as_val=$(( $* ))
14091 }'
14092else
14093 as_fn_arith ()
14094 {
14095 as_val=`expr "$@" || test $? -eq 1`
14096 }
14097fi # as_fn_arith
14098
14099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014100if expr a : '\(a\)' >/dev/null 2>&1 &&
14101 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14102 as_expr=expr
14103else
14104 as_expr=false
14105fi
14106
14107if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14108 as_basename=basename
14109else
14110 as_basename=false
14111fi
14112
Matthias Kloseb9621712010-04-24 17:59:49 +000014113if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14114 as_dirname=dirname
14115else
14116 as_dirname=false
14117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014119as_me=`$as_basename -- "$0" ||
14120$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14121 X"$0" : 'X\(//\)$' \| \
14122 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014123$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014124 sed '/^.*\/\([^/][^/]*\)\/*$/{
14125 s//\1/
14126 q
14127 }
14128 /^X\/\(\/\/\)$/{
14129 s//\1/
14130 q
14131 }
14132 /^X\/\(\/\).*/{
14133 s//\1/
14134 q
14135 }
14136 s/.*/./; q'`
14137
Matthias Kloseb9621712010-04-24 17:59:49 +000014138# Avoid depending upon Character Ranges.
14139as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14140as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14141as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14142as_cr_digits='0123456789'
14143as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014144
14145ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014146case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014147-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014148 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014149 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014150 xy) ECHO_C='\c';;
14151 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14152 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014153 esac;;
14154*)
14155 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014156esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014157
Martin v. Löwis11437992002-04-12 09:54:03 +000014158rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159if test -d conf$$.dir; then
14160 rm -f conf$$.dir/conf$$.file
14161else
14162 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014165if (echo >conf$$.file) 2>/dev/null; then
14166 if ln -s conf$$.file conf$$ 2>/dev/null; then
14167 as_ln_s='ln -s'
14168 # ... but there are two gotchas:
14169 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14170 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14171 # In both cases, we have to default to `cp -p'.
14172 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14173 as_ln_s='cp -p'
14174 elif ln conf$$.file conf$$ 2>/dev/null; then
14175 as_ln_s=ln
14176 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014177 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014178 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014179else
14180 as_ln_s='cp -p'
14181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014182rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14183rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014184
Matthias Kloseb9621712010-04-24 17:59:49 +000014185
14186# as_fn_mkdir_p
14187# -------------
14188# Create "$as_dir" as a directory, including parents if necessary.
14189as_fn_mkdir_p ()
14190{
14191
14192 case $as_dir in #(
14193 -*) as_dir=./$as_dir;;
14194 esac
14195 test -d "$as_dir" || eval $as_mkdir_p || {
14196 as_dirs=
14197 while :; do
14198 case $as_dir in #(
14199 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14200 *) as_qdir=$as_dir;;
14201 esac
14202 as_dirs="'$as_qdir' $as_dirs"
14203 as_dir=`$as_dirname -- "$as_dir" ||
14204$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14205 X"$as_dir" : 'X\(//\)[^/]' \| \
14206 X"$as_dir" : 'X\(//\)$' \| \
14207 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14208$as_echo X"$as_dir" |
14209 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14210 s//\1/
14211 q
14212 }
14213 /^X\(\/\/\)[^/].*/{
14214 s//\1/
14215 q
14216 }
14217 /^X\(\/\/\)$/{
14218 s//\1/
14219 q
14220 }
14221 /^X\(\/\).*/{
14222 s//\1/
14223 q
14224 }
14225 s/.*/./; q'`
14226 test -d "$as_dir" && break
14227 done
14228 test -z "$as_dirs" || eval "mkdir $as_dirs"
Antoine Pitrouc2244582011-01-02 19:34:03 +000014229 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014230
14231
14232} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014233if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014234 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014235else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014236 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014237 as_mkdir_p=false
14238fi
14239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014240if test -x / >/dev/null 2>&1; then
14241 as_test_x='test -x'
14242else
14243 if ls -dL / >/dev/null 2>&1; then
14244 as_ls_L_option=L
14245 else
14246 as_ls_L_option=
14247 fi
14248 as_test_x='
14249 eval sh -c '\''
14250 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014253 case $1 in #(
14254 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014256 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014257 ???[sx]*):;;*)false;;esac;fi
14258 '\'' sh
14259 '
14260fi
14261as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014262
14263# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014264as_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 +000014265
14266# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014267as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014268
14269
Martin v. Löwis11437992002-04-12 09:54:03 +000014270exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014271## ----------------------------------- ##
14272## Main body of $CONFIG_STATUS script. ##
14273## ----------------------------------- ##
14274_ASEOF
14275test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014276
Matthias Kloseb9621712010-04-24 17:59:49 +000014277cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14278# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014279# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014280# values after options handling.
14281ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014282This file was extended by python $as_me 3.2, which was
Antoine Pitrouc2244582011-01-02 19:34:03 +000014283generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014284
14285 CONFIG_FILES = $CONFIG_FILES
14286 CONFIG_HEADERS = $CONFIG_HEADERS
14287 CONFIG_LINKS = $CONFIG_LINKS
14288 CONFIG_COMMANDS = $CONFIG_COMMANDS
14289 $ $0 $@
14290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014291on `(hostname || uname -n) 2>/dev/null | sed 1q`
14292"
14293
Martin v. Löwis11437992002-04-12 09:54:03 +000014294_ACEOF
14295
Matthias Kloseb9621712010-04-24 17:59:49 +000014296case $ac_config_files in *"
14297"*) set x $ac_config_files; shift; ac_config_files=$*;;
14298esac
14299
14300case $ac_config_headers in *"
14301"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14302esac
14303
14304
14305cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014306# Files that config.status was made for.
Antoine Pitrouc2244582011-01-02 19:34:03 +000014307config_files="`echo $ac_config_files`"
14308config_headers="`echo $ac_config_headers`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014309
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014310_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014311
Matthias Kloseb9621712010-04-24 17:59:49 +000014312cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014313ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014314\`$as_me' instantiates files and other configuration actions
14315from templates according to the current configuration. Unless the files
14316and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014317
Matthias Kloseb9621712010-04-24 17:59:49 +000014318Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014319
14320 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014321 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014322 --config print configuration, then exit
14323 -q, --quiet, --silent
14324 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014325 -d, --debug don't remove temporary files
14326 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014327 --file=FILE[:TEMPLATE]
14328 instantiate the configuration file FILE
14329 --header=FILE[:TEMPLATE]
14330 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014331
14332Configuration files:
14333$config_files
14334
14335Configuration headers:
14336$config_headers
14337
Matthias Kloseb9621712010-04-24 17:59:49 +000014338Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014341cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14342ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014343ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014344python config.status 3.2
Antoine Pitrouc2244582011-01-02 19:34:03 +000014345configured by $0, generated by GNU Autoconf 2.65,
Matthias Kloseb9621712010-04-24 17:59:49 +000014346 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014347
Antoine Pitrouc2244582011-01-02 19:34:03 +000014348Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014349This config.status script is free software; the Free Software Foundation
14350gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014351
14352ac_pwd='$ac_pwd'
14353srcdir='$srcdir'
14354INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014355test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014356_ACEOF
14357
Matthias Kloseb9621712010-04-24 17:59:49 +000014358cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14359# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014360ac_need_defaults=:
14361while test $# != 0
14362do
14363 case $1 in
Antoine Pitrouc2244582011-01-02 19:34:03 +000014364 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014365 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14366 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014367 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014368 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014369 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014370 ac_option=$1
14371 ac_optarg=$2
14372 ac_shift=shift
14373 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014374 esac
14375
Skip Montanaro6dead952003-09-25 14:50:04 +000014376 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014377 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014378 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14379 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014380 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 $as_echo "$ac_cs_version"; exit ;;
14382 --config | --confi | --conf | --con | --co | --c )
14383 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014384 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014385 debug=: ;;
14386 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014387 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014388 case $ac_optarg in
14389 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14390 esac
14391 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014392 ac_need_defaults=false;;
14393 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014394 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014395 case $ac_optarg in
14396 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14397 esac
14398 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014399 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014400 --he | --h)
14401 # Conflict between --help and --header
Antoine Pitrouc2244582011-01-02 19:34:03 +000014402 as_fn_error "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014403Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014404 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014405 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014406 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14407 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14408 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014409
14410 # This is an error.
Antoine Pitrouc2244582011-01-02 19:34:03 +000014411 -*) as_fn_error "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014412Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014413
Matthias Kloseb9621712010-04-24 17:59:49 +000014414 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014415 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014416
14417 esac
14418 shift
14419done
14420
Skip Montanaro6dead952003-09-25 14:50:04 +000014421ac_configure_extra_args=
14422
14423if $ac_cs_silent; then
14424 exec 6>/dev/null
14425 ac_configure_extra_args="$ac_configure_extra_args --silent"
14426fi
14427
14428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014429cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014430if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014431 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14432 shift
14433 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14434 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014435 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014436 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014437fi
14438
Martin v. Löwis11437992002-04-12 09:54:03 +000014439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014440cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014441exec 5>>config.log
14442{
14443 echo
14444 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14445## Running $as_me. ##
14446_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014447 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014448} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014451cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014452_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014453
Matthias Kloseb9621712010-04-24 17:59:49 +000014454cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014455
14456# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014457for ac_config_target in $ac_config_targets
14458do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459 case $ac_config_target in
14460 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14461 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14462 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014463 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14464 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014465 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14466 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014467 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014468 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469
Antoine Pitrouc2244582011-01-02 19:34:03 +000014470 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014471 esac
14472done
14473
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014474
Martin v. Löwis11437992002-04-12 09:54:03 +000014475# If the user did not use the arguments to specify the items to instantiate,
14476# then the envvar interface is used. Set only those that are not.
14477# We use the long form for the default assignment because of an extremely
14478# bizarre bug on SunOS 4.1.3.
14479if $ac_need_defaults; then
14480 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14481 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14482fi
14483
Skip Montanaro6dead952003-09-25 14:50:04 +000014484# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014485# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014486# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487# Hook for its removal unless debugging.
14488# Note that there is a small window in which the directory will not be cleaned:
14489# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014490$debug ||
14491{
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014492 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493 trap 'exit_status=$?
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014494 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014495' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014496 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014497}
Martin v. Löwis11437992002-04-12 09:54:03 +000014498# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014499
Martin v. Löwis11437992002-04-12 09:54:03 +000014500{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014501 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014502 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014503} ||
14504{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014505 tmp=./conf$$-$RANDOM
14506 (umask 077 && mkdir "$tmp")
Antoine Pitrouc2244582011-01-02 19:34:03 +000014507} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014508
Matthias Kloseb9621712010-04-24 17:59:49 +000014509# Set up the scripts for CONFIG_FILES section.
14510# No need to generate them if there are no CONFIG_FILES.
14511# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014512if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014513
Matthias Kloseb9621712010-04-24 17:59:49 +000014514
14515ac_cr=`echo X | tr X '\015'`
14516# On cygwin, bash can eat \r inside `` if the user requested igncr.
14517# But we know of no other shell where ac_cr would be empty at this
14518# point, so we can use a bashism as a fallback.
14519if test "x$ac_cr" = x; then
14520 eval ac_cr=\$\'\\r\'
14521fi
14522ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14523if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Antoine Pitrouc2244582011-01-02 19:34:03 +000014524 ac_cs_awk_cr='\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014525else
14526 ac_cs_awk_cr=$ac_cr
14527fi
14528
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014529echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014530_ACEOF
14531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014532
Matthias Kloseb9621712010-04-24 17:59:49 +000014533{
14534 echo "cat >conf$$subs.awk <<_ACEOF" &&
14535 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14536 echo "_ACEOF"
14537} >conf$$subs.sh ||
Antoine Pitrouc2244582011-01-02 19:34:03 +000014538 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14539ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540ac_delim='%!_!# '
14541for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014542 . ./conf$$subs.sh ||
Antoine Pitrouc2244582011-01-02 19:34:03 +000014543 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544
Matthias Kloseb9621712010-04-24 17:59:49 +000014545 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14546 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014547 break
14548 elif $ac_last_try; then
Antoine Pitrouc2244582011-01-02 19:34:03 +000014549 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014550 else
14551 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014552 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014553done
Matthias Kloseb9621712010-04-24 17:59:49 +000014554rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555
Matthias Kloseb9621712010-04-24 17:59:49 +000014556cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014557cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014559sed -n '
14560h
14561s/^/S["/; s/!.*/"]=/
14562p
14563g
14564s/^[^!]*!//
14565:repl
14566t repl
14567s/'"$ac_delim"'$//
14568t delim
14569:nl
14570h
14571s/\(.\{148\}\)..*/\1/
14572t more1
14573s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14574p
14575n
14576b repl
14577:more1
14578s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14579p
14580g
14581s/.\{148\}//
14582t nl
14583:delim
14584h
14585s/\(.\{148\}\)..*/\1/
14586t more2
14587s/["\\]/\\&/g; s/^/"/; s/$/"/
14588p
14589b
14590:more2
14591s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14592p
14593g
14594s/.\{148\}//
14595t delim
14596' <conf$$subs.awk | sed '
14597/^[^""]/{
14598 N
14599 s/\n//
14600}
14601' >>$CONFIG_STATUS || ac_write_fail=1
14602rm -f conf$$subs.awk
14603cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14604_ACAWK
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014605cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014606 for (key in S) S_is_set[key] = 1
14607 FS = ""
14608
14609}
14610{
14611 line = $ 0
14612 nfields = split(line, field, "@")
14613 substed = 0
14614 len = length(field[1])
14615 for (i = 2; i < nfields; i++) {
14616 key = field[i]
14617 keylen = length(key)
14618 if (S_is_set[key]) {
14619 value = S[key]
14620 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14621 len += length(value) + length(field[++i])
14622 substed = 1
14623 } else
14624 len += 1 + keylen
14625 }
14626
14627 print line
14628}
14629
14630_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014632cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14633if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14634 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14635else
14636 cat
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014637fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Antoine Pitrouc2244582011-01-02 19:34:03 +000014638 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014639_ACEOF
14640
Antoine Pitrouc2244582011-01-02 19:34:03 +000014641# VPATH may cause trouble with some makes, so we remove $(srcdir),
14642# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014643# trailing colons and then remove the whole line if VPATH becomes empty
14644# (actually we leave an empty line to preserve line numbers).
14645if test "x$srcdir" = x.; then
Antoine Pitrouc2244582011-01-02 19:34:03 +000014646 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14647s/:*\$(srcdir):*/:/
14648s/:*\${srcdir}:*/:/
14649s/:*@srcdir@:*/:/
14650s/^\([^=]*=[ ]*\):*/\1/
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014651s/:*$//
14652s/^[^=]*=[ ]*$//
14653}'
14654fi
14655
Matthias Kloseb9621712010-04-24 17:59:49 +000014656cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014657fi # test -n "$CONFIG_FILES"
14658
Matthias Kloseb9621712010-04-24 17:59:49 +000014659# Set up the scripts for CONFIG_HEADERS section.
14660# No need to generate them if there are no CONFIG_HEADERS.
14661# This happens for instance with `./config.status Makefile'.
14662if test -n "$CONFIG_HEADERS"; then
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014663cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014664BEGIN {
14665_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014666
Matthias Kloseb9621712010-04-24 17:59:49 +000014667# Transform confdefs.h into an awk script `defines.awk', embedded as
14668# here-document in config.status, that substitutes the proper values into
14669# config.h.in to produce config.h.
14670
14671# Create a delimiter string that does not exist in confdefs.h, to ease
14672# handling of long lines.
14673ac_delim='%!_!# '
14674for ac_last_try in false false :; do
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014675 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14676 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014677 break
14678 elif $ac_last_try; then
Antoine Pitrouc2244582011-01-02 19:34:03 +000014679 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014680 else
14681 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14682 fi
14683done
14684
14685# For the awk script, D is an array of macro values keyed by name,
14686# likewise P contains macro parameters if any. Preserve backslash
14687# newline sequences.
14688
14689ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14690sed -n '
14691s/.\{148\}/&'"$ac_delim"'/g
14692t rset
14693:rset
14694s/^[ ]*#[ ]*define[ ][ ]*/ /
14695t def
14696d
14697:def
14698s/\\$//
14699t bsnl
14700s/["\\]/\\&/g
14701s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14702D["\1"]=" \3"/p
14703s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14704d
14705:bsnl
14706s/["\\]/\\&/g
14707s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14708D["\1"]=" \3\\\\\\n"\\/p
14709t cont
14710s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14711t cont
14712d
14713:cont
14714n
14715s/.\{148\}/&'"$ac_delim"'/g
14716t clear
14717:clear
14718s/\\$//
14719t bsnlc
14720s/["\\]/\\&/g; s/^/"/; s/$/"/p
14721d
14722:bsnlc
14723s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14724b cont
14725' <confdefs.h | sed '
14726s/'"$ac_delim"'/"\\\
14727"/g' >>$CONFIG_STATUS || ac_write_fail=1
14728
14729cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14730 for (key in D) D_is_set[key] = 1
14731 FS = ""
14732}
14733/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14734 line = \$ 0
14735 split(line, arg, " ")
14736 if (arg[1] == "#") {
14737 defundef = arg[2]
14738 mac1 = arg[3]
14739 } else {
14740 defundef = substr(arg[1], 2)
14741 mac1 = arg[2]
14742 }
14743 split(mac1, mac2, "(") #)
14744 macro = mac2[1]
14745 prefix = substr(line, 1, index(line, defundef) - 1)
14746 if (D_is_set[macro]) {
14747 # Preserve the white space surrounding the "#".
14748 print prefix "define", macro P[macro] D[macro]
14749 next
14750 } else {
14751 # Replace #undef with comments. This is necessary, for example,
14752 # in the case of _POSIX_SOURCE, which is predefined and required
14753 # on some systems where configure will not decide to define it.
14754 if (defundef == "undef") {
14755 print "/*", prefix defundef, macro, "*/"
14756 next
14757 }
14758 }
14759}
14760{ print }
14761_ACAWK
14762_ACEOF
14763cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Antoine Pitrouc2244582011-01-02 19:34:03 +000014764 as_fn_error "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014765fi # test -n "$CONFIG_HEADERS"
14766
14767
14768eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14769shift
14770for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014771do
14772 case $ac_tag in
14773 :[FHLC]) ac_mode=$ac_tag; continue;;
14774 esac
14775 case $ac_mode$ac_tag in
14776 :[FHL]*:*);;
Antoine Pitrouc2244582011-01-02 19:34:03 +000014777 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014778 :[FH]-) ac_tag=-:-;;
14779 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14780 esac
14781 ac_save_IFS=$IFS
14782 IFS=:
14783 set x $ac_tag
14784 IFS=$ac_save_IFS
14785 shift
14786 ac_file=$1
14787 shift
14788
14789 case $ac_mode in
14790 :L) ac_source=$1;;
14791 :[FH])
14792 ac_file_inputs=
14793 for ac_f
14794 do
14795 case $ac_f in
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014796 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797 *) # Look for the file first in the build tree, then in the source tree
14798 # (if the path is not absolute). The absolute path cannot be DOS-style,
14799 # because $ac_f cannot contain `:'.
14800 test -f "$ac_f" ||
14801 case $ac_f in
14802 [\\/$]*) false;;
14803 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14804 esac ||
Antoine Pitrouc2244582011-01-02 19:34:03 +000014805 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014806 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014807 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14808 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809 done
14810
14811 # Let's still pretend it is `configure' which instantiates (i.e., don't
14812 # use $as_me), people would be surprised to read:
14813 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014814 configure_input='Generated from '`
14815 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14816 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014817 if test x"$ac_file" != x-; then
14818 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014819 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14820$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014821 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014822 # Neutralize special characters interpreted by sed in replacement strings.
14823 case $configure_input in #(
14824 *\&* | *\|* | *\\* )
14825 ac_sed_conf_input=`$as_echo "$configure_input" |
14826 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14827 *) ac_sed_conf_input=$configure_input;;
14828 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014829
14830 case $ac_tag in
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014831 *:-:* | *:-) cat >"$tmp/stdin" \
Antoine Pitrouc2244582011-01-02 19:34:03 +000014832 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014833 esac
14834 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014835 esac
14836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014837 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014838$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014839 X"$ac_file" : 'X\(//\)[^/]' \| \
14840 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014841 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014842$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014843 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14844 s//\1/
14845 q
14846 }
14847 /^X\(\/\/\)[^/].*/{
14848 s//\1/
14849 q
14850 }
14851 /^X\(\/\/\)$/{
14852 s//\1/
14853 q
14854 }
14855 /^X\(\/\).*/{
14856 s//\1/
14857 q
14858 }
14859 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014860 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014861 ac_builddir=.
14862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863case "$ac_dir" in
14864.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14865*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014867 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014868 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869 case $ac_top_builddir_sub in
14870 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14871 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14872 esac ;;
14873esac
14874ac_abs_top_builddir=$ac_pwd
14875ac_abs_builddir=$ac_pwd$ac_dir_suffix
14876# for backward compatibility:
14877ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014878
14879case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014880 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014881 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014882 ac_top_srcdir=$ac_top_builddir_sub
14883 ac_abs_top_srcdir=$ac_pwd ;;
14884 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014885 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886 ac_top_srcdir=$srcdir
14887 ac_abs_top_srcdir=$srcdir ;;
14888 *) # Relative name.
14889 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14890 ac_top_srcdir=$ac_top_build_prefix$srcdir
14891 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014892esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014893ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014894
Martin v. Löwis11437992002-04-12 09:54:03 +000014895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014896 case $ac_mode in
14897 :F)
14898 #
14899 # CONFIG_FILE
14900 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014901
14902 case $INSTALL in
14903 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014905 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014906_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014907
Matthias Kloseb9621712010-04-24 17:59:49 +000014908cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909# If the template does not know about datarootdir, expand it.
14910# FIXME: This hack should be removed a few years after 2.60.
14911ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014912ac_sed_dataroot='
14913/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014914 p
14915 q
14916}
14917/@datadir@/p
14918/@docdir@/p
14919/@infodir@/p
14920/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014921/@mandir@/p'
14922case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014923*datarootdir*) ac_datarootdir_seen=yes;;
14924*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14926$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014928cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929 ac_datarootdir_hack='
14930 s&@datadir@&$datadir&g
14931 s&@docdir@&$docdir&g
14932 s&@infodir@&$infodir&g
14933 s&@localedir@&$localedir&g
14934 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014936esac
14937_ACEOF
14938
14939# Neutralize VPATH when `$srcdir' = `.'.
14940# Shell code in configure.ac might set extrasub.
14941# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014942cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14943ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014944$extrasub
14945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014946cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014947:t
14948/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014949s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014950s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014951s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952s&@srcdir@&$ac_srcdir&;t t
14953s&@abs_srcdir@&$ac_abs_srcdir&;t t
14954s&@top_srcdir@&$ac_top_srcdir&;t t
14955s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14956s&@builddir@&$ac_builddir&;t t
14957s&@abs_builddir@&$ac_abs_builddir&;t t
14958s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14959s&@INSTALL@&$ac_INSTALL&;t t
14960$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014961"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014962eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Antoine Pitrouc2244582011-01-02 19:34:03 +000014963 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014965test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014966 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14967 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Antoine Pitrouc2244582011-01-02 19:34:03 +000014969which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014970$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Antoine Pitrouc2244582011-01-02 19:34:03 +000014971which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014972
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014973 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014974 case $ac_file in
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014975 -) cat "$tmp/out" && rm -f "$tmp/out";;
14976 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000014977 esac \
Antoine Pitrouc2244582011-01-02 19:34:03 +000014978 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014979 ;;
14980 :H)
14981 #
14982 # CONFIG_HEADER
14983 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014984 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014985 {
14986 $as_echo "/* $configure_input */" \
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014987 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14988 } >"$tmp/config.h" \
Antoine Pitrouc2244582011-01-02 19:34:03 +000014989 || as_fn_error "could not create $ac_file" "$LINENO" 5
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014990 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014991 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14992$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014993 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014994 rm -f "$ac_file"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014995 mv "$tmp/config.h" "$ac_file" \
Antoine Pitrouc2244582011-01-02 19:34:03 +000014996 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014997 fi
14998 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014999 $as_echo "/* $configure_input */" \
Barry Warsaw14d98ac2010-11-24 19:43:47 +000015000 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Antoine Pitrouc2244582011-01-02 19:34:03 +000015001 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015003 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015005
15006 esac
15007
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015008
15009 case $ac_file$ac_mode in
15010 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15011
15012 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015013done # for ac_tag
15014
Guido van Rossum627b2d71993-12-24 10:39:16 +000015015
Matthias Kloseb9621712010-04-24 17:59:49 +000015016as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015017_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015018ac_clean_files=$ac_clean_files_save
15019
Matthias Kloseb9621712010-04-24 17:59:49 +000015020test $ac_write_fail = 0 ||
Antoine Pitrouc2244582011-01-02 19:34:03 +000015021 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015022
Martin v. Löwis11437992002-04-12 09:54:03 +000015023
15024# configure is writing to config.log, and then calls config.status.
15025# config.status does its own redirection, appending to config.log.
15026# Unfortunately, on DOS this fails, as config.log is still kept open
15027# by configure, so config.status won't be able to write to it; its
15028# output is simply discarded. So we exec the FD to /dev/null,
15029# effectively closing config.log, so it can be properly (re)opened and
15030# appended to by config.status. When coming back to configure, we
15031# need to make the FD available again.
15032if test "$no_create" != yes; then
15033 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015034 ac_config_status_args=
15035 test "$silent" = yes &&
15036 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015037 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015038 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 exec 5>>config.log
15040 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15041 # would make configure fail if this is the last instruction.
Antoine Pitrouc2244582011-01-02 19:34:03 +000015042 $ac_cs_success || as_fn_exit $?
Matthias Kloseb9621712010-04-24 17:59:49 +000015043fi
15044if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15045 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15046$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015047fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015048
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015049
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015050echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015051if test ! -f Modules/Setup
15052then
15053 cp $srcdir/Modules/Setup.dist Modules/Setup
15054fi
15055
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015056echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015057if test ! -f Modules/Setup.local
15058then
15059 echo "# Edit this file for local setup changes" >Modules/Setup.local
15060fi
15061
15062echo "creating Makefile"
15063$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15064 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015065 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015066mv config.c Modules