blob: fdb2f29bace1152ecd85cdd6662083aedec14694 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Barry Warsawf040d7d2010-10-18 17:09:07 +00002# From configure.in Revision: 85656 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004# Generated by GNU Autoconf 2.67 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,
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, 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
224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
225fi
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"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000363# as_fn_error STATUS 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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000367# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000370 as_status=$1; test $as_status -eq 0 && as_status=1
371 if test "$4"; then
372 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000374 fi
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000375 $as_echo "$as_me: error: $2" >&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.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000537# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000538# so uname gets run too.
539ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
540
Martin v. Löwis11437992002-04-12 09:54:03 +0000541#
542# Initializations.
543#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544ac_default_prefix=/usr/local
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
650BLDLIBRARY
651DLLLIBRARY
652LDLIBRARY
653LIBRARY
654BUILDEXEEXT
655EGREP
656GREP
657CPP
658MAINCC
659CXX
660OBJEXT
661EXEEXT
662ac_ct_CC
663CPPFLAGS
664LDFLAGS
665CFLAGS
666CC
667EXPORT_MACOSX_DEPLOYMENT_TARGET
668CONFIGURE_MACOSX_DEPLOYMENT_TARGET
669SGI_ABI
670MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000671FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000672FRAMEWORKUNIXTOOLSPREFIX
673FRAMEWORKALTINSTALLLAST
674FRAMEWORKALTINSTALLFIRST
675FRAMEWORKINSTALLLAST
676FRAMEWORKINSTALLFIRST
677PYTHONFRAMEWORKINSTALLDIR
678PYTHONFRAMEWORKPREFIX
679PYTHONFRAMEWORKDIR
680PYTHONFRAMEWORKIDENTIFIER
681PYTHONFRAMEWORK
682LIPO_32BIT_FLAGS
683ARCH_RUN_32BIT
684UNIVERSALSDK
685CONFIG_ARGS
686SOVERSION
687VERSION
688target_alias
689host_alias
690build_alias
691LIBS
692ECHO_T
693ECHO_N
694ECHO_C
695DEFS
696mandir
697localedir
698libdir
699psdir
700pdfdir
701dvidir
702htmldir
703infodir
704docdir
705oldincludedir
706includedir
707localstatedir
708sharedstatedir
709sysconfdir
710datadir
711datarootdir
712libexecdir
713sbindir
714bindir
715program_transform_name
716prefix
717exec_prefix
718PACKAGE_URL
719PACKAGE_BUGREPORT
720PACKAGE_STRING
721PACKAGE_VERSION
722PACKAGE_TARNAME
723PACKAGE_NAME
724PATH_SEPARATOR
725SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000726ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000727ac_user_opts='
728enable_option_checking
729enable_universalsdk
730with_universal_archs
731with_framework_name
732enable_framework
733with_gcc
734with_cxx_main
735with_suffix
736enable_shared
737enable_profiling
738with_pydebug
739with_libs
740with_system_expat
741with_system_ffi
742with_dbmliborder
743with_signal_module
744with_dec_threads
745with_threads
746with_thread
747enable_ipv6
748with_doc_strings
749with_tsc
750with_pymalloc
751with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000752with_fpectl
753with_libm
754with_libc
755enable_big_digits
756with_wide_unicode
757with_computed_gotos
758'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000759 ac_precious_vars='build_alias
760host_alias
761target_alias
762CC
763CFLAGS
764LDFLAGS
765LIBS
766CPPFLAGS
767CPP'
768
Guido van Rossum627b2d71993-12-24 10:39:16 +0000769
Guido van Rossum7f43da71994-08-01 12:15:30 +0000770# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000771ac_init_help=
772ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000773ac_unrecognized_opts=
774ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000775# The variables have the same names as the options, with
776# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000777cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000778exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000779no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000780no_recursion=
781prefix=NONE
782program_prefix=NONE
783program_suffix=NONE
784program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000786site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000787srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000789x_includes=NONE
790x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000791
792# Installation directory options.
793# These are left unexpanded so users can "make install exec_prefix=/foo"
794# and all the variables that are supposed to be based on exec_prefix
795# by default will actually change.
796# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000797# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000798bindir='${exec_prefix}/bin'
799sbindir='${exec_prefix}/sbin'
800libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000801datarootdir='${prefix}/share'
802datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000803sysconfdir='${prefix}/etc'
804sharedstatedir='${prefix}/com'
805localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000806includedir='${prefix}/include'
807oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000808docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
809infodir='${datarootdir}/info'
810htmldir='${docdir}'
811dvidir='${docdir}'
812pdfdir='${docdir}'
813psdir='${docdir}'
814libdir='${exec_prefix}/lib'
815localedir='${datarootdir}/locale'
816mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000817
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000819ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000821do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822 # If the previous option needs an argument, assign it.
823 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000824 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825 ac_prev=
826 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000827 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000829 case $ac_option in
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000830 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
831 *=) ac_optarg= ;;
832 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000835 # Accept the important Cygnus configure options, so we can diagnose typos.
836
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 case $ac_dashdash$ac_option in
838 --)
839 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 -bindir | --bindir | --bindi | --bind | --bin | --bi)
842 ac_prev=bindir ;;
843 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845
846 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000847 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000848 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 -cache-file | --cache-file | --cache-fil | --cache-fi \
852 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
853 ac_prev=cache_file ;;
854 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
855 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000856 cache_file=$ac_optarg ;;
857
858 --config-cache | -C)
859 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000864 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000865
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
867 | --dataroo | --dataro | --datar)
868 ac_prev=datarootdir ;;
869 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
870 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
871 datarootdir=$ac_optarg ;;
872
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000874 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000876 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000877 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000878 ac_useropt_orig=$ac_useropt
879 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
880 case $ac_user_opts in
881 *"
882"enable_$ac_useropt"
883"*) ;;
884 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
885 ac_unrecognized_sep=', ';;
886 esac
887 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888
889 -docdir | --docdir | --docdi | --doc | --do)
890 ac_prev=docdir ;;
891 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
892 docdir=$ac_optarg ;;
893
894 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
895 ac_prev=dvidir ;;
896 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
897 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898
899 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000900 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000902 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000903 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000904 ac_useropt_orig=$ac_useropt
905 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
906 case $ac_user_opts in
907 *"
908"enable_$ac_useropt"
909"*) ;;
910 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
911 ac_unrecognized_sep=', ';;
912 esac
913 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
916 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
917 | --exec | --exe | --ex)
918 ac_prev=exec_prefix ;;
919 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
920 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
921 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
924 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925 # Obsolete; use --with-gas.
926 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 -help | --help | --hel | --he | -h)
929 ac_init_help=long ;;
930 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
931 ac_init_help=recursive ;;
932 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
933 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
935 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000940 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
941 ac_prev=htmldir ;;
942 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
943 | --ht=*)
944 htmldir=$ac_optarg ;;
945
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 -includedir | --includedir | --includedi | --included | --include \
947 | --includ | --inclu | --incl | --inc)
948 ac_prev=includedir ;;
949 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
950 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
953 -infodir | --infodir | --infodi | --infod | --info | --inf)
954 ac_prev=infodir ;;
955 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
958 -libdir | --libdir | --libdi | --libd)
959 ac_prev=libdir ;;
960 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962
963 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
964 | --libexe | --libex | --libe)
965 ac_prev=libexecdir ;;
966 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
967 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000970 -localedir | --localedir | --localedi | --localed | --locale)
971 ac_prev=localedir ;;
972 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
973 localedir=$ac_optarg ;;
974
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977 ac_prev=localstatedir ;;
978 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981
982 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
983 ac_prev=mandir ;;
984 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988 # Obsolete; use --without-fp.
989 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000992 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993 no_create=yes ;;
994
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
996 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
997 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1000 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1001 | --oldin | --oldi | --old | --ol | --o)
1002 ac_prev=oldincludedir ;;
1003 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1004 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1005 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1009 ac_prev=prefix ;;
1010 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
1013 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1014 | --program-pre | --program-pr | --program-p)
1015 ac_prev=program_prefix ;;
1016 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1017 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
1020 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1021 | --program-suf | --program-su | --program-s)
1022 ac_prev=program_suffix ;;
1023 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1024 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -program-transform-name | --program-transform-name \
1028 | --program-transform-nam | --program-transform-na \
1029 | --program-transform-n | --program-transform- \
1030 | --program-transform | --program-transfor \
1031 | --program-transfo | --program-transf \
1032 | --program-trans | --program-tran \
1033 | --progr-tra | --program-tr | --program-t)
1034 ac_prev=program_transform_name ;;
1035 -program-transform-name=* | --program-transform-name=* \
1036 | --program-transform-nam=* | --program-transform-na=* \
1037 | --program-transform-n=* | --program-transform-=* \
1038 | --program-transform=* | --program-transfor=* \
1039 | --program-transfo=* | --program-transf=* \
1040 | --program-trans=* | --program-tran=* \
1041 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001044 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1045 ac_prev=pdfdir ;;
1046 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1047 pdfdir=$ac_optarg ;;
1048
1049 -psdir | --psdir | --psdi | --psd | --ps)
1050 ac_prev=psdir ;;
1051 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1052 psdir=$ac_optarg ;;
1053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1055 | -silent | --silent | --silen | --sile | --sil)
1056 silent=yes ;;
1057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1059 ac_prev=sbindir ;;
1060 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1061 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
1064 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1065 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1066 | --sharedst | --shareds | --shared | --share | --shar \
1067 | --sha | --sh)
1068 ac_prev=sharedstatedir ;;
1069 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1070 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1071 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1072 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 -site | --site | --sit)
1076 ac_prev=site ;;
1077 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1081 ac_prev=srcdir ;;
1082 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1086 | --syscon | --sysco | --sysc | --sys | --sy)
1087 ac_prev=sysconfdir ;;
1088 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1089 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1098 verbose=yes ;;
1099
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 -version | --version | --versio | --versi | --vers | -V)
1101 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001104 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001106 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001107 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001108 ac_useropt_orig=$ac_useropt
1109 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1110 case $ac_user_opts in
1111 *"
1112"with_$ac_useropt"
1113"*) ;;
1114 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1115 ac_unrecognized_sep=', ';;
1116 esac
1117 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001120 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001121 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001122 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001123 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001124 ac_useropt_orig=$ac_useropt
1125 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1126 case $ac_user_opts in
1127 *"
1128"with_$ac_useropt"
1129"*) ;;
1130 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1131 ac_unrecognized_sep=', ';;
1132 esac
1133 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 --x)
1136 # Obsolete; use --with-x.
1137 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
1139 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1140 | --x-incl | --x-inc | --x-in | --x-i)
1141 ac_prev=x_includes ;;
1142 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1143 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145
1146 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1147 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1148 ac_prev=x_libraries ;;
1149 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1150 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001153 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1154Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155 ;;
1156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 *=*)
1158 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1159 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001160 case $ac_envvar in #(
1161 '' | [0-9]* | *[!_$as_cr_alnum]* )
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001162 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001163 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001164 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 export $ac_envvar ;;
1166
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001171 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 ;;
1174
1175 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001176done
1177
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001180 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181fi
1182
Matthias Kloseb9621712010-04-24 17:59:49 +00001183if test -n "$ac_unrecognized_opts"; then
1184 case $enable_option_checking in
1185 no) ;;
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001186 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1188 esac
1189fi
1190
1191# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001192for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1193 datadir sysconfdir sharedstatedir localstatedir includedir \
1194 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1195 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001197 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 # Remove trailing slashes.
1199 case $ac_val in
1200 */ )
1201 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1202 eval $ac_var=\$ac_val;;
1203 esac
1204 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001206 [\\/$]* | ?:[\\/]* ) continue;;
1207 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001209 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001210done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211
Martin v. Löwis11437992002-04-12 09:54:03 +00001212# There might be people who depend on the old broken behavior: `$host'
1213# used to hold the argument of --host etc.
1214# FIXME: To remove some day.
1215build=$build_alias
1216host=$host_alias
1217target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001218
Martin v. Löwis11437992002-04-12 09:54:03 +00001219# FIXME: To remove some day.
1220if test "x$host_alias" != x; then
1221 if test "x$build_alias" = x; then
1222 cross_compiling=maybe
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001223 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1224 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001225 elif test "x$build_alias" != "x$host_alias"; then
1226 cross_compiling=yes
1227 fi
1228fi
1229
1230ac_tool_prefix=
1231test -n "$host_alias" && ac_tool_prefix=$host_alias-
1232
1233test "$silent" = yes && exec 6>/dev/null
1234
Guido van Rossum627b2d71993-12-24 10:39:16 +00001235
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001236ac_pwd=`pwd` && test -n "$ac_pwd" &&
1237ac_ls_di=`ls -di .` &&
1238ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001239 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001240test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001241 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242
1243
Guido van Rossum627b2d71993-12-24 10:39:16 +00001244# Find the source files, if location was not specified.
1245if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001248 ac_confdir=`$as_dirname -- "$as_myself" ||
1249$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1250 X"$as_myself" : 'X\(//\)[^/]' \| \
1251 X"$as_myself" : 'X\(//\)$' \| \
1252 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1253$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001254 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1255 s//\1/
1256 q
1257 }
1258 /^X\(\/\/\)[^/].*/{
1259 s//\1/
1260 q
1261 }
1262 /^X\(\/\/\)$/{
1263 s//\1/
1264 q
1265 }
1266 /^X\(\/\).*/{
1267 s//\1/
1268 q
1269 }
1270 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001272 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273 srcdir=..
1274 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001275else
1276 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278if test ! -r "$srcdir/$ac_unique_file"; then
1279 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001280 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1283ac_abs_confdir=`(
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001284 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285 pwd)`
1286# When building in place, set srcdir=.
1287if test "$ac_abs_confdir" = "$ac_pwd"; then
1288 srcdir=.
1289fi
1290# Remove unnecessary trailing slashes from srcdir.
1291# Double slashes in file names in object file debugging info
1292# mess up M-x gdb in Emacs.
1293case $srcdir in
1294*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1295esac
1296for ac_var in $ac_precious_vars; do
1297 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1298 eval ac_env_${ac_var}_value=\$${ac_var}
1299 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1300 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1301done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302
Martin v. Löwis11437992002-04-12 09:54:03 +00001303#
1304# Report the --help message.
1305#
1306if test "$ac_init_help" = "long"; then
1307 # Omit some internal or obsolete options to make the list less imposing.
1308 # This message is too long to be a string in the A/UX 3.1 sh.
1309 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001310\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001311
1312Usage: $0 [OPTION]... [VAR=VALUE]...
1313
1314To assign environment variables (e.g., CC, CFLAGS...), specify them as
1315VAR=VALUE. See below for descriptions of some of the useful variables.
1316
1317Defaults for the options are specified in brackets.
1318
1319Configuration:
1320 -h, --help display this help and exit
1321 --help=short display options specific to this package
1322 --help=recursive display the short help of all the included packages
1323 -V, --version display version information and exit
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001324 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001325 --cache-file=FILE cache test results in FILE [disabled]
1326 -C, --config-cache alias for \`--cache-file=config.cache'
1327 -n, --no-create do not create output files
1328 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1329
Martin v. Löwis11437992002-04-12 09:54:03 +00001330Installation directories:
1331 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001332 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001333 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001334 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001335
1336By default, \`make install' will install all the files in
1337\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1338an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1339for instance \`--prefix=\$HOME'.
1340
1341For better control, use the options below.
1342
1343Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001344 --bindir=DIR user executables [EPREFIX/bin]
1345 --sbindir=DIR system admin executables [EPREFIX/sbin]
1346 --libexecdir=DIR program executables [EPREFIX/libexec]
1347 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1348 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1349 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1350 --libdir=DIR object code libraries [EPREFIX/lib]
1351 --includedir=DIR C header files [PREFIX/include]
1352 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1353 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1354 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1355 --infodir=DIR info documentation [DATAROOTDIR/info]
1356 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1357 --mandir=DIR man documentation [DATAROOTDIR/man]
1358 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1359 --htmldir=DIR html documentation [DOCDIR]
1360 --dvidir=DIR dvi documentation [DOCDIR]
1361 --pdfdir=DIR pdf documentation [DOCDIR]
1362 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001363_ACEOF
1364
1365 cat <<\_ACEOF
1366_ACEOF
1367fi
1368
1369if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001370 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001371 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001372 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 cat <<\_ACEOF
1374
1375Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001376 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1378 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001379 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001380 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001381 --enable-framework[=INSTALLDIR]
1382 Build (MacOSX|Darwin) framework
1383 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001384 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001385 --enable-ipv6 Enable ipv6 (with ipv4) support
1386 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001387 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001388 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001389
1390Optional Packages:
1391 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1392 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001393 --with-universal-archs=ARCH
1394 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001395 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001396 --with-framework-name=FRAMEWORK
1397 specify an alternate name of the framework built
1398 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001399 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001400 --with-cxx-main=<compiler>
1401 compile main() and link python executable with C++
1402 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001403 --with-suffix=.exe set executable suffix
1404 --with-pydebug build with Py_DEBUG defined
1405 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001406 --with-system-expat build pyexpat module using an installed expat
1407 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001408 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001409 --with-dbmliborder=db1:db2:...
1410 order to check db backends for dbm. Valid value is a
1411 colon separated string with the backend names
1412 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001413 --with-signal-module disable/enable signal module
1414 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1415 --with(out)-threads[=DIRECTORY]
1416 disable/enable thread support
1417 --with(out)-thread[=DIRECTORY]
1418 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001420 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001422 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001423 --with-fpectl enable SIGFPE catching
1424 --with-libm=STRING math library
1425 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001426 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001427 --with(out)-computed-gotos
1428 Use computed gotos in evaluation loop (enabled by
1429 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001430
1431Some influential environment variables:
1432 CC C compiler command
1433 CFLAGS C compiler flags
1434 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1435 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001436 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001437 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001439 CPP C preprocessor
1440
1441Use these variables to override the choices made by `configure' or to help
1442it to find libraries and programs with nonstandard names/locations.
1443
Georg Brandle2e15612009-05-20 18:25:10 +00001444Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001445_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001446ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001447fi
1448
1449if test "$ac_init_help" = "recursive"; then
1450 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 test -d "$ac_dir" ||
1453 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1454 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001455 ac_builddir=.
1456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001457case "$ac_dir" in
1458.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1459*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001460 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001462 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001463 case $ac_top_builddir_sub in
1464 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1465 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1466 esac ;;
1467esac
1468ac_abs_top_builddir=$ac_pwd
1469ac_abs_builddir=$ac_pwd$ac_dir_suffix
1470# for backward compatibility:
1471ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001472
1473case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001474 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 ac_top_srcdir=$ac_top_builddir_sub
1477 ac_abs_top_srcdir=$ac_pwd ;;
1478 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480 ac_top_srcdir=$srcdir
1481 ac_abs_top_srcdir=$srcdir ;;
1482 *) # Relative name.
1483 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1484 ac_top_srcdir=$ac_top_build_prefix$srcdir
1485 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001486esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001488
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001489 cd "$ac_dir" || { ac_status=$?; continue; }
1490 # Check for guested configure.
1491 if test -f "$ac_srcdir/configure.gnu"; then
1492 echo &&
1493 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1494 elif test -f "$ac_srcdir/configure"; then
1495 echo &&
1496 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001497 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499 fi || ac_status=$?
1500 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001501 done
1502fi
1503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001505if $ac_init_version; then
1506 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001507python configure 3.2
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001508generated by GNU Autoconf 2.67
Martin v. Löwis11437992002-04-12 09:54:03 +00001509
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001510Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511This configure script is free software; the Free Software Foundation
1512gives unlimited permission to copy, distribute and modify it.
1513_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001516
1517## ------------------------ ##
1518## Autoconf initialization. ##
1519## ------------------------ ##
1520
1521# ac_fn_c_try_compile LINENO
1522# --------------------------
1523# Try to compile conftest.$ac_ext, and return whether this succeeded.
1524ac_fn_c_try_compile ()
1525{
1526 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1527 rm -f conftest.$ac_objext
1528 if { { ac_try="$ac_compile"
1529case "(($ac_try" in
1530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1531 *) ac_try_echo=$ac_try;;
1532esac
1533eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1534$as_echo "$ac_try_echo"; } >&5
1535 (eval "$ac_compile") 2>conftest.err
1536 ac_status=$?
1537 if test -s conftest.err; then
1538 grep -v '^ *+' conftest.err >conftest.er1
1539 cat conftest.er1 >&5
1540 mv -f conftest.er1 conftest.err
1541 fi
1542 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1543 test $ac_status = 0; } && {
1544 test -z "$ac_c_werror_flag" ||
1545 test ! -s conftest.err
1546 } && test -s conftest.$ac_objext; then :
1547 ac_retval=0
1548else
1549 $as_echo "$as_me: failed program was:" >&5
1550sed 's/^/| /' conftest.$ac_ext >&5
1551
1552 ac_retval=1
1553fi
1554 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1555 as_fn_set_status $ac_retval
1556
1557} # ac_fn_c_try_compile
1558
1559# ac_fn_c_try_cpp LINENO
1560# ----------------------
1561# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1562ac_fn_c_try_cpp ()
1563{
1564 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1565 if { { ac_try="$ac_cpp conftest.$ac_ext"
1566case "(($ac_try" in
1567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1568 *) ac_try_echo=$ac_try;;
1569esac
1570eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1571$as_echo "$ac_try_echo"; } >&5
1572 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1573 ac_status=$?
1574 if test -s conftest.err; then
1575 grep -v '^ *+' conftest.err >conftest.er1
1576 cat conftest.er1 >&5
1577 mv -f conftest.er1 conftest.err
1578 fi
1579 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001580 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001581 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1582 test ! -s conftest.err
1583 }; then :
1584 ac_retval=0
1585else
1586 $as_echo "$as_me: failed program was:" >&5
1587sed 's/^/| /' conftest.$ac_ext >&5
1588
1589 ac_retval=1
1590fi
1591 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1592 as_fn_set_status $ac_retval
1593
1594} # ac_fn_c_try_cpp
1595
1596# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1597# -------------------------------------------------------
1598# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1599# the include files in INCLUDES and setting the cache variable VAR
1600# accordingly.
1601ac_fn_c_check_header_mongrel ()
1602{
1603 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001604 if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1606$as_echo_n "checking for $2... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001607if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 $as_echo_n "(cached) " >&6
1609fi
1610eval ac_res=\$$3
1611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1612$as_echo "$ac_res" >&6; }
1613else
1614 # Is the header compilable?
1615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1616$as_echo_n "checking $2 usability... " >&6; }
1617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1618/* end confdefs.h. */
1619$4
1620#include <$2>
1621_ACEOF
1622if ac_fn_c_try_compile "$LINENO"; then :
1623 ac_header_compiler=yes
1624else
1625 ac_header_compiler=no
1626fi
1627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1629$as_echo "$ac_header_compiler" >&6; }
1630
1631# Is the header present?
1632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1633$as_echo_n "checking $2 presence... " >&6; }
1634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1635/* end confdefs.h. */
1636#include <$2>
1637_ACEOF
1638if ac_fn_c_try_cpp "$LINENO"; then :
1639 ac_header_preproc=yes
1640else
1641 ac_header_preproc=no
1642fi
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001643rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1645$as_echo "$ac_header_preproc" >&6; }
1646
1647# So? What about this header?
1648case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1649 yes:no: )
1650 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1651$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1653$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1654 ;;
1655 no:yes:* )
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1657$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1659$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1661$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1663$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1665$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001666( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001667## Report this to http://bugs.python.org/ ##
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001668## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001669 ) | sed "s/^/$as_me: WARNING: /" >&2
1670 ;;
1671esac
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1673$as_echo_n "checking for $2... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001674if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001675 $as_echo_n "(cached) " >&6
1676else
1677 eval "$3=\$ac_header_compiler"
1678fi
1679eval ac_res=\$$3
1680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1681$as_echo "$ac_res" >&6; }
1682fi
1683 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1684
1685} # ac_fn_c_check_header_mongrel
1686
1687# ac_fn_c_try_run LINENO
1688# ----------------------
1689# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1690# that executables *can* be run.
1691ac_fn_c_try_run ()
1692{
1693 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1694 if { { ac_try="$ac_link"
1695case "(($ac_try" in
1696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1697 *) ac_try_echo=$ac_try;;
1698esac
1699eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1700$as_echo "$ac_try_echo"; } >&5
1701 (eval "$ac_link") 2>&5
1702 ac_status=$?
1703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1704 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1705 { { case "(($ac_try" in
1706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1707 *) ac_try_echo=$ac_try;;
1708esac
1709eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1710$as_echo "$ac_try_echo"; } >&5
1711 (eval "$ac_try") 2>&5
1712 ac_status=$?
1713 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1714 test $ac_status = 0; }; }; then :
1715 ac_retval=0
1716else
1717 $as_echo "$as_me: program exited with status $ac_status" >&5
1718 $as_echo "$as_me: failed program was:" >&5
1719sed 's/^/| /' conftest.$ac_ext >&5
1720
1721 ac_retval=$ac_status
1722fi
1723 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1724 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1725 as_fn_set_status $ac_retval
1726
1727} # ac_fn_c_try_run
1728
1729# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1730# -------------------------------------------------------
1731# Tests whether HEADER exists and can be compiled using the include files in
1732# INCLUDES, setting the cache variable VAR accordingly.
1733ac_fn_c_check_header_compile ()
1734{
1735 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1737$as_echo_n "checking for $2... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001738if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001739 $as_echo_n "(cached) " >&6
1740else
1741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1742/* end confdefs.h. */
1743$4
1744#include <$2>
1745_ACEOF
1746if ac_fn_c_try_compile "$LINENO"; then :
1747 eval "$3=yes"
1748else
1749 eval "$3=no"
1750fi
1751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1752fi
1753eval ac_res=\$$3
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1755$as_echo "$ac_res" >&6; }
1756 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1757
1758} # ac_fn_c_check_header_compile
1759
1760# ac_fn_c_try_link LINENO
1761# -----------------------
1762# Try to link conftest.$ac_ext, and return whether this succeeded.
1763ac_fn_c_try_link ()
1764{
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1766 rm -f conftest.$ac_objext conftest$ac_exeext
1767 if { { ac_try="$ac_link"
1768case "(($ac_try" in
1769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1770 *) ac_try_echo=$ac_try;;
1771esac
1772eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1773$as_echo "$ac_try_echo"; } >&5
1774 (eval "$ac_link") 2>conftest.err
1775 ac_status=$?
1776 if test -s conftest.err; then
1777 grep -v '^ *+' conftest.err >conftest.er1
1778 cat conftest.er1 >&5
1779 mv -f conftest.er1 conftest.err
1780 fi
1781 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782 test $ac_status = 0; } && {
1783 test -z "$ac_c_werror_flag" ||
1784 test ! -s conftest.err
1785 } && test -s conftest$ac_exeext && {
1786 test "$cross_compiling" = yes ||
1787 $as_test_x conftest$ac_exeext
1788 }; then :
1789 ac_retval=0
1790else
1791 $as_echo "$as_me: failed program was:" >&5
1792sed 's/^/| /' conftest.$ac_ext >&5
1793
1794 ac_retval=1
1795fi
1796 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1797 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1798 # interfere with the next link command; also delete a directory that is
1799 # left behind by Apple's compiler. We do this before executing the actions.
1800 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1801 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1802 as_fn_set_status $ac_retval
1803
1804} # ac_fn_c_try_link
1805
1806# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1807# -------------------------------------------
1808# Tests whether TYPE exists after having included INCLUDES, setting cache
1809# variable VAR accordingly.
1810ac_fn_c_check_type ()
1811{
1812 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1814$as_echo_n "checking for $2... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001815if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001816 $as_echo_n "(cached) " >&6
1817else
1818 eval "$3=no"
1819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1820/* end confdefs.h. */
1821$4
1822int
1823main ()
1824{
1825if (sizeof ($2))
1826 return 0;
1827 ;
1828 return 0;
1829}
1830_ACEOF
1831if ac_fn_c_try_compile "$LINENO"; then :
1832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1833/* end confdefs.h. */
1834$4
1835int
1836main ()
1837{
1838if (sizeof (($2)))
1839 return 0;
1840 ;
1841 return 0;
1842}
1843_ACEOF
1844if ac_fn_c_try_compile "$LINENO"; then :
1845
1846else
1847 eval "$3=yes"
1848fi
1849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1850fi
1851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
1856 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1857
1858} # ac_fn_c_check_type
1859
1860# ac_fn_c_find_uintX_t LINENO BITS VAR
1861# ------------------------------------
1862# Finds an unsigned integer type with width BITS, setting cache variable VAR
1863# accordingly.
1864ac_fn_c_find_uintX_t ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1868$as_echo_n "checking for uint$2_t... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001869if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001870 $as_echo_n "(cached) " >&6
1871else
1872 eval "$3=no"
1873 # Order is important - never check a type that is potentially smaller
1874 # than half of the expected target width.
1875 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1876 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1878/* end confdefs.h. */
1879$ac_includes_default
1880int
1881main ()
1882{
1883static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1884test_array [0] = 0
1885
1886 ;
1887 return 0;
1888}
1889_ACEOF
1890if ac_fn_c_try_compile "$LINENO"; then :
1891 case $ac_type in #(
1892 uint$2_t) :
1893 eval "$3=yes" ;; #(
1894 *) :
1895 eval "$3=\$ac_type" ;;
1896esac
1897fi
1898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001899 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001900
1901else
1902 break
1903fi
1904 done
1905fi
1906eval ac_res=\$$3
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1908$as_echo "$ac_res" >&6; }
1909 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1910
1911} # ac_fn_c_find_uintX_t
1912
1913# ac_fn_c_find_intX_t LINENO BITS VAR
1914# -----------------------------------
1915# Finds a signed integer type with width BITS, setting cache variable VAR
1916# accordingly.
1917ac_fn_c_find_intX_t ()
1918{
1919 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1921$as_echo_n "checking for int$2_t... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001922if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001923 $as_echo_n "(cached) " >&6
1924else
1925 eval "$3=no"
1926 # Order is important - never check a type that is potentially smaller
1927 # than half of the expected target width.
1928 for ac_type in int$2_t 'int' 'long int' \
1929 'long long int' 'short int' 'signed char'; do
1930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1931/* end confdefs.h. */
1932$ac_includes_default
Barry Warsaw278266f2010-10-14 17:38:46 +00001933 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001934int
1935main ()
1936{
Barry Warsaw278266f2010-10-14 17:38:46 +00001937static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001938test_array [0] = 0
1939
1940 ;
1941 return 0;
1942}
1943_ACEOF
1944if ac_fn_c_try_compile "$LINENO"; then :
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$ac_includes_default
Barry Warsaw278266f2010-10-14 17:38:46 +00001948 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001949int
1950main ()
1951{
Barry Warsaw278266f2010-10-14 17:38:46 +00001952static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001953 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1954test_array [0] = 0
1955
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961
1962else
1963 case $ac_type in #(
1964 int$2_t) :
1965 eval "$3=yes" ;; #(
1966 *) :
1967 eval "$3=\$ac_type" ;;
1968esac
1969fi
1970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001973 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975else
1976 break
1977fi
1978 done
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
1983 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1984
1985} # ac_fn_c_find_intX_t
1986
1987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
2004test_array [0] = 0
2005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 ac_lo=0 ac_mid=0
2012 while :; do
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2020test_array [0] = 0
2021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_hi=$ac_mid; break
2028else
2029 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2030 if test $ac_lo -le $ac_mid; then
2031 ac_lo= ac_hi=
2032 break
2033 fi
2034 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2035fi
2036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2037 done
2038else
2039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$4
2042int
2043main ()
2044{
2045static int test_array [1 - 2 * !(($2) < 0)];
2046test_array [0] = 0
2047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 ac_hi=-1 ac_mid=-1
2054 while :; do
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2062test_array [0] = 0
2063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_lo=$ac_mid; break
2070else
2071 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2072 if test $ac_mid -le $ac_hi; then
2073 ac_lo= ac_hi=
2074 break
2075 fi
2076 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079 done
2080else
2081 ac_lo= ac_hi=
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086# Binary search between lo and hi bounds.
2087while test "x$ac_lo" != "x$ac_hi"; do
2088 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090/* end confdefs.h. */
2091$4
2092int
2093main ()
2094{
2095static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2096test_array [0] = 0
2097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_hi=$ac_mid
2104else
2105 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108done
2109case $ac_lo in #((
2110?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2111'') ac_retval=1 ;;
2112esac
2113 else
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117static long int longval () { return $2; }
2118static unsigned long int ulongval () { return $2; }
2119#include <stdio.h>
2120#include <stdlib.h>
2121int
2122main ()
2123{
2124
2125 FILE *f = fopen ("conftest.val", "w");
2126 if (! f)
2127 return 1;
2128 if (($2) < 0)
2129 {
2130 long int i = longval ();
2131 if (i != ($2))
2132 return 1;
2133 fprintf (f, "%ld", i);
2134 }
2135 else
2136 {
2137 unsigned long int i = ulongval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%lu", i);
2141 }
2142 /* Do not output a trailing newline, as this causes \r\n confusion
2143 on some platforms. */
2144 return ferror (f) || fclose (f) != 0;
2145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_run "$LINENO"; then :
2151 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2152else
2153 ac_retval=1
2154fi
2155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2156 conftest.$ac_objext conftest.beam conftest.$ac_ext
2157rm -f conftest.val
2158
2159 fi
2160 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2161 as_fn_set_status $ac_retval
2162
2163} # ac_fn_c_compute_int
2164
2165# ac_fn_c_check_func LINENO FUNC VAR
2166# ----------------------------------
2167# Tests whether FUNC exists, setting the cache variable VAR accordingly
2168ac_fn_c_check_func ()
2169{
2170 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2172$as_echo_n "checking for $2... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002173if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002174 $as_echo_n "(cached) " >&6
2175else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2180#define $2 innocuous_$2
2181
2182/* System header to define __stub macros and hopefully few prototypes,
2183 which can conflict with char $2 (); below.
2184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2185 <limits.h> exists even on freestanding compilers. */
2186
2187#ifdef __STDC__
2188# include <limits.h>
2189#else
2190# include <assert.h>
2191#endif
2192
2193#undef $2
2194
2195/* Override any GCC internal prototype to avoid an error.
2196 Use char because int might match the return type of a GCC
2197 builtin and then its argument prototype would still apply. */
2198#ifdef __cplusplus
2199extern "C"
2200#endif
2201char $2 ();
2202/* The GNU C library defines this for functions which it implements
2203 to always fail with ENOSYS. Some functions are actually named
2204 something starting with __ and the normal name is an alias. */
2205#if defined __stub_$2 || defined __stub___$2
2206choke me
2207#endif
2208
2209int
2210main ()
2211{
2212return $2 ();
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_link "$LINENO"; then :
2218 eval "$3=yes"
2219else
2220 eval "$3=no"
2221fi
2222rm -f core conftest.err conftest.$ac_objext \
2223 conftest$ac_exeext conftest.$ac_ext
2224fi
2225eval ac_res=\$$3
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2227$as_echo "$ac_res" >&6; }
2228 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2229
2230} # ac_fn_c_check_func
2231
2232# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2233# ----------------------------------------------------
2234# Tries to find if the field MEMBER exists in type AGGR, after including
2235# INCLUDES, setting cache variable VAR accordingly.
2236ac_fn_c_check_member ()
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2240$as_echo_n "checking for $2.$3... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002241if eval "test \"\${$4+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002242 $as_echo_n "(cached) " >&6
2243else
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h. */
2246$5
2247int
2248main ()
2249{
2250static $2 ac_aggr;
2251if (ac_aggr.$3)
2252return 0;
2253 ;
2254 return 0;
2255}
2256_ACEOF
2257if ac_fn_c_try_compile "$LINENO"; then :
2258 eval "$4=yes"
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262$5
2263int
2264main ()
2265{
2266static $2 ac_aggr;
2267if (sizeof ac_aggr.$3)
2268return 0;
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 eval "$4=yes"
2275else
2276 eval "$4=no"
2277fi
2278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279fi
2280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281fi
2282eval ac_res=\$$4
2283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2284$as_echo "$ac_res" >&6; }
2285 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2286
2287} # ac_fn_c_check_member
2288
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002289# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2290# ---------------------------------------------
2291# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2292# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002293ac_fn_c_check_decl ()
2294{
2295 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002296 as_decl_name=`echo $2|sed 's/ *(.*//'`
2297 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2299$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2300if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002301 $as_echo_n "(cached) " >&6
2302else
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305$4
2306int
2307main ()
2308{
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002309#ifndef $as_decl_name
2310#ifdef __cplusplus
2311 (void) $as_decl_use;
2312#else
2313 (void) $as_decl_name;
2314#endif
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; }
2331 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2332
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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002339generated by GNU Autoconf 2.67. 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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002449 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002450## Cache variables. ##
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002451## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002452 echo
2453 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002454(
2455 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2456 eval ac_val=\$$ac_var
2457 case $ac_val in #(
2458 *${as_nl}*)
2459 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2461$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac
2463 case $ac_var in #(
2464 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2466 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac ;;
2468 esac
2469 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002470 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2472 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 "s/'\''/'\''\\\\'\'''\''/g;
2475 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2476 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002477 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 esac |
2481 sort
2482)
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002484
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002485 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002486## Output variables. ##
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002487## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 echo
2489 for ac_var in $ac_subst_vars
2490 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 eval ac_val=\$$ac_var
2492 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 done | sort
2497 echo
2498
2499 if test -n "$ac_subst_files"; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002500 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501## File substitutions. ##
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002502## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_files
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513 fi
2514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 if test -s confdefs.h; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002516 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002517## confdefs.h. ##
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002518## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
2522 fi
2523 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$as_me: caught signal $ac_signal"
2525 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 rm -f core *.core core.conftest.* &&
2528 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002531for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002533done
2534ac_signal=0
2535
2536# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002538
Matthias Kloseb9621712010-04-24 17:59:49 +00002539$as_echo "/* confdefs.h */" > confdefs.h
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541# Predefined preprocessor variables.
2542
2543cat >>confdefs.h <<_ACEOF
2544#define PACKAGE_NAME "$PACKAGE_NAME"
2545_ACEOF
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_VERSION "$PACKAGE_VERSION"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_STRING "$PACKAGE_STRING"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2561_ACEOF
2562
Matthias Kloseb9621712010-04-24 17:59:49 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_URL "$PACKAGE_URL"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567
2568# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002569# Prefer an explicitly selected file to automatically selected ones.
2570ac_site_file1=NONE
2571ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572if test -n "$CONFIG_SITE"; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002573 # We do not want a PATH search for config.site.
2574 case $CONFIG_SITE in #((
2575 -*) ac_site_file1=./$CONFIG_SITE;;
2576 */*) ac_site_file1=$CONFIG_SITE;;
2577 *) ac_site_file1=./$CONFIG_SITE;;
2578 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 ac_site_file1=$prefix/share/config.site
2581 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582else
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 ac_site_file1=$ac_default_prefix/share/config.site
2584 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002586for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587do
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 test "x$ac_site_file" = xNONE && continue
2589 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2590 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2591$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 sed 's/^/| /' "$ac_site_file" >&5
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002593 . "$ac_site_file" \
2594 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2596as_fn_error $? "failed to load site script $ac_site_file
2597See \`config.log' for more details" "$LINENO" 5 ; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598 fi
2599done
2600
2601if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 # Some versions of bash will fail to source /dev/null (special files
2603 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2604 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2606$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2609 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 esac
2611 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612else
Matthias Kloseb9621712010-04-24 17:59:49 +00002613 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2614$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 >$cache_file
2616fi
2617
2618# Check that the precious variables saved in the cache have kept the same
2619# value.
2620ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2623 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2625 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 case $ac_old_set,$ac_new_set in
2627 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2629$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 +00002630 ac_cache_corrupted=: ;;
2631 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2633$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 ac_cache_corrupted=: ;;
2635 ,);;
2636 *)
2637 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 # differences in whitespace do not lead to failure.
2639 ac_old_val_w=`echo x $ac_old_val`
2640 ac_new_val_w=`echo x $ac_new_val`
2641 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2643$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2644 ac_cache_corrupted=:
2645 else
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2647$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2648 eval $ac_var=\$ac_old_val
2649 fi
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2651$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2653$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 fi;;
2655 esac
2656 # Pass precious variables to config.status.
2657 if test "$ac_new_set" = set; then
2658 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 *) ac_arg=$ac_var=$ac_new_val ;;
2661 esac
2662 case " $ac_configure_args " in
2663 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 esac
2666 fi
2667done
2668if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2672$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002673 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002675## -------------------- ##
2676## Main body of script. ##
2677## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678
Guido van Rossum7f43da71994-08-01 12:15:30 +00002679ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002681ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2682ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2683ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684
Guido van Rossum627b2d71993-12-24 10:39:16 +00002685
Michael W. Hudson54241132001-12-07 15:38:26 +00002686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002687ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002688
2689
Martin v. Löwis11437992002-04-12 09:54:03 +00002690
Benjamin Petersond23f8222009-04-05 19:13:16 +00002691if test "$prefix" != "/"; then
2692 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2693fi
2694
2695
Martin v. Löwis11437992002-04-12 09:54:03 +00002696
2697
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002698# We don't use PACKAGE_ variables, and they cause conflicts
2699# with other autoconf-based packages that include Python.h
2700grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2701rm confdefs.h
2702mv confdefs.h.new confdefs.h
2703
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002704
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002705VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002706
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002707# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002708
2709SOVERSION=1.0
2710
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002711# The later defininition of _XOPEN_SOURCE disables certain features
2712# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2713
Matthias Kloseb9621712010-04-24 17:59:49 +00002714$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002715
2716
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002717# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2718# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2719# them.
2720
Matthias Kloseb9621712010-04-24 17:59:49 +00002721$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002722
2723
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002724# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2725# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2726# them.
2727
Matthias Kloseb9621712010-04-24 17:59:49 +00002728$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002729
2730
Martin v. Löwisd6320502004-08-12 13:45:08 +00002731# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2732# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2733
Matthias Kloseb9621712010-04-24 17:59:49 +00002734$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002735
2736
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002737# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2738# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2739# them.
2740
Matthias Kloseb9621712010-04-24 17:59:49 +00002741$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002742
2743
2744
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002745define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002746
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002747# Arguments passed to configure.
2748
2749CONFIG_ARGS="$ac_configure_args"
2750
Matthias Kloseb9621712010-04-24 17:59:49 +00002751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2752$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002753# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002754if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002755 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002756 case $enableval in
2757 yes)
2758 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002759 if test ! -d "${enableval}"
2760 then
2761 enableval=/
2762 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002763 ;;
2764 esac
2765 case $enableval in
2766 no)
2767 UNIVERSALSDK=
2768 enable_universalsdk=
2769 ;;
2770 *)
2771 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002772 if test ! -d "${UNIVERSALSDK}"
2773 then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002774 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002775 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002776 ;;
2777 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002778
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002779
Thomas Wouters477c8d52006-05-27 19:21:47 +00002780else
2781
2782 UNIVERSALSDK=
2783 enable_universalsdk=
2784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002785fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002786
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002787if test -n "${UNIVERSALSDK}"
2788then
Matthias Kloseb9621712010-04-24 17:59:49 +00002789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2790$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002791else
Matthias Kloseb9621712010-04-24 17:59:49 +00002792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2793$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002794fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002796
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002797
2798
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002799UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002800
Matthias Kloseb9621712010-04-24 17:59:49 +00002801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2802$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002803
2804# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002805if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002806 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2808$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002809 UNIVERSAL_ARCHS="$withval"
2810
2811else
2812
Matthias Kloseb9621712010-04-24 17:59:49 +00002813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2814$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002815
2816fi
2817
2818
2819
2820
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002821
2822# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002823if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002824 withval=$with_framework_name;
2825 PYTHONFRAMEWORK=${withval}
2826 PYTHONFRAMEWORKDIR=${withval}.framework
2827 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2828
2829else
2830
2831 PYTHONFRAMEWORK=Python
2832 PYTHONFRAMEWORKDIR=Python.framework
2833 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2834
2835fi
2836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002837# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002838if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002839 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002840 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002842 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002843 esac
2844 case $enableval in
2845 no)
2846 PYTHONFRAMEWORK=
2847 PYTHONFRAMEWORKDIR=no-framework
2848 PYTHONFRAMEWORKPREFIX=
2849 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002850 FRAMEWORKINSTALLFIRST=
2851 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002852 FRAMEWORKALTINSTALLFIRST=
2853 FRAMEWORKALTINSTALLLAST=
2854 if test "x${prefix}" = "xNONE"; then
2855 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2856 else
2857 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2858 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002859 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002860 ;;
2861 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002862 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002863 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002864 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002865 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002866 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2867 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002868 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002869
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002870 if test "x${prefix}" = "xNONE" ; then
2871 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002872
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002873 else
2874 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2875 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002876
2877 case "${enableval}" in
2878 /System*)
2879 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2880 if test "${prefix}" = "NONE" ; then
2881 # See below
2882 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2883 fi
2884 ;;
2885
2886 /Library*)
2887 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2888 ;;
2889
2890 */Library/Frameworks)
2891 MDIR="`dirname "${enableval}"`"
2892 MDIR="`dirname "${MDIR}"`"
2893 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2894
2895 if test "${prefix}" = "NONE"; then
2896 # User hasn't specified the
2897 # --prefix option, but wants to install
2898 # the framework in a non-default location,
2899 # ensure that the compatibility links get
2900 # installed relative to that prefix as well
2901 # instead of in /usr/local.
2902 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2903 fi
2904 ;;
2905
2906 *)
2907 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2908 ;;
2909 esac
2910
Jack Jansen127e56e2001-09-11 14:41:54 +00002911 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002912
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002913 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002914 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002915 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002917 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002918
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002919 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2920
2921 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2922
Jack Jansene578a632001-08-15 01:27:14 +00002923 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002924
Guido van Rossum563e7081996-09-10 18:20:48 +00002925else
Martin v. Löwis11437992002-04-12 09:54:03 +00002926
Jack Jansene578a632001-08-15 01:27:14 +00002927 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002928 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002929 PYTHONFRAMEWORKPREFIX=
2930 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002931 FRAMEWORKINSTALLFIRST=
2932 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002933 FRAMEWORKALTINSTALLFIRST=
2934 FRAMEWORKALTINSTALLLAST=
2935 if test "x${prefix}" = "xNONE" ; then
2936 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2937 else
2938 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2939 fi
Jack Jansene578a632001-08-15 01:27:14 +00002940 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002941
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002943fi
2944
Thomas Wouters477c8d52006-05-27 19:21:47 +00002945
2946
Michael W. Hudson54241132001-12-07 15:38:26 +00002947
2948
2949
2950
Jack Jansene578a632001-08-15 01:27:14 +00002951
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002952
2953
2954
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002955
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002956
Jack Jansene578a632001-08-15 01:27:14 +00002957##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002958## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002959## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002960##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002961# Set name for machine-dependent library files
2962
Matthias Kloseb9621712010-04-24 17:59:49 +00002963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2964$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002965if test -z "$MACHDEP"
2966then
Guido van Rossum563e7081996-09-10 18:20:48 +00002967 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002968 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002969 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002970 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002971 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002972 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002973 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002974 ac_md_system=`echo $ac_sys_system |
2975 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2976 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002977 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002978 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002979
Guido van Rossum07397971997-04-29 21:49:50 +00002980 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002981 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002982 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002983 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002984 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002985 esac
2986fi
Guido van Rossum91922671997-10-09 20:24:13 +00002987
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002988# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2989# disable features if it is defined, without any means to access these
2990# features as extensions. For these systems, we skip the definition of
2991# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2992# some feature, make sure there is no alternative way to access this
2993# feature. Also, when using wildcards, make sure you have verified the
2994# need for not defining _XOPEN_SOURCE on all systems matching the
2995# wildcard, and that the wildcard does not include future systems
2996# (which may remove their limitations).
2997case $ac_sys_system/$ac_sys_release in
2998 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2999 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003000 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003001 # In addition, Stefan Krah confirms that issue #1244610 exists through
3002 # OpenBSD 4.6, but is fixed in 4.7.
3003 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003004 define_xopen_source=no
3005 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3006 # also defined. This can be overridden by defining _BSD_SOURCE
3007 # As this has a different meaning on Linux, only define it on OpenBSD
3008
Matthias Kloseb9621712010-04-24 17:59:49 +00003009$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003010
3011 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003012 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003013 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3014 # also defined. This can be overridden by defining _BSD_SOURCE
3015 # As this has a different meaning on Linux, only define it on OpenBSD
3016
Matthias Kloseb9621712010-04-24 17:59:49 +00003017$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003018
3019 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003020 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3021 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3022 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003023 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 +00003024 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003025 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3026 # request to enable features supported by the standard as a request
3027 # to disable features not supported by the standard. The best way
3028 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3029 # entirely and define __EXTENSIONS__ instead.
3030 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003031 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003032 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3033 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003034 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003035 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003036 define_xopen_source=no;;
3037 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003038 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003039 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003040 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003041 # On FreeBSD 4, the math functions C89 does not cover are never defined
3042 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3043 FreeBSD/4.*)
3044 define_xopen_source=no;;
3045 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3046 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3047 # identifies itself as Darwin/7.*
3048 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3049 # disables platform specific features beyond repair.
3050 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3051 # has no effect, don't bother defining them
3052 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003053 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003054 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003055 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003056 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3057 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3058 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003059 AIX/4)
3060 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003061 AIX/5)
3062 if test `uname -r` -eq 1; then
3063 define_xopen_source=no
3064 fi
3065 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003066 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3067 # defining NI_NUMERICHOST.
3068 QNX/6.3.2)
3069 define_xopen_source=no
3070 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003071
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003072esac
3073
3074if test $define_xopen_source = yes
3075then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003076
Matthias Kloseb9621712010-04-24 17:59:49 +00003077$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003078
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003079
3080 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3081 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3082 # several APIs are not declared. Since this is also needed in some
3083 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003084
Matthias Kloseb9621712010-04-24 17:59:49 +00003085$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003086
3087
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003088
Matthias Kloseb9621712010-04-24 17:59:49 +00003089$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003090
3091
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003092fi
3093
Guido van Rossum91922671997-10-09 20:24:13 +00003094#
3095# SGI compilers allow the specification of the both the ABI and the
3096# ISA on the command line. Depending on the values of these switches,
3097# different and often incompatable code will be generated.
3098#
3099# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3100# thus supply support for various ABI/ISA combinations. The MACHDEP
3101# variable is also adjusted.
3102#
3103
3104if test ! -z "$SGI_ABI"
3105then
3106 CC="cc $SGI_ABI"
3107 LDFLAGS="$SGI_ABI $LDFLAGS"
3108 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3111$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003112
Jack Jansen6b08a402004-06-03 12:41:45 +00003113# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3114# it may influence the way we can build extensions, so distutils
3115# needs to check it
3116
Thomas Wouters477c8d52006-05-27 19:21:47 +00003117
Jack Jansen6b08a402004-06-03 12:41:45 +00003118CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003119EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003120
Matthias Kloseb9621712010-04-24 17:59:49 +00003121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3122$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003123ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3125$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003126
Guido van Rossum627b2d71993-12-24 10:39:16 +00003127# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003128
3129# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3130# for debug/optimization stuff. BASECFLAGS is for flags that are required
3131# just to get things to compile and link. Users are free to override OPT
3132# when running configure or make. The build should not break if they do.
3133# BASECFLAGS should generally not be messed with, however.
3134
3135# XXX shouldn't some/most/all of this code be merged with the stuff later
3136# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3138$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003140# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003141if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003142 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003143 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003144 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003145 without_gcc=yes;;
3146 yes) CC=gcc
3147 without_gcc=no;;
3148 *) CC=$withval
3149 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003150 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003151else
Martin v. Löwis11437992002-04-12 09:54:03 +00003152
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003153 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003154 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003155 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003156 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003157 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158fi
3159
Matthias Kloseb9621712010-04-24 17:59:49 +00003160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3161$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003162
Guido van Rossum8b131c51995-03-09 14:10:13 +00003163# If the user switches compilers, we can't believe the cache
3164if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3165then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00003166 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003167(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003168fi
3169
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003170# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3171# when the compiler supports them, but we don't always want -O2, and
3172# we set -g later.
3173if test -z "$CFLAGS"; then
3174 CFLAGS=
3175fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003176ac_ext=c
3177ac_cpp='$CPP $CPPFLAGS'
3178ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3179ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3180ac_compiler_gnu=$ac_cv_c_compiler_gnu
3181if test -n "$ac_tool_prefix"; then
3182 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3183set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185$as_echo_n "checking for $ac_word... " >&6; }
3186if test "${ac_cv_prog_CC+set}" = set; then :
3187 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003188else
3189 if test -n "$CC"; then
3190 ac_cv_prog_CC="$CC" # Let the user override the test.
3191else
Martin v. Löwis11437992002-04-12 09:54:03 +00003192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3193for as_dir in $PATH
3194do
3195 IFS=$as_save_IFS
3196 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003197 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198 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 +00003199 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003200 $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 +00003201 break 2
3202 fi
3203done
Matthias Kloseb9621712010-04-24 17:59:49 +00003204 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003206
Jack Jansendd19cf82001-12-06 22:36:17 +00003207fi
3208fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003209CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003210if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3212$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003213else
Matthias Kloseb9621712010-04-24 17:59:49 +00003214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3215$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003216fi
3217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003218
Martin v. Löwis11437992002-04-12 09:54:03 +00003219fi
3220if test -z "$ac_cv_prog_CC"; then
3221 ac_ct_CC=$CC
3222 # Extract the first word of "gcc", so it can be a program name with args.
3223set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3225$as_echo_n "checking for $ac_word... " >&6; }
3226if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3227 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003228else
3229 if test -n "$ac_ct_CC"; then
3230 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3231else
3232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3233for as_dir in $PATH
3234do
3235 IFS=$as_save_IFS
3236 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003237 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003238 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 +00003239 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003240 $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 +00003241 break 2
3242 fi
3243done
Matthias Kloseb9621712010-04-24 17:59:49 +00003244 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003245IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003246
3247fi
3248fi
3249ac_ct_CC=$ac_cv_prog_ac_ct_CC
3250if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3252$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003253else
Matthias Kloseb9621712010-04-24 17:59:49 +00003254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3255$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003256fi
3257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003258 if test "x$ac_ct_CC" = x; then
3259 CC=""
3260 else
3261 case $cross_compiling:$ac_tool_warned in
3262yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003263{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3264$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003265ac_tool_warned=yes ;;
3266esac
3267 CC=$ac_ct_CC
3268 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003269else
3270 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003271fi
3272
Jack Jansendd19cf82001-12-06 22:36:17 +00003273if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003274 if test -n "$ac_tool_prefix"; then
3275 # 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 +00003276set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3278$as_echo_n "checking for $ac_word... " >&6; }
3279if test "${ac_cv_prog_CC+set}" = set; then :
3280 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003281else
3282 if test -n "$CC"; then
3283 ac_cv_prog_CC="$CC" # Let the user override the test.
3284else
Martin v. Löwis11437992002-04-12 09:54:03 +00003285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3286for as_dir in $PATH
3287do
3288 IFS=$as_save_IFS
3289 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003290 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003291 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 +00003292 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003293 $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 +00003294 break 2
3295 fi
3296done
Matthias Kloseb9621712010-04-24 17:59:49 +00003297 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003298IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003299
3300fi
3301fi
3302CC=$ac_cv_prog_CC
3303if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3305$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003306else
Matthias Kloseb9621712010-04-24 17:59:49 +00003307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3308$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003309fi
3310
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311
Martin v. Löwis11437992002-04-12 09:54:03 +00003312 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003313fi
3314if test -z "$CC"; then
3315 # Extract the first word of "cc", so it can be a program name with args.
3316set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3318$as_echo_n "checking for $ac_word... " >&6; }
3319if test "${ac_cv_prog_CC+set}" = set; then :
3320 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003321else
3322 if test -n "$CC"; then
3323 ac_cv_prog_CC="$CC" # Let the user override the test.
3324else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003325 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3327for as_dir in $PATH
3328do
3329 IFS=$as_save_IFS
3330 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003331 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003332 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 +00003333 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3334 ac_prog_rejected=yes
3335 continue
3336 fi
3337 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003338 $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 +00003339 break 2
3340 fi
3341done
Matthias Kloseb9621712010-04-24 17:59:49 +00003342 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003343IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003344
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003345if test $ac_prog_rejected = yes; then
3346 # We found a bogon in the path, so make sure we never use it.
3347 set dummy $ac_cv_prog_CC
3348 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003349 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003350 # We chose a different compiler from the bogus one.
3351 # However, it has the same basename, so the bogon will be chosen
3352 # first if we set CC to just the basename; use the full file name.
3353 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003354 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003355 fi
3356fi
3357fi
3358fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003359CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003360if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3362$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003363else
Matthias Kloseb9621712010-04-24 17:59:49 +00003364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3365$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366fi
3367
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003368
Martin v. Löwis11437992002-04-12 09:54:03 +00003369fi
3370if test -z "$CC"; then
3371 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003372 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003373 do
3374 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3375set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3377$as_echo_n "checking for $ac_word... " >&6; }
3378if test "${ac_cv_prog_CC+set}" = set; then :
3379 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003380else
3381 if test -n "$CC"; then
3382 ac_cv_prog_CC="$CC" # Let the user override the test.
3383else
Martin v. Löwis11437992002-04-12 09:54:03 +00003384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3385for as_dir in $PATH
3386do
3387 IFS=$as_save_IFS
3388 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003389 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003390 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003391 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003392 $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 +00003393 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003394 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003395done
Matthias Kloseb9621712010-04-24 17:59:49 +00003396 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003397IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003398
3399fi
3400fi
3401CC=$ac_cv_prog_CC
3402if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3404$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003405else
Matthias Kloseb9621712010-04-24 17:59:49 +00003406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3407$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003408fi
3409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003410
Martin v. Löwis11437992002-04-12 09:54:03 +00003411 test -n "$CC" && break
3412 done
3413fi
3414if test -z "$CC"; then
3415 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003416 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003417do
3418 # Extract the first word of "$ac_prog", so it can be a program name with args.
3419set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3421$as_echo_n "checking for $ac_word... " >&6; }
3422if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3423 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003424else
3425 if test -n "$ac_ct_CC"; then
3426 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3427else
3428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3429for as_dir in $PATH
3430do
3431 IFS=$as_save_IFS
3432 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003433 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003434 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 +00003435 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003436 $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 +00003437 break 2
3438 fi
3439done
Matthias Kloseb9621712010-04-24 17:59:49 +00003440 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003441IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003442
Martin v. Löwis11437992002-04-12 09:54:03 +00003443fi
3444fi
3445ac_ct_CC=$ac_cv_prog_ac_ct_CC
3446if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3448$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003449else
Matthias Kloseb9621712010-04-24 17:59:49 +00003450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3451$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003452fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003454
Martin v. Löwis11437992002-04-12 09:54:03 +00003455 test -n "$ac_ct_CC" && break
3456done
Michael W. Hudson54241132001-12-07 15:38:26 +00003457
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458 if test "x$ac_ct_CC" = x; then
3459 CC=""
3460 else
3461 case $cross_compiling:$ac_tool_warned in
3462yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003463{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3464$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465ac_tool_warned=yes ;;
3466esac
3467 CC=$ac_ct_CC
3468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003469fi
3470
3471fi
3472
3473
Matthias Kloseb9621712010-04-24 17:59:49 +00003474test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3475$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00003476as_fn_error $? "no acceptable C compiler found in \$PATH
3477See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003478
3479# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003480$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3481set X $ac_compile
3482ac_compiler=$2
3483for ac_option in --version -v -V -qversion; do
3484 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485case "(($ac_try" in
3486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3487 *) ac_try_echo=$ac_try;;
3488esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003489eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3490$as_echo "$ac_try_echo"; } >&5
3491 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003493 if test -s conftest.err; then
3494 sed '10a\
3495... rest of stderr output deleted ...
3496 10q' conftest.err >conftest.er1
3497 cat conftest.er1 >&5
3498 fi
3499 rm -f conftest.er1 conftest.err
3500 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3501 test $ac_status = 0; }
3502done
Martin v. Löwis11437992002-04-12 09:54:03 +00003503
Matthias Kloseb9621712010-04-24 17:59:49 +00003504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003505/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003506
Martin v. Löwis11437992002-04-12 09:54:03 +00003507int
3508main ()
3509{
3510
3511 ;
3512 return 0;
3513}
3514_ACEOF
3515ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003516ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003517# Try to create an executable without -o first, disregard a.out.
3518# It will help us diagnose broken compilers, and finding out an intuition
3519# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3521$as_echo_n "checking whether the C compiler works... " >&6; }
3522ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3523
3524# The possible output files:
3525ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3526
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003527ac_rmfiles=
3528for ac_file in $ac_files
3529do
3530 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003531 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003532 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3533 esac
3534done
3535rm -f $ac_rmfiles
3536
Matthias Kloseb9621712010-04-24 17:59:49 +00003537if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003538case "(($ac_try" in
3539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3540 *) ac_try_echo=$ac_try;;
3541esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003542eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3543$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003544 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003546 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3547 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003548 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3549# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3550# in a Makefile. We should not override ac_cv_exeext if it was cached,
3551# so that the user can short-circuit this test for compilers unknown to
3552# Autoconf.
3553for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003554do
3555 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003556 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003558 ;;
3559 [ab].out )
3560 # We found the default executable, but exeext='' is most
3561 # certainly right.
3562 break;;
3563 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003564 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003565 then :; else
3566 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3567 fi
3568 # We set ac_cv_exeext here because the later test for it is not
3569 # safe: cross compilers may not add the suffix if given an `-o'
3570 # argument, so we may need to know it at that point already.
3571 # Even if this section looks crufty: it has the advantage of
3572 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003573 break;;
3574 * )
3575 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 esac
3577done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003578test "$ac_cv_exeext" = no && ac_cv_exeext=
3579
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003580else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003581 ac_file=''
3582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003583if test -z "$ac_file"; then :
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3585$as_echo "no" >&6; }
3586$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003587sed 's/^/| /' conftest.$ac_ext >&5
3588
Matthias Kloseb9621712010-04-24 17:59:49 +00003589{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00003591as_fn_error 77 "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;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +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;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00003692as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003693If you meant to cross compile, use \`--host'.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +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; }
3705if test "${ac_cv_objext+set}" = set; then :
3706 $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;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +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; }
3756if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3757 $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; }
3793if test "${ac_cv_prog_cc_g+set}" = set; then :
3794 $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; }
3871if test "${ac_cv_prog_cc_c89+set}" = set; then :
3872 $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; }
4006if test "${ac_cv_path_CXX+set}" = set; then :
4007 $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; }
4047if test "${ac_cv_path_CXX+set}" = set; then :
4048 $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; }
4098if test "${ac_cv_prog_CXX+set}" = set; then :
4099 $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
Matthias Kloseb9621712010-04-24 17:59:49 +00004169 if test "${ac_cv_prog_CPP+set}" = set; then :
4170 $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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004199rm -f conftest.err conftest.i 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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004215rm -f conftest.err conftest.i 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.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004219rm -f conftest.i 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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004258rm -f conftest.err conftest.i 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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004274rm -f conftest.err conftest.i 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.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004278rm -f conftest.i 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;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +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; }
4297if test "${ac_cv_path_GREP+set}" = set; then :
4298 $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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +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; }
4360if test "${ac_cv_path_EGREP+set}" = set; then :
4361 $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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +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; }
4427if test "${ac_cv_header_stdc+set}" = set; then :
4428 $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"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004544if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004545 cat >>confdefs.h <<_ACEOF
4546#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4547_ACEOF
4548
4549fi
4550
4551done
4552
4553
4554
4555 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4556if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4557 MINIX=yes
4558else
4559 MINIX=
4560fi
4561
4562
4563 if test "$MINIX" = yes; then
4564
4565$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4566
4567
4568$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4569
4570
4571$as_echo "#define _MINIX 1" >>confdefs.h
4572
4573 fi
4574
4575
4576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4577$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4578if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4579 $as_echo_n "(cached) " >&6
4580else
4581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4582/* end confdefs.h. */
4583
4584# define __EXTENSIONS__ 1
4585 $ac_includes_default
4586int
4587main ()
4588{
4589
4590 ;
4591 return 0;
4592}
4593_ACEOF
4594if ac_fn_c_try_compile "$LINENO"; then :
4595 ac_cv_safe_to_define___extensions__=yes
4596else
4597 ac_cv_safe_to_define___extensions__=no
4598fi
4599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4600fi
4601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4602$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4603 test $ac_cv_safe_to_define___extensions__ = yes &&
4604 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4605
4606 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4607
4608 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4609
4610 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4611
4612 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4613
4614
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004616# Check for unsupported systems
4617case $ac_sys_system/$ac_sys_release in
4618atheos*|Linux*/1*)
4619 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4620 echo See README for details.
4621 exit 1;;
4622esac
4623
4624
Matthias Kloseb9621712010-04-24 17:59:49 +00004625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4626$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004627
4628# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004629if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004630 withval=$with_suffix;
4631 case $withval in
4632 no) EXEEXT=;;
4633 yes) EXEEXT=.exe;;
4634 *) EXEEXT=$withval;;
4635 esac
4636fi
4637
Matthias Kloseb9621712010-04-24 17:59:49 +00004638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4639$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004640
4641# Test whether we're running on a non-case-sensitive system, in which
4642# case we give a warning if no ext is given
4643
Matthias Kloseb9621712010-04-24 17:59:49 +00004644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4645$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004646if test ! -d CaseSensitiveTestDir; then
4647mkdir CaseSensitiveTestDir
4648fi
4649
4650if test -d casesensitivetestdir
4651then
Matthias Kloseb9621712010-04-24 17:59:49 +00004652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4653$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004654 BUILDEXEEXT=.exe
4655else
Matthias Kloseb9621712010-04-24 17:59:49 +00004656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004658 BUILDEXEEXT=$EXEEXT
4659fi
4660rmdir CaseSensitiveTestDir
4661
4662case $MACHDEP in
4663bsdos*)
4664 case $CC in
4665 gcc) CC="$CC -D_HAVE_BSDI";;
4666 esac;;
4667esac
4668
4669case $ac_sys_system in
4670hp*|HP*)
4671 case $CC in
4672 cc|*/cc) CC="$CC -Ae";;
4673 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004674esac
4675
4676
4677
Matthias Kloseb9621712010-04-24 17:59:49 +00004678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4679$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004680if test -z "$LIBRARY"
4681then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004682 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4685$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004686
4687# LDLIBRARY is the name of the library to link against (as opposed to the
4688# name of the library into which to insert object files). BLDLIBRARY is also
4689# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4690# is blank as the main program is not linked directly against LDLIBRARY.
4691# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4692# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4693# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4694# DLLLIBRARY is the shared (i.e., DLL) library.
4695#
4696# RUNSHARED is used to run shared python without installed libraries
4697#
4698# INSTSONAME is the name of the shared library that will be use to install
4699# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004700#
4701# LDVERSION is the shared library version number, normally the Python version
4702# with the ABI build flags appended.
4703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004704
4705
4706
4707
4708
4709
4710LDLIBRARY="$LIBRARY"
4711BLDLIBRARY='$(LDLIBRARY)'
4712INSTSONAME='$(LDLIBRARY)'
4713DLLLIBRARY=''
4714LDLIBRARYDIR=''
4715RUNSHARED=''
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004716LDVERSION="$(VERSION)"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004717
4718# LINKCC is the command that links the python executable -- default is $(CC).
4719# If CXX is set, and if it is needed to link a main function that was
4720# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4721# python might then depend on the C++ runtime
4722# This is altered for AIX in order to build the export list before
4723# linking.
4724
Matthias Kloseb9621712010-04-24 17:59:49 +00004725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4726$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004727if test -z "$LINKCC"
4728then
4729 LINKCC='$(PURIFY) $(MAINCC)'
4730 case $ac_sys_system in
4731 AIX*)
4732 exp_extra="\"\""
4733 if test $ac_sys_release -ge 5 -o \
4734 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4735 exp_extra="."
4736 fi
4737 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004738 QNX*)
4739 # qcc must be used because the other compilers do not
4740 # support -N.
4741 LINKCC=qcc;;
4742 esac
4743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4745$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004746
4747# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4748# make sure we default having it set to "no": this is used by
4749# distutils.unixccompiler to know if it should add --enable-new-dtags
4750# to linker command lines, and failing to detect GNU ld simply results
4751# in the same bahaviour as before.
4752
Matthias Kloseb9621712010-04-24 17:59:49 +00004753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4754$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004755ac_prog=ld
4756if test "$GCC" = yes; then
4757 ac_prog=`$CC -print-prog-name=ld`
4758fi
4759case `"$ac_prog" -V 2>&1 < /dev/null` in
4760 *GNU*)
4761 GNULD=yes;;
4762 *)
4763 GNULD=no;;
4764esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4766$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004767
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4769$as_echo_n "checking for inline... " >&6; }
4770if test "${ac_cv_c_inline+set}" = set; then :
4771 $as_echo_n "(cached) " >&6
4772else
4773 ac_cv_c_inline=no
4774for ac_kw in inline __inline__ __inline; do
4775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4776/* end confdefs.h. */
4777#ifndef __cplusplus
4778typedef int foo_t;
4779static $ac_kw foo_t static_foo () {return 0; }
4780$ac_kw foo_t foo () {return 0; }
4781#endif
4782
4783_ACEOF
4784if ac_fn_c_try_compile "$LINENO"; then :
4785 ac_cv_c_inline=$ac_kw
4786fi
4787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4788 test "$ac_cv_c_inline" != no && break
4789done
4790
4791fi
4792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4793$as_echo "$ac_cv_c_inline" >&6; }
4794
4795case $ac_cv_c_inline in
4796 inline | yes) ;;
4797 *)
4798 case $ac_cv_c_inline in
4799 no) ac_val=;;
4800 *) ac_val=$ac_cv_c_inline;;
4801 esac
4802 cat >>confdefs.h <<_ACEOF
4803#ifndef __cplusplus
4804#define inline $ac_val
4805#endif
4806_ACEOF
4807 ;;
4808esac
4809
4810if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004811
4812$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004813
4814
4815fi
4816
4817
Matthias Kloseb9621712010-04-24 17:59:49 +00004818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4819$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004820# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004821if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822 enableval=$enable_shared;
4823fi
4824
4825
4826if test -z "$enable_shared"
4827then
4828 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004829 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004830 enable_shared="yes";;
4831 *)
4832 enable_shared="no";;
4833 esac
4834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4836$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004837
Matthias Kloseb9621712010-04-24 17:59:49 +00004838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4839$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004841if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842 enableval=$enable_profiling; ac_save_cc="$CC"
4843 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845 ac_enable_profiling="no"
4846else
Matthias Kloseb9621712010-04-24 17:59:49 +00004847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848/* end confdefs.h. */
4849int main() { return 0; }
4850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004851if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852 ac_enable_profiling="yes"
4853else
Matthias Kloseb9621712010-04-24 17:59:49 +00004854 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4857 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004858fi
4859
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004860 CC="$ac_save_cc"
4861fi
4862
Matthias Kloseb9621712010-04-24 17:59:49 +00004863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4864$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865
4866case "$ac_enable_profiling" in
4867 "yes")
4868 BASECFLAGS="-pg $BASECFLAGS"
4869 LDFLAGS="-pg $LDFLAGS"
4870 ;;
4871esac
4872
Matthias Kloseb9621712010-04-24 17:59:49 +00004873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4874$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004875
4876# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4877# library that we build, but we do not want to link against it (we
4878# will find it with a -framework option). For this reason there is an
4879# extra variable BLDLIBRARY against which Python and the extension
4880# modules are linked, BLDLIBRARY. This is normally the same as
4881# LDLIBRARY, but empty for MacOSX framework builds.
4882if test "$enable_framework"
4883then
4884 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4885 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4886 BLDLIBRARY=''
4887else
4888 BLDLIBRARY='$(LDLIBRARY)'
4889fi
4890
4891# Other platforms follow
4892if test $enable_shared = "yes"; then
4893
Matthias Kloseb9621712010-04-24 17:59:49 +00004894$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004895
4896 case $ac_sys_system in
4897 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004898 LDLIBRARY='libpython$(LDVERSION).dll.a'
4899 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900 ;;
4901 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004902 LDLIBRARY='libpython$(LDVERSION).so'
4903 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004904 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4905 INSTSONAME="$LDLIBRARY".$SOVERSION
4906 ;;
4907 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004908 LDLIBRARY='libpython$(LDVERSION).so'
4909 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4911 case $ac_sys_system in
4912 FreeBSD*)
4913 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4914 ;;
4915 esac
4916 INSTSONAME="$LDLIBRARY".$SOVERSION
4917 ;;
4918 hp*|HP*)
4919 case `uname -m` in
4920 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004921 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004922 ;;
4923 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004924 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925 ;;
4926 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004927 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4929 ;;
4930 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004931 LDLIBRARY='libpython$(LDVERSION).so'
4932 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004933 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4934 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004936 LDLIBRARY='libpython$(LDVERSION).dylib'
4937 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4939 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004940 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004941 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004942 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4943 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004944
4945 esac
4946else # shared is disabled
4947 case $ac_sys_system in
4948 CYGWIN*)
4949 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004950 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951 ;;
4952 esac
4953fi
4954
Matthias Kloseb9621712010-04-24 17:59:49 +00004955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4956$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957
4958if test -n "$ac_tool_prefix"; then
4959 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4960set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4962$as_echo_n "checking for $ac_word... " >&6; }
4963if test "${ac_cv_prog_RANLIB+set}" = set; then :
4964 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965else
4966 if test -n "$RANLIB"; then
4967 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4968else
4969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4970for as_dir in $PATH
4971do
4972 IFS=$as_save_IFS
4973 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004974 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4976 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004977 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 break 2
4979 fi
4980done
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982IFS=$as_save_IFS
4983
4984fi
4985fi
4986RANLIB=$ac_cv_prog_RANLIB
4987if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4989$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004990else
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4992$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993fi
4994
4995
4996fi
4997if test -z "$ac_cv_prog_RANLIB"; then
4998 ac_ct_RANLIB=$RANLIB
4999 # Extract the first word of "ranlib", so it can be a program name with args.
5000set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
5003if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5004 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005else
5006 if test -n "$ac_ct_RANLIB"; then
5007 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5008else
5009as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5010for as_dir in $PATH
5011do
5012 IFS=$as_save_IFS
5013 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005014 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5016 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005017 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018 break 2
5019 fi
5020done
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005022IFS=$as_save_IFS
5023
5024fi
5025fi
5026ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5027if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5029$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030else
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5032$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033fi
5034
5035 if test "x$ac_ct_RANLIB" = x; then
5036 RANLIB=":"
5037 else
5038 case $cross_compiling:$ac_tool_warned in
5039yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005040{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5041$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042ac_tool_warned=yes ;;
5043esac
5044 RANLIB=$ac_ct_RANLIB
5045 fi
5046else
5047 RANLIB="$ac_cv_prog_RANLIB"
5048fi
5049
5050
5051for ac_prog in ar aal
5052do
5053 # Extract the first word of "$ac_prog", so it can be a program name with args.
5054set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5056$as_echo_n "checking for $ac_word... " >&6; }
5057if test "${ac_cv_prog_AR+set}" = set; then :
5058 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059else
5060 if test -n "$AR"; then
5061 ac_cv_prog_AR="$AR" # Let the user override the test.
5062else
5063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5064for as_dir in $PATH
5065do
5066 IFS=$as_save_IFS
5067 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5070 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072 break 2
5073 fi
5074done
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005076IFS=$as_save_IFS
5077
5078fi
5079fi
5080AR=$ac_cv_prog_AR
5081if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5083$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084else
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5086$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087fi
5088
5089
5090 test -n "$AR" && break
5091done
5092test -n "$AR" || AR="ar"
5093
5094
5095# tweak ARFLAGS only if the user didn't set it on the command line
5096
5097if test -z "$ARFLAGS"
5098then
5099 ARFLAGS="rc"
5100fi
5101
5102
5103# Extract the first word of "svnversion", so it can be a program name with args.
5104set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5106$as_echo_n "checking for $ac_word... " >&6; }
5107if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5108 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109else
5110 if test -n "$SVNVERSION"; then
5111 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5112else
5113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5114for as_dir in $PATH
5115do
5116 IFS=$as_save_IFS
5117 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5120 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005122 break 2
5123 fi
5124done
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126IFS=$as_save_IFS
5127
5128 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5129fi
5130fi
5131SVNVERSION=$ac_cv_prog_SVNVERSION
5132if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5134$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005135else
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5137$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138fi
5139
5140
5141if test $SVNVERSION = found
5142then
5143 SVNVERSION="svnversion \$(srcdir)"
5144else
5145 SVNVERSION="echo Unversioned directory"
5146fi
5147
5148case $MACHDEP in
5149bsdos*|hp*|HP*)
5150 # install -d does not work on BSDI or HP-UX
5151 if test -z "$INSTALL"
5152 then
5153 INSTALL="${srcdir}/install-sh -c"
5154 fi
5155esac
5156ac_aux_dir=
5157for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005158 if test -f "$ac_dir/install-sh"; then
5159 ac_aux_dir=$ac_dir
5160 ac_install_sh="$ac_aux_dir/install-sh -c"
5161 break
5162 elif test -f "$ac_dir/install.sh"; then
5163 ac_aux_dir=$ac_dir
5164 ac_install_sh="$ac_aux_dir/install.sh -c"
5165 break
5166 elif test -f "$ac_dir/shtool"; then
5167 ac_aux_dir=$ac_dir
5168 ac_install_sh="$ac_aux_dir/shtool install -c"
5169 break
5170 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005171done
5172if test -z "$ac_aux_dir"; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005173 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005174fi
5175
5176# These three variables are undocumented and unsupported,
5177# and are intended to be withdrawn in a future Autoconf release.
5178# They can cause serious problems if a builder's source tree is in a directory
5179# whose full name contains unusual characters.
5180ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5181ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5182ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5183
5184
5185# Find a good install program. We prefer a C program (faster),
5186# so one script is as good as another. But avoid the broken or
5187# incompatible versions:
5188# SysV /etc/install, /usr/sbin/install
5189# SunOS /usr/etc/install
5190# IRIX /sbin/install
5191# AIX /bin/install
5192# AmigaOS /C/install, which installs bootblocks on floppy discs
5193# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5194# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5195# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5196# OS/2's system install, which has a completely different semantic
5197# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005198# Reject install programs that cannot install multiple files.
5199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5200$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005201if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005202if test "${ac_cv_path_install+set}" = set; then :
5203 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005204else
5205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5206for as_dir in $PATH
5207do
5208 IFS=$as_save_IFS
5209 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005210 # Account for people who put trailing slashes in PATH elements.
5211case $as_dir/ in #((
5212 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005213 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005214 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005215 /usr/ucb/* ) ;;
5216 *)
5217 # OSF1 and SCO ODT 3.0 have their own names for install.
5218 # Don't use installbsd from OSF since it installs stuff as root
5219 # by default.
5220 for ac_prog in ginstall scoinst install; do
5221 for ac_exec_ext in '' $ac_executable_extensions; do
5222 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5223 if test $ac_prog = install &&
5224 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5225 # AIX install. It has an incompatible calling convention.
5226 :
5227 elif test $ac_prog = install &&
5228 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5229 # program-specific install script used by HP pwplus--don't use.
5230 :
5231 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005232 rm -rf conftest.one conftest.two conftest.dir
5233 echo one > conftest.one
5234 echo two > conftest.two
5235 mkdir conftest.dir
5236 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5237 test -s conftest.one && test -s conftest.two &&
5238 test -s conftest.dir/conftest.one &&
5239 test -s conftest.dir/conftest.two
5240 then
5241 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5242 break 3
5243 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005244 fi
5245 fi
5246 done
5247 done
5248 ;;
5249esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005250
5251 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005252IFS=$as_save_IFS
5253
Matthias Kloseb9621712010-04-24 17:59:49 +00005254rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005255
5256fi
5257 if test "${ac_cv_path_install+set}" = set; then
5258 INSTALL=$ac_cv_path_install
5259 else
5260 # As a last resort, use the slow shell script. Don't cache a
5261 # value for INSTALL within a source directory, because that will
5262 # break other packages using the cache if that directory is
5263 # removed, or if the value is a relative name.
5264 INSTALL=$ac_install_sh
5265 fi
5266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5268$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005269
5270# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5271# It thinks the first close brace ends the variable substitution.
5272test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5273
5274test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5275
5276test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5277
5278
5279# Not every filesystem supports hard links
5280
5281if test -z "$LN" ; then
5282 case $ac_sys_system in
5283 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005284 *) LN=ln;;
5285 esac
5286fi
5287
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005288# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005289
5290ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005291
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5294$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005295
5296# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005297if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005298 withval=$with_pydebug;
5299if test "$withval" != no
5300then
5301
Matthias Kloseb9621712010-04-24 17:59:49 +00005302$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005303
Matthias Kloseb9621712010-04-24 17:59:49 +00005304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5305$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005306 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005307 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005308else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5309$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310fi
5311else
Matthias Kloseb9621712010-04-24 17:59:49 +00005312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5313$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005314fi
5315
5316
5317# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5318# merged with this chunk of code?
5319
5320# Optimizer/debugger flags
5321# ------------------------
5322# (The following bit of code is complicated enough - please keep things
5323# indented properly. Just pretend you're editing Python code. ;-)
5324
5325# There are two parallel sets of case statements below, one that checks to
5326# see if OPT was set and one that does BASECFLAGS setting based upon
5327# compiler and platform. BASECFLAGS tweaks need to be made even if the
5328# user set OPT.
5329
5330# tweak OPT based on compiler and platform, only if the user didn't set
5331# it on the command line
5332
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005333if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334then
5335 case $GCC in
5336 yes)
5337 if test "$CC" != 'g++' ; then
5338 STRICT_PROTO="-Wstrict-prototypes"
5339 fi
5340 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5341 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5342 WRAP="-fwrapv"
5343 fi
5344 case $ac_cv_prog_cc_g in
5345 yes)
5346 if test "$Py_DEBUG" = 'true' ; then
5347 # Optimization messes up debuggers, so turn it off for
5348 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005349 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005350 else
5351 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5352 fi
5353 ;;
5354 *)
5355 OPT="-O3 -Wall $STRICT_PROTO"
5356 ;;
5357 esac
5358 case $ac_sys_system in
5359 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5360 ;;
5361 esac
5362 ;;
5363
5364 *)
5365 OPT="-O"
5366 ;;
5367 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368fi
5369
5370
5371
5372# The -arch flags for universal builds on OSX
5373UNIVERSAL_ARCH_FLAGS=
5374
5375
5376# tweak BASECFLAGS based on compiler and platform
5377case $GCC in
5378yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005379 # Python doesn't violate C99 aliasing rules, but older versions of
5380 # GCC produce warnings for legal Python code. Enable
5381 # -fno-strict-aliasing on versions of GCC that support but produce
5382 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5384$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005385 ac_save_cc="$CC"
5386 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005387 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5389 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005390else
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005392/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005393
Matthias Kloseb159a552010-04-25 21:00:44 +00005394
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005395int
5396main ()
5397{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005398
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005399 ;
5400 return 0;
5401}
Matthias Kloseb159a552010-04-25 21:00:44 +00005402
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005404if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005405
5406 CC="$ac_save_cc -fstrict-aliasing"
5407 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005409/* end confdefs.h. */
5410
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005411 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005412int
5413main ()
5414{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005415double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005416 ;
5417 return 0;
5418}
Matthias Kloseb159a552010-04-25 21:00:44 +00005419
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005421if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005422
5423 ac_cv_no_strict_aliasing=no
5424
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425else
Matthias Kloseb159a552010-04-25 21:00:44 +00005426
5427 ac_cv_no_strict_aliasing=yes
5428
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005429fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005431
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005432else
Matthias Kloseb159a552010-04-25 21:00:44 +00005433
5434 ac_cv_no_strict_aliasing=no
5435
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005438fi
5439
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005440 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005441 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5443$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005444 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005445 then
5446 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5447 fi
5448
5449 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5450 # support. Without this, treatment of subnormals doesn't follow
5451 # the standard.
5452 case $ac_sys_machine in
5453 alpha*)
5454 BASECFLAGS="$BASECFLAGS -mieee"
5455 ;;
5456 esac
5457
5458 case $ac_sys_system in
5459 SCO_SV*)
5460 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5461 ;;
5462 # is there any other compiler on Darwin besides gcc?
5463 Darwin*)
5464 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5465 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005466 if test "${CC}" = gcc
5467 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5469$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005470 case "${UNIVERSALSDK}" in
5471 */MacOSX10.4u.sdk)
5472 # Build using 10.4 SDK, force usage of gcc when the
5473 # compiler is gcc, otherwise the user will get very
5474 # confusing error messages when building on OSX 10.6
5475 CC=gcc-4.0
5476 CPP=cpp-4.0
5477 ;;
5478 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5480$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005481 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005482
5483
5484 if test "${enable_universalsdk}"; then
5485 UNIVERSAL_ARCH_FLAGS=""
5486 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5487 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5488 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005489 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005490 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5491 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005492 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005493 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494
5495 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5496 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005497 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005498 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005500 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5501 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005502 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005503 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005504
5505 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5506 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005507 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005508 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005509
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510 else
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005511 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 +00005512
5513 fi
5514
5515
Ronald Oussoren666028b2010-04-18 19:07:43 +00005516 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5517 if test "${UNIVERSALSDK}" != "/"
5518 then
5519 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5520 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005521 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005522 fi
5523 fi
5524
5525 # Calculate the right deployment target for this build.
5526 #
5527 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5528 if test ${cur_target} '>' 10.2; then
5529 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005530 if test ${enable_universalsdk}; then
5531 if test "${UNIVERSAL_ARCHS}" = "all"; then
5532 # Ensure that the default platform for a
5533 # 4-way universal build is OSX 10.5,
5534 # that's the first OS release where
5535 # 4-way builds make sense.
5536 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005537
5538 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5539 cur_target='10.5'
5540
5541 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5542 cur_target='10.5'
5543
5544 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5545 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005546 fi
5547 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005548 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005549 # On Intel macs default to a deployment
5550 # target of 10.4, that's the first OSX
5551 # release with Intel support.
5552 cur_target="10.4"
5553 fi
5554 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555 fi
5556 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5557
5558 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5559 # environment with a value that is the same as what we'll use
5560 # in the Makefile to ensure that we'll get the same compiler
5561 # environment during configure and build time.
5562 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5563 export MACOSX_DEPLOYMENT_TARGET
5564 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5565
5566 ;;
5567 OSF*)
5568 BASECFLAGS="$BASECFLAGS -mieee"
5569 ;;
5570 esac
5571 ;;
5572
5573*)
5574 case $ac_sys_system in
5575 OpenUNIX*|UnixWare*)
5576 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5577 ;;
5578 OSF*)
5579 BASECFLAGS="$BASECFLAGS -ieee -std"
5580 ;;
5581 SCO_SV*)
5582 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5583 ;;
5584 esac
5585 ;;
5586esac
5587
5588if test "$Py_DEBUG" = 'true'; then
5589 :
5590else
5591 OPT="-DNDEBUG $OPT"
5592fi
5593
5594if test "$ac_arch_flags"
5595then
5596 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5597fi
5598
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599# Check whether GCC supports PyArg_ParseTuple format
5600if test "$GCC" = "yes"
5601then
Matthias Kloseb9621712010-04-24 17:59:49 +00005602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5603$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604 save_CFLAGS=$CFLAGS
5605 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607/* end confdefs.h. */
5608
5609 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610int
5611main ()
5612{
5613
5614 ;
5615 return 0;
5616}
Matthias Kloseb159a552010-04-25 21:00:44 +00005617
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005619if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005620
Matthias Kloseb159a552010-04-25 21:00:44 +00005621
Matthias Kloseb9621712010-04-24 17:59:49 +00005622$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005623
Matthias Kloseb159a552010-04-25 21:00:44 +00005624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005625$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005626
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627else
Matthias Kloseb159a552010-04-25 21:00:44 +00005628
5629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005630$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631
5632fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5634 CFLAGS=$save_CFLAGS
5635fi
5636
5637# On some compilers, pthreads are available without further options
5638# (e.g. MacOS X). On some of these systems, the compiler will not
5639# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5640# So we have to see first whether pthreads are available without
5641# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5643$as_echo_n "checking whether pthreads are available without options... " >&6; }
5644if test "${ac_cv_pthread_is_default+set}" = set; then :
5645 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005646else
Matthias Kloseb9621712010-04-24 17:59:49 +00005647 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648 ac_cv_pthread_is_default=no
5649else
Matthias Kloseb9621712010-04-24 17:59:49 +00005650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651/* end confdefs.h. */
5652
5653#include <pthread.h>
5654
5655void* routine(void* p){return NULL;}
5656
5657int main(){
5658 pthread_t p;
5659 if(pthread_create(&p,NULL,routine,NULL)!=0)
5660 return 1;
5661 (void)pthread_detach(p);
5662 return 0;
5663}
5664
5665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005666if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667
5668 ac_cv_pthread_is_default=yes
5669 ac_cv_kthread=no
5670 ac_cv_pthread=no
5671
5672else
Matthias Kloseb9621712010-04-24 17:59:49 +00005673 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677fi
5678
5679
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680fi
5681
Matthias Kloseb9621712010-04-24 17:59:49 +00005682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5683$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684
5685
5686if test $ac_cv_pthread_is_default = yes
5687then
5688 ac_cv_kpthread=no
5689else
5690# -Kpthread, if available, provides the right #defines
5691# and linker options to make pthread_create available
5692# Some compilers won't report that they do not support -Kpthread,
5693# so we need to run a program to see whether it really made the
5694# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5696$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5697if test "${ac_cv_kpthread+set}" = set; then :
5698 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699else
5700 ac_save_cc="$CC"
5701CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005702if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 ac_cv_kpthread=no
5704else
Matthias Kloseb9621712010-04-24 17:59:49 +00005705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706/* end confdefs.h. */
5707
5708#include <pthread.h>
5709
5710void* routine(void* p){return NULL;}
5711
5712int main(){
5713 pthread_t p;
5714 if(pthread_create(&p,NULL,routine,NULL)!=0)
5715 return 1;
5716 (void)pthread_detach(p);
5717 return 0;
5718}
5719
5720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005721if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722 ac_cv_kpthread=yes
5723else
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5727 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728fi
5729
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730CC="$ac_save_cc"
5731fi
5732
Matthias Kloseb9621712010-04-24 17:59:49 +00005733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5734$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735fi
5736
5737if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5738then
5739# -Kthread, if available, provides the right #defines
5740# and linker options to make pthread_create available
5741# Some compilers won't report that they do not support -Kthread,
5742# so we need to run a program to see whether it really made the
5743# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5745$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5746if test "${ac_cv_kthread+set}" = set; then :
5747 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748else
5749 ac_save_cc="$CC"
5750CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005751if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752 ac_cv_kthread=no
5753else
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755/* end confdefs.h. */
5756
5757#include <pthread.h>
5758
5759void* routine(void* p){return NULL;}
5760
5761int main(){
5762 pthread_t p;
5763 if(pthread_create(&p,NULL,routine,NULL)!=0)
5764 return 1;
5765 (void)pthread_detach(p);
5766 return 0;
5767}
5768
5769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005770if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771 ac_cv_kthread=yes
5772else
Matthias Kloseb9621712010-04-24 17:59:49 +00005773 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5776 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777fi
5778
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779CC="$ac_save_cc"
5780fi
5781
Matthias Kloseb9621712010-04-24 17:59:49 +00005782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5783$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784fi
5785
5786if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5787then
5788# -pthread, if available, provides the right #defines
5789# and linker options to make pthread_create available
5790# Some compilers won't report that they do not support -pthread,
5791# so we need to run a program to see whether it really made the
5792# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5794$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5795if test "${ac_cv_thread+set}" = set; then :
5796 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797else
5798 ac_save_cc="$CC"
5799CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005800if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801 ac_cv_pthread=no
5802else
Matthias Kloseb9621712010-04-24 17:59:49 +00005803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804/* end confdefs.h. */
5805
5806#include <pthread.h>
5807
5808void* routine(void* p){return NULL;}
5809
5810int main(){
5811 pthread_t p;
5812 if(pthread_create(&p,NULL,routine,NULL)!=0)
5813 return 1;
5814 (void)pthread_detach(p);
5815 return 0;
5816}
5817
5818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005819if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820 ac_cv_pthread=yes
5821else
Matthias Kloseb9621712010-04-24 17:59:49 +00005822 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5825 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826fi
5827
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828CC="$ac_save_cc"
5829fi
5830
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5832$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833fi
5834
5835# If we have set a CC compiler flag for thread support then
5836# check if it works for CXX, too.
5837ac_cv_cxx_thread=no
5838if test ! -z "$CXX"
5839then
Matthias Kloseb9621712010-04-24 17:59:49 +00005840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5841$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842ac_save_cxx="$CXX"
5843
5844if test "$ac_cv_kpthread" = "yes"
5845then
5846 CXX="$CXX -Kpthread"
5847 ac_cv_cxx_thread=yes
5848elif test "$ac_cv_kthread" = "yes"
5849then
5850 CXX="$CXX -Kthread"
5851 ac_cv_cxx_thread=yes
5852elif test "$ac_cv_pthread" = "yes"
5853then
5854 CXX="$CXX -pthread"
5855 ac_cv_cxx_thread=yes
5856fi
5857
5858if test $ac_cv_cxx_thread = yes
5859then
5860 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5861 $CXX -c conftest.$ac_ext 2>&5
5862 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5863 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5864 then
5865 ac_cv_cxx_thread=yes
5866 else
5867 ac_cv_cxx_thread=no
5868 fi
5869 rm -fr conftest*
5870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5872$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873fi
5874CXX="$ac_save_cxx"
5875
5876
5877# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5879$as_echo_n "checking for ANSI C header files... " >&6; }
5880if test "${ac_cv_header_stdc+set}" = set; then :
5881 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882else
Matthias Kloseb9621712010-04-24 17:59:49 +00005883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884/* end confdefs.h. */
5885#include <stdlib.h>
5886#include <stdarg.h>
5887#include <string.h>
5888#include <float.h>
5889
5890int
5891main ()
5892{
5893
5894 ;
5895 return 0;
5896}
5897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005898if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 ac_cv_header_stdc=yes
5900else
Matthias Kloseb9621712010-04-24 17:59:49 +00005901 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5904
5905if test $ac_cv_header_stdc = yes; then
5906 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908/* end confdefs.h. */
5909#include <string.h>
5910
5911_ACEOF
5912if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005913 $EGREP "memchr" >/dev/null 2>&1; then :
5914
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915else
5916 ac_cv_header_stdc=no
5917fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005918rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919
5920fi
5921
5922if test $ac_cv_header_stdc = yes; then
5923 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925/* end confdefs.h. */
5926#include <stdlib.h>
5927
5928_ACEOF
5929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005930 $EGREP "free" >/dev/null 2>&1; then :
5931
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932else
5933 ac_cv_header_stdc=no
5934fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005935rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936
5937fi
5938
5939if test $ac_cv_header_stdc = yes; then
5940 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005941 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942 :
5943else
Matthias Kloseb9621712010-04-24 17:59:49 +00005944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945/* end confdefs.h. */
5946#include <ctype.h>
5947#include <stdlib.h>
5948#if ((' ' & 0x0FF) == 0x020)
5949# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5950# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5951#else
5952# define ISLOWER(c) \
5953 (('a' <= (c) && (c) <= 'i') \
5954 || ('j' <= (c) && (c) <= 'r') \
5955 || ('s' <= (c) && (c) <= 'z'))
5956# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5957#endif
5958
5959#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5960int
5961main ()
5962{
5963 int i;
5964 for (i = 0; i < 256; i++)
5965 if (XOR (islower (i), ISLOWER (i))
5966 || toupper (i) != TOUPPER (i))
5967 return 2;
5968 return 0;
5969}
5970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005971if ac_fn_c_try_run "$LINENO"; then :
5972
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973else
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005976rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5977 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978fi
5979
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980fi
5981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5983$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984if test $ac_cv_header_stdc = yes; then
5985
Matthias Kloseb9621712010-04-24 17:59:49 +00005986$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987
5988fi
5989
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005990for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5991fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005992ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005993shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005994unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005995sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5996sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005997sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005998sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005999sys/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 +00006000sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006001bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006002do :
6003 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6004ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006005if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006006 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006007#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006008_ACEOF
6009
6010fi
6011
Guido van Rossum627b2d71993-12-24 10:39:16 +00006012done
6013
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006014ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006015for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6018$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006019if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006020 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006021else
Matthias Kloseb9621712010-04-24 17:59:49 +00006022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006023/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006024#include <sys/types.h>
6025#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006026
Martin v. Löwis11437992002-04-12 09:54:03 +00006027int
6028main ()
6029{
6030if ((DIR *) 0)
6031return 0;
6032 ;
6033 return 0;
6034}
6035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006036if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006037 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006038else
Matthias Kloseb9621712010-04-24 17:59:49 +00006039 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006043eval ac_res=\$$as_ac_Header
6044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6045$as_echo "$ac_res" >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006046if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006047 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006048#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006049_ACEOF
6050
6051ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006052fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006054done
6055# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6056if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6058$as_echo_n "checking for library containing opendir... " >&6; }
6059if test "${ac_cv_search_opendir+set}" = set; then :
6060 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006061else
Martin v. Löwis11437992002-04-12 09:54:03 +00006062 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006066/* Override any GCC internal prototype to avoid an error.
6067 Use char because int might match the return type of a GCC
6068 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006069#ifdef __cplusplus
6070extern "C"
6071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006072char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006073int
6074main ()
6075{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006076return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006077 ;
6078 return 0;
6079}
6080_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006081for ac_lib in '' dir; do
6082 if test -z "$ac_lib"; then
6083 ac_res="none required"
6084 else
6085 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006086 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006087 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006088 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006089 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006091rm -f core conftest.err conftest.$ac_objext \
6092 conftest$ac_exeext
6093 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006094 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006096done
Matthias Kloseb9621712010-04-24 17:59:49 +00006097if test "${ac_cv_search_opendir+set}" = set; then :
6098
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006099else
6100 ac_cv_search_opendir=no
6101fi
6102rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006103LIBS=$ac_func_search_save_LIBS
6104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6106$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006107ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006108if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006109 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006110
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006111fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006112
Michael W. Hudson54241132001-12-07 15:38:26 +00006113else
Matthias Kloseb9621712010-04-24 17:59:49 +00006114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6115$as_echo_n "checking for library containing opendir... " >&6; }
6116if test "${ac_cv_search_opendir+set}" = set; then :
6117 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006118else
6119 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006121/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006123/* Override any GCC internal prototype to avoid an error.
6124 Use char because int might match the return type of a GCC
6125 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006126#ifdef __cplusplus
6127extern "C"
6128#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006129char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006130int
6131main ()
6132{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006133return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006134 ;
6135 return 0;
6136}
6137_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006138for ac_lib in '' x; do
6139 if test -z "$ac_lib"; then
6140 ac_res="none required"
6141 else
6142 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006143 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006144 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006145 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006146 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006147fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006148rm -f core conftest.err conftest.$ac_objext \
6149 conftest$ac_exeext
6150 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006151 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153done
Matthias Kloseb9621712010-04-24 17:59:49 +00006154if test "${ac_cv_search_opendir+set}" = set; then :
6155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006156else
6157 ac_cv_search_opendir=no
6158fi
6159rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006160LIBS=$ac_func_search_save_LIBS
6161fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6163$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006164ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006165if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006166 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006167
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006168fi
6169
6170fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006171
Matthias Kloseb9621712010-04-24 17:59:49 +00006172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6173$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6174if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6175 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176else
Matthias Kloseb9621712010-04-24 17:59:49 +00006177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006178/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006179#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006180int
6181main ()
6182{
6183return makedev(0, 0);
6184 ;
6185 return 0;
6186}
6187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006188if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006189 ac_cv_header_sys_types_h_makedev=yes
6190else
Matthias Kloseb9621712010-04-24 17:59:49 +00006191 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006193rm -f core conftest.err conftest.$ac_objext \
6194 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006195
6196fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6198$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006199
6200if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006201ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6202if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006203
Matthias Kloseb9621712010-04-24 17:59:49 +00006204$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006205
6206fi
6207
6208
6209
6210 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006211 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6212if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006213
Matthias Kloseb9621712010-04-24 17:59:49 +00006214$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006215
6216fi
6217
6218
6219 fi
6220fi
6221
Michael W. Hudson54241132001-12-07 15:38:26 +00006222
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006223# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006224for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006225do :
6226 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006227#ifdef HAVE_CURSES_H
6228#include <curses.h>
6229#endif
6230
Matthias Kloseb9621712010-04-24 17:59:49 +00006231"
6232if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006233 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006234#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006235_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006236
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006237fi
6238
6239done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006240
6241
Martin v. Löwis11017b12006-01-14 18:12:57 +00006242# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006243for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006244do :
6245 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 +00006246#ifdef HAVE_ASM_TYPES_H
6247#include <asm/types.h>
6248#endif
6249#ifdef HAVE_SYS_SOCKET_H
6250#include <sys/socket.h>
6251#endif
6252
Matthias Kloseb9621712010-04-24 17:59:49 +00006253"
6254if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006255 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006256#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006257_ACEOF
6258
6259fi
6260
6261done
6262
6263
Guido van Rossum627b2d71993-12-24 10:39:16 +00006264# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006265was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6267$as_echo_n "checking for clock_t in time.h... " >&6; }
6268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006269/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006270#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006271
6272_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006273if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006274 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006275 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006276else
Martin v. Löwis11437992002-04-12 09:54:03 +00006277
6278
Matthias Kloseb9621712010-04-24 17:59:49 +00006279$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006280
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006281
Guido van Rossum627b2d71993-12-24 10:39:16 +00006282fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006283rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006284
Matthias Kloseb9621712010-04-24 17:59:49 +00006285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6286$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006287
Neal Norwitz11690112002-07-30 01:08:28 +00006288# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6290$as_echo_n "checking for makedev... " >&6; }
6291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006292/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006293
Jesus Cea740f53a2010-04-28 11:35:30 +00006294#if defined(MAJOR_IN_MKDEV)
6295#include <sys/mkdev.h>
6296#elif defined(MAJOR_IN_SYSMACROS)
6297#include <sys/sysmacros.h>
6298#else
6299#include <sys/types.h>
6300#endif
6301
Neal Norwitz11690112002-07-30 01:08:28 +00006302int
6303main ()
6304{
Jesus Cea740f53a2010-04-28 11:35:30 +00006305
6306 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006307 ;
6308 return 0;
6309}
Matthias Kloseb159a552010-04-25 21:00:44 +00006310
Neal Norwitz11690112002-07-30 01:08:28 +00006311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006312if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006313 ac_cv_has_makedev=yes
6314else
Matthias Kloseb9621712010-04-24 17:59:49 +00006315 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006316fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006317rm -f core conftest.err conftest.$ac_objext \
6318 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006319if test "$ac_cv_has_makedev" = "no"; then
6320 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006322/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006323
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006324#define _OSF_SOURCE 1
6325#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006326
Neal Norwitz11690112002-07-30 01:08:28 +00006327int
6328main ()
6329{
6330 makedev(0, 0)
6331 ;
6332 return 0;
6333}
6334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006335if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006336 ac_cv_has_makedev=yes
6337else
Matthias Kloseb9621712010-04-24 17:59:49 +00006338 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006340rm -f core conftest.err conftest.$ac_objext \
6341 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006342 if test "$ac_cv_has_makedev" = "yes"; then
6343
Matthias Kloseb9621712010-04-24 17:59:49 +00006344$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006345
6346 fi
6347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6349$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006350if test "$ac_cv_has_makedev" = "yes"; then
6351
Matthias Kloseb9621712010-04-24 17:59:49 +00006352$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006353
6354fi
6355
Martin v. Löwis399a6892002-10-04 10:22:02 +00006356# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6357# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6358# defined, but the compiler does not support pragma redefine_extname,
6359# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6360# structures (such as rlimit64) without declaring them. As a
6361# work-around, disable LFS on such configurations
6362
6363use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6365$as_echo_n "checking Solaris LFS bug... " >&6; }
6366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006367/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006368
6369#define _LARGEFILE_SOURCE 1
6370#define _FILE_OFFSET_BITS 64
6371#include <sys/resource.h>
6372
Martin v. Löwis399a6892002-10-04 10:22:02 +00006373int
6374main ()
6375{
6376struct rlimit foo;
6377 ;
6378 return 0;
6379}
6380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006381if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006382 sol_lfs_bug=no
6383else
Matthias Kloseb9621712010-04-24 17:59:49 +00006384 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6388$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006389if test "$sol_lfs_bug" = "yes"; then
6390 use_lfs=no
6391fi
6392
6393if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006394# Two defines needed to enable largefile support on various platforms
6395# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006396
Matthias Kloseb9621712010-04-24 17:59:49 +00006397$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006398
6399
Matthias Kloseb9621712010-04-24 17:59:49 +00006400$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006401
Martin v. Löwis399a6892002-10-04 10:22:02 +00006402fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006403
Guido van Rossum84e7b241996-08-19 21:59:00 +00006404# Add some code to confdefs.h so that the test for off_t works on SCO
6405cat >> confdefs.h <<\EOF
6406#if defined(SCO_DS)
6407#undef _OFF_T
6408#endif
6409EOF
6410
Guido van Rossumef2255b2000-03-10 22:30:29 +00006411# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006412ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6413if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006414
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006415else
Martin v. Löwis11437992002-04-12 09:54:03 +00006416
6417cat >>confdefs.h <<_ACEOF
6418#define mode_t int
6419_ACEOF
6420
6421fi
6422
Matthias Kloseb9621712010-04-24 17:59:49 +00006423ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6424if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006425
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006426else
Martin v. Löwis11437992002-04-12 09:54:03 +00006427
6428cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006429#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006430_ACEOF
6431
6432fi
6433
Matthias Kloseb9621712010-04-24 17:59:49 +00006434ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6435if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006436
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006437else
Martin v. Löwis11437992002-04-12 09:54:03 +00006438
6439cat >>confdefs.h <<_ACEOF
6440#define pid_t int
6441_ACEOF
6442
6443fi
6444
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006445
Martin v. Löwis11437992002-04-12 09:54:03 +00006446cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006447#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006448_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006449
Matthias Kloseb9621712010-04-24 17:59:49 +00006450ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6451if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006452
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006453else
Martin v. Löwis11437992002-04-12 09:54:03 +00006454
6455cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006456#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006457_ACEOF
6458
6459fi
6460
Matthias Kloseb9621712010-04-24 17:59:49 +00006461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6462$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6463if test "${ac_cv_type_uid_t+set}" = set; then :
6464 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006465else
Matthias Kloseb9621712010-04-24 17:59:49 +00006466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006467/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006468#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006469
6470_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006471if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006472 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006473 ac_cv_type_uid_t=yes
6474else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006475 ac_cv_type_uid_t=no
6476fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006477rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006478
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6481$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006482if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006483
Matthias Kloseb9621712010-04-24 17:59:49 +00006484$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006485
6486
Matthias Kloseb9621712010-04-24 17:59:49 +00006487$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006488
6489fi
6490
Matthias Kloseb9621712010-04-24 17:59:49 +00006491ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6492case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006493 no|yes) ;; #(
6494 *)
6495
Matthias Kloseb9621712010-04-24 17:59:49 +00006496$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006497
6498
6499cat >>confdefs.h <<_ACEOF
6500#define uint32_t $ac_cv_c_uint32_t
6501_ACEOF
6502;;
6503 esac
6504
Matthias Kloseb9621712010-04-24 17:59:49 +00006505ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6506case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006507 no|yes) ;; #(
6508 *)
6509
Matthias Kloseb9621712010-04-24 17:59:49 +00006510$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006511
6512
6513cat >>confdefs.h <<_ACEOF
6514#define uint64_t $ac_cv_c_uint64_t
6515_ACEOF
6516;;
6517 esac
6518
Matthias Kloseb9621712010-04-24 17:59:49 +00006519ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6520case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006521 no|yes) ;; #(
6522 *)
6523
6524cat >>confdefs.h <<_ACEOF
6525#define int32_t $ac_cv_c_int32_t
6526_ACEOF
6527;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006528esac
6529
Matthias Kloseb9621712010-04-24 17:59:49 +00006530ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6531case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006532 no|yes) ;; #(
6533 *)
6534
6535cat >>confdefs.h <<_ACEOF
6536#define int64_t $ac_cv_c_int64_t
6537_ACEOF
6538;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006539esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006540
Matthias Kloseb9621712010-04-24 17:59:49 +00006541ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6542if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006543
Matthias Kloseb9621712010-04-24 17:59:49 +00006544$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006545
6546fi
6547
Jack Jansendd19cf82001-12-06 22:36:17 +00006548
Michael W. Hudson54241132001-12-07 15:38:26 +00006549# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006550# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006551# The cast to long int works around a bug in the HP C Compiler
6552# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6553# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6554# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6556$as_echo_n "checking size of int... " >&6; }
6557if test "${ac_cv_sizeof_int+set}" = set; then :
6558 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006559else
Matthias Kloseb9621712010-04-24 17:59:49 +00006560 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 +00006561
Martin v. Löwis11437992002-04-12 09:54:03 +00006562else
Matthias Kloseb9621712010-04-24 17:59:49 +00006563 if test "$ac_cv_type_int" = yes; then
6564 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6565$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006566as_fn_error 77 "cannot compute sizeof (int)
6567See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006568 else
6569 ac_cv_sizeof_int=0
6570 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006572
Martin v. Löwis11437992002-04-12 09:54:03 +00006573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6575$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006576
6577
6578
Martin v. Löwis11437992002-04-12 09:54:03 +00006579cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006580#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006581_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006582
6583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006584# The cast to long int works around a bug in the HP C Compiler
6585# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6586# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6587# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6589$as_echo_n "checking size of long... " >&6; }
6590if test "${ac_cv_sizeof_long+set}" = set; then :
6591 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006592else
Matthias Kloseb9621712010-04-24 17:59:49 +00006593 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 +00006594
Martin v. Löwis11437992002-04-12 09:54:03 +00006595else
Matthias Kloseb9621712010-04-24 17:59:49 +00006596 if test "$ac_cv_type_long" = yes; then
6597 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6598$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006599as_fn_error 77 "cannot compute sizeof (long)
6600See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006601 else
6602 ac_cv_sizeof_long=0
6603 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006605
Martin v. Löwis11437992002-04-12 09:54:03 +00006606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6608$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006609
6610
6611
Martin v. Löwis11437992002-04-12 09:54:03 +00006612cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006613#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006614_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006615
6616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006617# The cast to long int works around a bug in the HP C Compiler
6618# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6619# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6620# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6622$as_echo_n "checking size of void *... " >&6; }
6623if test "${ac_cv_sizeof_void_p+set}" = set; then :
6624 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006625else
Matthias Kloseb9621712010-04-24 17:59:49 +00006626 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 +00006627
Martin v. Löwis11437992002-04-12 09:54:03 +00006628else
Matthias Kloseb9621712010-04-24 17:59:49 +00006629 if test "$ac_cv_type_void_p" = yes; then
6630 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6631$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006632as_fn_error 77 "cannot compute sizeof (void *)
6633See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006634 else
6635 ac_cv_sizeof_void_p=0
6636 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006638
Martin v. Löwis11437992002-04-12 09:54:03 +00006639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6641$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006642
6643
6644
Martin v. Löwis11437992002-04-12 09:54:03 +00006645cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006646#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006647_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006648
6649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006650# The cast to long int works around a bug in the HP C Compiler
6651# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6652# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6653# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6655$as_echo_n "checking size of short... " >&6; }
6656if test "${ac_cv_sizeof_short+set}" = set; then :
6657 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006658else
Matthias Kloseb9621712010-04-24 17:59:49 +00006659 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 +00006660
Martin v. Löwis11437992002-04-12 09:54:03 +00006661else
Matthias Kloseb9621712010-04-24 17:59:49 +00006662 if test "$ac_cv_type_short" = yes; then
6663 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006665as_fn_error 77 "cannot compute sizeof (short)
6666See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006667 else
6668 ac_cv_sizeof_short=0
6669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006671
Martin v. Löwis11437992002-04-12 09:54:03 +00006672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6674$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006675
6676
6677
Martin v. Löwis11437992002-04-12 09:54:03 +00006678cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006679#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006680_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006681
6682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006683# The cast to long int works around a bug in the HP C Compiler
6684# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6685# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6686# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6688$as_echo_n "checking size of float... " >&6; }
6689if test "${ac_cv_sizeof_float+set}" = set; then :
6690 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006691else
Matthias Kloseb9621712010-04-24 17:59:49 +00006692 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 +00006693
Martin v. Löwis11437992002-04-12 09:54:03 +00006694else
Matthias Kloseb9621712010-04-24 17:59:49 +00006695 if test "$ac_cv_type_float" = yes; then
6696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006698as_fn_error 77 "cannot compute sizeof (float)
6699See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006700 else
6701 ac_cv_sizeof_float=0
6702 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006704
Martin v. Löwis11437992002-04-12 09:54:03 +00006705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6707$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006708
6709
6710
Martin v. Löwis11437992002-04-12 09:54:03 +00006711cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006712#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006713_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006714
6715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006716# The cast to long int works around a bug in the HP C Compiler
6717# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6718# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6719# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6721$as_echo_n "checking size of double... " >&6; }
6722if test "${ac_cv_sizeof_double+set}" = set; then :
6723 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006724else
Matthias Kloseb9621712010-04-24 17:59:49 +00006725 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 +00006726
Martin v. Löwis11437992002-04-12 09:54:03 +00006727else
Matthias Kloseb9621712010-04-24 17:59:49 +00006728 if test "$ac_cv_type_double" = yes; then
6729 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6730$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006731as_fn_error 77 "cannot compute sizeof (double)
6732See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006733 else
6734 ac_cv_sizeof_double=0
6735 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006737
Martin v. Löwis11437992002-04-12 09:54:03 +00006738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6740$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006741
6742
6743
Martin v. Löwis11437992002-04-12 09:54:03 +00006744cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006745#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006746_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006747
6748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006749# The cast to long int works around a bug in the HP C Compiler
6750# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6751# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6752# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6754$as_echo_n "checking size of fpos_t... " >&6; }
6755if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6756 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006757else
Matthias Kloseb9621712010-04-24 17:59:49 +00006758 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 +00006759
Martin v. Löwis11437992002-04-12 09:54:03 +00006760else
Matthias Kloseb9621712010-04-24 17:59:49 +00006761 if test "$ac_cv_type_fpos_t" = yes; then
6762 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6763$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006764as_fn_error 77 "cannot compute sizeof (fpos_t)
6765See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006766 else
6767 ac_cv_sizeof_fpos_t=0
6768 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006770
Martin v. Löwis11437992002-04-12 09:54:03 +00006771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6773$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006774
6775
6776
Martin v. Löwis11437992002-04-12 09:54:03 +00006777cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006778#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006779_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006780
Michael W. Hudson54241132001-12-07 15:38:26 +00006781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006782# The cast to long int works around a bug in the HP C Compiler
6783# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6784# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6785# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6787$as_echo_n "checking size of size_t... " >&6; }
6788if test "${ac_cv_sizeof_size_t+set}" = set; then :
6789 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006790else
Matthias Kloseb9621712010-04-24 17:59:49 +00006791 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 +00006792
Martin v. Löwis18e16552006-02-15 17:27:45 +00006793else
Matthias Kloseb9621712010-04-24 17:59:49 +00006794 if test "$ac_cv_type_size_t" = yes; then
6795 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006797as_fn_error 77 "cannot compute sizeof (size_t)
6798See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006799 else
6800 ac_cv_sizeof_size_t=0
6801 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006803
Martin v. Löwis18e16552006-02-15 17:27:45 +00006804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6806$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006807
6808
6809
Martin v. Löwis18e16552006-02-15 17:27:45 +00006810cat >>confdefs.h <<_ACEOF
6811#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6812_ACEOF
6813
6814
Christian Heimes400adb02008-02-01 08:12:03 +00006815# The cast to long int works around a bug in the HP C Compiler
6816# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6817# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6818# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6820$as_echo_n "checking size of pid_t... " >&6; }
6821if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6822 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006823else
Matthias Kloseb9621712010-04-24 17:59:49 +00006824 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 +00006825
Christian Heimes400adb02008-02-01 08:12:03 +00006826else
Matthias Kloseb9621712010-04-24 17:59:49 +00006827 if test "$ac_cv_type_pid_t" = yes; then
6828 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006830as_fn_error 77 "cannot compute sizeof (pid_t)
6831See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes400adb02008-02-01 08:12:03 +00006832 else
6833 ac_cv_sizeof_pid_t=0
6834 fi
6835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006836
Christian Heimes400adb02008-02-01 08:12:03 +00006837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6839$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006840
6841
6842
6843cat >>confdefs.h <<_ACEOF
6844#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6845_ACEOF
6846
6847
Michael W. Hudson54241132001-12-07 15:38:26 +00006848
Matthias Kloseb9621712010-04-24 17:59:49 +00006849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6850$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006851have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006853/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006854
Martin v. Löwis11437992002-04-12 09:54:03 +00006855int
6856main ()
6857{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006858long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006859 ;
6860 return 0;
6861}
6862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006863if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006864
6865
Matthias Kloseb9621712010-04-24 17:59:49 +00006866$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006867
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006868 have_long_long=yes
6869
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6873$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006874if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006875# The cast to long int works around a bug in the HP C Compiler
6876# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6877# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6878# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6880$as_echo_n "checking size of long long... " >&6; }
6881if test "${ac_cv_sizeof_long_long+set}" = set; then :
6882 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006883else
Matthias Kloseb9621712010-04-24 17:59:49 +00006884 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 +00006885
Martin v. Löwis11437992002-04-12 09:54:03 +00006886else
Matthias Kloseb9621712010-04-24 17:59:49 +00006887 if test "$ac_cv_type_long_long" = yes; then
6888 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006890as_fn_error 77 "cannot compute sizeof (long long)
6891See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006892 else
6893 ac_cv_sizeof_long_long=0
6894 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006896
Martin v. Löwis11437992002-04-12 09:54:03 +00006897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6899$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006900
6901
6902
Martin v. Löwis11437992002-04-12 09:54:03 +00006903cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006904#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006905_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006906
Michael W. Hudson54241132001-12-07 15:38:26 +00006907
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006908fi
6909
Matthias Kloseb9621712010-04-24 17:59:49 +00006910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6911$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006912have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006914/* end confdefs.h. */
6915
6916int
6917main ()
6918{
6919long double x; x = (long double)0;
6920 ;
6921 return 0;
6922}
6923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006924if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006925
6926
Matthias Kloseb9621712010-04-24 17:59:49 +00006927$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006928
6929 have_long_double=yes
6930
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006931fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6934$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006935if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006936# The cast to long int works around a bug in the HP C Compiler
6937# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6938# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6939# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6941$as_echo_n "checking size of long double... " >&6; }
6942if test "${ac_cv_sizeof_long_double+set}" = set; then :
6943 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006944else
Matthias Kloseb9621712010-04-24 17:59:49 +00006945 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 +00006946
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006947else
Matthias Kloseb9621712010-04-24 17:59:49 +00006948 if test "$ac_cv_type_long_double" = yes; then
6949 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6950$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006951as_fn_error 77 "cannot compute sizeof (long double)
6952See \`config.log' for more details" "$LINENO" 5 ; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006953 else
6954 ac_cv_sizeof_long_double=0
6955 fi
6956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006957
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6960$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006961
6962
6963
6964cat >>confdefs.h <<_ACEOF
6965#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6966_ACEOF
6967
6968
6969fi
6970
6971
Matthias Kloseb9621712010-04-24 17:59:49 +00006972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6973$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006974have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006976/* end confdefs.h. */
6977
6978int
6979main ()
6980{
6981_Bool x; x = (_Bool)0;
6982 ;
6983 return 0;
6984}
6985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006986if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00006987
6988
Matthias Kloseb9621712010-04-24 17:59:49 +00006989$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00006990
6991 have_c99_bool=yes
6992
Thomas Woutersb2137042007-02-01 18:02:27 +00006993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
6996$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006997if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006998# The cast to long int works around a bug in the HP C Compiler
6999# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7000# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7001# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7003$as_echo_n "checking size of _Bool... " >&6; }
7004if test "${ac_cv_sizeof__Bool+set}" = set; then :
7005 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007006else
Matthias Kloseb9621712010-04-24 17:59:49 +00007007 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 +00007008
Thomas Woutersb2137042007-02-01 18:02:27 +00007009else
Matthias Kloseb9621712010-04-24 17:59:49 +00007010 if test "$ac_cv_type__Bool" = yes; then
7011 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7012$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007013as_fn_error 77 "cannot compute sizeof (_Bool)
7014See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007015 else
7016 ac_cv_sizeof__Bool=0
7017 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007019
Thomas Woutersb2137042007-02-01 18:02:27 +00007020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7022$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007023
7024
7025
Thomas Woutersb2137042007-02-01 18:02:27 +00007026cat >>confdefs.h <<_ACEOF
7027#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7028_ACEOF
7029
7030
7031fi
7032
Matthias Kloseb9621712010-04-24 17:59:49 +00007033ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007034 #include <stdint.h>
7035 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007036 #ifdef HAVE_INTTYPES_H
7037 #include <inttypes.h>
7038 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007039"
7040if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007041
7042cat >>confdefs.h <<_ACEOF
7043#define HAVE_UINTPTR_T 1
7044_ACEOF
7045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007046# The cast to long int works around a bug in the HP C Compiler
7047# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7048# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7049# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7051$as_echo_n "checking size of uintptr_t... " >&6; }
7052if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7053 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007054else
Matthias Kloseb9621712010-04-24 17:59:49 +00007055 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 +00007056
Martin v. Löwis11437992002-04-12 09:54:03 +00007057else
Matthias Kloseb9621712010-04-24 17:59:49 +00007058 if test "$ac_cv_type_uintptr_t" = yes; then
7059 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7060$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007061as_fn_error 77 "cannot compute sizeof (uintptr_t)
7062See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007063 else
7064 ac_cv_sizeof_uintptr_t=0
7065 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007067
Martin v. Löwis11437992002-04-12 09:54:03 +00007068fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7070$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007071
7072
7073
Martin v. Löwis11437992002-04-12 09:54:03 +00007074cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007075#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007076_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007077
Michael W. Hudson54241132001-12-07 15:38:26 +00007078
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007079fi
7080
Thomas Wouters89f507f2006-12-13 04:49:30 +00007081
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007082# The cast to long int works around a bug in the HP C Compiler
7083# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7084# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7085# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7087$as_echo_n "checking size of off_t... " >&6; }
7088if test "${ac_cv_sizeof_off_t+set}" = set; then :
7089 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007090else
Matthias Kloseb9621712010-04-24 17:59:49 +00007091 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007092#ifdef HAVE_SYS_TYPES_H
7093#include <sys/types.h>
7094#endif
7095
Matthias Kloseb9621712010-04-24 17:59:49 +00007096"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007097
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007098else
Matthias Kloseb9621712010-04-24 17:59:49 +00007099 if test "$ac_cv_type_off_t" = yes; then
7100 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007102as_fn_error 77 "cannot compute sizeof (off_t)
7103See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007104 else
7105 ac_cv_sizeof_off_t=0
7106 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007107fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007108
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7111$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007112
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007113
7114
Martin v. Löwis11437992002-04-12 09:54:03 +00007115cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007116#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007117_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007118
Michael W. Hudson54241132001-12-07 15:38:26 +00007119
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007120
Matthias Kloseb9621712010-04-24 17:59:49 +00007121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7122$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007123if test "$have_long_long" = yes
7124then
7125if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007126 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007127
Matthias Kloseb9621712010-04-24 17:59:49 +00007128$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007129
Matthias Kloseb9621712010-04-24 17:59:49 +00007130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7131$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007132else
Matthias Kloseb9621712010-04-24 17:59:49 +00007133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7134$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007135fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007136else
Matthias Kloseb9621712010-04-24 17:59:49 +00007137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7138$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007139fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007140
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007141# The cast to long int works around a bug in the HP C Compiler
7142# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7143# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7144# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7146$as_echo_n "checking size of time_t... " >&6; }
7147if test "${ac_cv_sizeof_time_t+set}" = set; then :
7148 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007149else
Matthias Kloseb9621712010-04-24 17:59:49 +00007150 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007151#ifdef HAVE_SYS_TYPES_H
7152#include <sys/types.h>
7153#endif
7154#ifdef HAVE_TIME_H
7155#include <time.h>
7156#endif
7157
Matthias Kloseb9621712010-04-24 17:59:49 +00007158"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007159
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007160else
Matthias Kloseb9621712010-04-24 17:59:49 +00007161 if test "$ac_cv_type_time_t" = yes; then
7162 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7163$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007164as_fn_error 77 "cannot compute sizeof (time_t)
7165See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007166 else
7167 ac_cv_sizeof_time_t=0
7168 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007170
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007171fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7173$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007174
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007175
7176
Martin v. Löwis11437992002-04-12 09:54:03 +00007177cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007178#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007179_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007180
Michael W. Hudson54241132001-12-07 15:38:26 +00007181
7182
Trent Mick635f6fb2000-08-23 21:33:05 +00007183# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007184ac_save_cc="$CC"
7185if test "$ac_cv_kpthread" = "yes"
7186then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007187elif test "$ac_cv_kthread" = "yes"
7188then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007189elif test "$ac_cv_pthread" = "yes"
7190then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007191fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007192
Matthias Kloseb9621712010-04-24 17:59:49 +00007193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7194$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007195have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007197/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007198
7199 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007200int
7201main ()
7202{
Guido van Rossum12580492000-09-24 16:47:19 +00007203pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007204 ;
7205 return 0;
7206}
Matthias Kloseb159a552010-04-25 21:00:44 +00007207
Martin v. Löwis11437992002-04-12 09:54:03 +00007208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007209if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007210 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7214$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007215if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007216 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007217# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7218# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7219# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7221$as_echo_n "checking size of pthread_t... " >&6; }
7222if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7223 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007224else
Matthias Kloseb9621712010-04-24 17:59:49 +00007225 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007226#ifdef HAVE_PTHREAD_H
7227#include <pthread.h>
7228#endif
7229
Matthias Kloseb9621712010-04-24 17:59:49 +00007230"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007231
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007232else
Matthias Kloseb9621712010-04-24 17:59:49 +00007233 if test "$ac_cv_type_pthread_t" = yes; then
7234 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7235$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007236as_fn_error 77 "cannot compute sizeof (pthread_t)
7237See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007238 else
7239 ac_cv_sizeof_pthread_t=0
7240 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007242
Trent Mick635f6fb2000-08-23 21:33:05 +00007243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7245$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007246
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007247
7248
Martin v. Löwis11437992002-04-12 09:54:03 +00007249cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007250#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007251_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007252
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007253
Trent Mick635f6fb2000-08-23 21:33:05 +00007254fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007255CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007256
Michael W. Hudson54241132001-12-07 15:38:26 +00007257
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007258case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007259 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007260 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7261 ;;
7262 Darwin/*)
7263 OTHER_LIBTOOL_OPT=""
7264 ;;
7265esac
7266
7267
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007268ARCH_RUN_32BIT=""
7269
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007270case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007271 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007272 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7273 if test "${enable_universalsdk}"; then
7274 :
7275 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007276 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007277 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007278 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007279 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007280 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007281 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007282 if test ${gcc_version} '<' 4.0
7283 then
7284 LIBTOOL_CRUFT="-lcc_dynamic"
7285 else
7286 LIBTOOL_CRUFT=""
7287 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007288 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007289 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007290else
Matthias Kloseb9621712010-04-24 17:59:49 +00007291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007292/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007293
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007294 #include <unistd.h>
7295 int main(int argc, char*argv[])
7296 {
7297 if (sizeof(long) == 4) {
7298 return 0;
7299 } else {
7300 return 1;
7301 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007302 }
7303
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007305if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007306 ac_osx_32bit=yes
7307else
Matthias Kloseb9621712010-04-24 17:59:49 +00007308 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7311 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007312fi
7313
7314
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007315 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007316 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007317 i386)
7318 MACOSX_DEFAULT_ARCH="i386"
7319 ;;
7320 ppc)
7321 MACOSX_DEFAULT_ARCH="ppc"
7322 ;;
7323 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007324 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007325 ;;
7326 esac
7327 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007328 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007329 i386)
7330 MACOSX_DEFAULT_ARCH="x86_64"
7331 ;;
7332 ppc)
7333 MACOSX_DEFAULT_ARCH="ppc64"
7334 ;;
7335 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007336 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007337 ;;
7338 esac
7339
7340 #ARCH_RUN_32BIT="true"
7341 fi
7342
7343 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007344 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007345 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007346esac
7347
Matthias Kloseb9621712010-04-24 17:59:49 +00007348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7349$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007350if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007351then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007352 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007353 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007354 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007355
Matthias Kloseb9621712010-04-24 17:59:49 +00007356$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007357
Matthias Kloseb9621712010-04-24 17:59:49 +00007358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7359$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007360 if test $enable_shared = "yes"
7361 then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007362 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 +00007363 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007364else
Matthias Kloseb9621712010-04-24 17:59:49 +00007365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7366$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007367fi
7368
Matthias Kloseb9621712010-04-24 17:59:49 +00007369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7370$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007371case $ac_sys_system/$ac_sys_release in
7372 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007373
Matthias Kloseb9621712010-04-24 17:59:49 +00007374$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007375
Matthias Kloseb9621712010-04-24 17:59:49 +00007376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7377$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007378 ;;
7379 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7381$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007382 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007383esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007384
Guido van Rossum0a516c91994-09-12 10:58:40 +00007385# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007386
Michael W. Hudson54241132001-12-07 15:38:26 +00007387
7388
7389
7390
Benjamin Peterson99f03762010-04-11 22:15:28 +00007391
Thomas Wouters477c8d52006-05-27 19:21:47 +00007392
Georg Brandlb1441c72009-01-03 22:33:39 +00007393
Thomas Wouters477c8d52006-05-27 19:21:47 +00007394cat >>confdefs.h <<_ACEOF
7395#define SHLIB_EXT "$SO"
7396_ACEOF
7397
Guido van Rossum0a516c91994-09-12 10:58:40 +00007398# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007399# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007400# (Shared libraries in this instance are shared modules to be loaded into
7401# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7403$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007404if test -z "$LDSHARED"
7405then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007406 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007407 AIX*)
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00007408 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp -L\$(srcdir)"
Guido van Rossumce608b02001-09-28 15:59:38 +00007409 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007410 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007411 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007412 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007413 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007414 if test "$GCC" = "yes" ; then
7415 LDSHARED='$(CC) -shared'
7416 LDCXXSHARED='$(CXX) -shared'
7417 else
7418 LDSHARED='$(CC) -G'
7419 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007420 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007421 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007422 if test "$GCC" = "yes" ; then
7423 LDSHARED='$(CC) -shared'
7424 LDCXXSHARED='$(CXX) -shared'
7425 else
7426 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007427 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007428 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007429 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007430 LDSHARED='$(CC) -bundle'
7431 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007432 if test "$enable_framework" ; then
7433 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007434 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7435 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007436 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007437 else
7438 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007439 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007440 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007441 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007442 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007443 LDSHARED='$(CC) -bundle'
7444 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007445 if test "$enable_framework" ; then
7446 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007447 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7448 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007449 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007450 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007451 # No framework, use the Python app as bundle-loader
7452 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007453 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007454 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007455 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007456 Darwin/*)
7457 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7458 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007459
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007460 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007461 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007462 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007463 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007464 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007465 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7466 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007467 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007468 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007469 LDSHARED='$(CC) -bundle'
7470 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007471 if test "$enable_framework" ; then
7472 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007473 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7474 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007475 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007476 else
7477 # No framework, use the Python app as bundle-loader
7478 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7479 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007480 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007481 fi
7482 fi
7483 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007484 Linux*|GNU*|QNX*)
7485 LDSHARED='$(CC) -shared'
7486 LDCXXSHARED='$(CXX) -shared';;
7487 BSD/OS*/4*)
7488 LDSHARED="gcc -shared"
7489 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007490 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007491 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007492 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007493 LDSHARED='$(CC) -shared'
7494 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007495 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007496 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007497 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007498 OpenBSD*)
7499 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7500 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007501 LDSHARED='$(CC) -shared $(CCSHARED)'
7502 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007503 else
7504 case `uname -r` in
7505 [01].* | 2.[0-7] | 2.[0-7].*)
7506 LDSHARED="ld -Bshareable ${LDFLAGS}"
7507 ;;
7508 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007509 LDSHARED='$(CC) -shared $(CCSHARED)'
7510 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007511 ;;
7512 esac
7513 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007514 NetBSD*|DragonFly*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007515 LDSHARED="cc -shared"
7516 LDCXXSHARED="c++ -shared";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007517 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007518 if test "$GCC" = "yes" ; then
7519 LDSHARED='$(CC) -shared'
7520 LDCXXSHARED='$(CXX) -shared'
7521 else
7522 LDSHARED='$(CC) -G'
7523 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007524 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007525 SCO_SV*)
7526 LDSHARED='$(CC) -Wl,-G,-Bexport'
7527 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7528 CYGWIN*)
7529 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7530 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007531 *) LDSHARED="ld";;
7532 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7535$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007536LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007537BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007538# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007539# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7541$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007542if test -z "$CCSHARED"
7543then
Guido van Rossum07397971997-04-29 21:49:50 +00007544 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007545 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007546 then CCSHARED="-fPIC";
7547 elif test `uname -p` = sparc;
7548 then CCSHARED="-xcode=pic32";
7549 else CCSHARED="-Kpic";
7550 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007551 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007552 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007553 else CCSHARED="+z";
7554 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007555 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007556 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007557 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007558 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007559 if test "$GCC" = "yes"
7560 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007561 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007562 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007563 SCO_SV*)
7564 if test "$GCC" = "yes"
7565 then CCSHARED="-fPIC"
7566 else CCSHARED="-Kpic -belf"
7567 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007568 IRIX*/6*) case $CC in
7569 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007570 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007571 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007572 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7575$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007576# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007577# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7579$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007580if test -z "$LINKFORSHARED"
7581then
Guido van Rossum07397971997-04-29 21:49:50 +00007582 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007583 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007584 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007585 LINKFORSHARED="-Wl,-E -Wl,+s";;
7586# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007587 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007588 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007589 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007591 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007592 if test "$enable_framework"
7593 then
Jack Jansenda49e192005-01-07 13:08:22 +00007594 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007595 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007596 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007597 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007598 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007599 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007600 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007601 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7602 then
7603 LINKFORSHARED="-Wl,--export-dynamic"
7604 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007605 SunOS/5*) case $CC in
7606 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007607 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007608 then
7609 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007610 fi;;
7611 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007612 CYGWIN*)
7613 if test $enable_shared = "no"
7614 then
7615 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7616 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007617 QNX*)
7618 # -Wl,-E causes the symbols to be added to the dynamic
7619 # symbol table so that they can be found when a module
7620 # is loaded. -N 2048K causes the stack size to be set
7621 # to 2048 kilobytes so that the stack doesn't overflow
7622 # when running test_compile.py.
7623 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007624 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7627$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007628
Michael W. Hudson54241132001-12-07 15:38:26 +00007629
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007630
Matthias Kloseb9621712010-04-24 17:59:49 +00007631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7632$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007633if test ! "$LIBRARY" = "$LDLIBRARY"
7634then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007635 case $ac_sys_system in
7636 CYGWIN*)
7637 # Cygwin needs CCSHARED when building extension DLLs
7638 # but not when building the interpreter DLL.
7639 CFLAGSFORSHARED='';;
7640 *)
7641 CFLAGSFORSHARED='$(CCSHARED)'
7642 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7645$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007646
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007647# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7648# library (with --enable-shared).
7649# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007650# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7651# if it is not required, since it creates a dependency of the shared library
7652# to LIBS. This, in turn, means that applications linking the shared libpython
7653# don't need to link LIBS explicitly. The default should be only changed
7654# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007655
Matthias Kloseb9621712010-04-24 17:59:49 +00007656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7657$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007658case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007659 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007660 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007661esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7663$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007664
7665
Guido van Rossum627b2d71993-12-24 10:39:16 +00007666# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7668$as_echo_n "checking for dlopen in -ldl... " >&6; }
7669if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7670 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007671else
Martin v. Löwis11437992002-04-12 09:54:03 +00007672 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007673LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007675/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007677/* Override any GCC internal prototype to avoid an error.
7678 Use char because int might match the return type of a GCC
7679 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007680#ifdef __cplusplus
7681extern "C"
7682#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007683char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007684int
7685main ()
7686{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007687return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007688 ;
7689 return 0;
7690}
7691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007692if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007694else
Matthias Kloseb9621712010-04-24 17:59:49 +00007695 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007697rm -f core conftest.err conftest.$ac_objext \
7698 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007699LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7702$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7703if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007704 cat >>confdefs.h <<_ACEOF
7705#define HAVE_LIBDL 1
7706_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007707
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007708 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007709
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007710fi
7711 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7713$as_echo_n "checking for shl_load in -ldld... " >&6; }
7714if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7715 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007716else
Martin v. Löwis11437992002-04-12 09:54:03 +00007717 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007718LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007722/* Override any GCC internal prototype to avoid an error.
7723 Use char because int might match the return type of a GCC
7724 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007725#ifdef __cplusplus
7726extern "C"
7727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007728char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007729int
7730main ()
7731{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007732return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007733 ;
7734 return 0;
7735}
7736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007737if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007738 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007739else
Matthias Kloseb9621712010-04-24 17:59:49 +00007740 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007742rm -f core conftest.err conftest.$ac_objext \
7743 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007744LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7747$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7748if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007749 cat >>confdefs.h <<_ACEOF
7750#define HAVE_LIBDLD 1
7751_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007752
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007753 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007754
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007755fi
7756 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007757
Georg Brandlb1441c72009-01-03 22:33:39 +00007758# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007759if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7761$as_echo_n "checking for library containing sem_init... " >&6; }
7762if test "${ac_cv_search_sem_init+set}" = set; then :
7763 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007764else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007765 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769/* Override any GCC internal prototype to avoid an error.
7770 Use char because int might match the return type of a GCC
7771 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007772#ifdef __cplusplus
7773extern "C"
7774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007775char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007776int
7777main ()
7778{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007779return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007780 ;
7781 return 0;
7782}
7783_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784for ac_lib in '' pthread rt posix4; do
7785 if test -z "$ac_lib"; then
7786 ac_res="none required"
7787 else
7788 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007789 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007790 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007792 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007794rm -f core conftest.err conftest.$ac_objext \
7795 conftest$ac_exeext
7796 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007799done
Matthias Kloseb9621712010-04-24 17:59:49 +00007800if test "${ac_cv_search_sem_init+set}" = set; then :
7801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802else
7803 ac_cv_search_sem_init=no
7804fi
7805rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007806LIBS=$ac_func_search_save_LIBS
7807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7809$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007811if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007813
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007814fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007815 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007816 # posix4 on Solaris 2.6
7817 # pthread (first!) on Linux
7818fi
7819
Martin v. Löwis19d17342003-06-14 21:03:05 +00007820# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7822$as_echo_n "checking for textdomain in -lintl... " >&6; }
7823if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7824 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007825else
7826 ac_check_lib_save_LIBS=$LIBS
7827LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007829/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831/* Override any GCC internal prototype to avoid an error.
7832 Use char because int might match the return type of a GCC
7833 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007834#ifdef __cplusplus
7835extern "C"
7836#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007837char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007838int
7839main ()
7840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007841return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007842 ;
7843 return 0;
7844}
7845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007846if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007847 ac_cv_lib_intl_textdomain=yes
7848else
Matthias Kloseb9621712010-04-24 17:59:49 +00007849 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007851rm -f core conftest.err conftest.$ac_objext \
7852 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007853LIBS=$ac_check_lib_save_LIBS
7854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7856$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7857if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007858
Matthias Kloseb9621712010-04-24 17:59:49 +00007859$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007860
Brett Cannonc6d936e2009-06-07 20:09:53 +00007861 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007862fi
7863
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007864
7865# checks for system dependent C++ extensions support
7866case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007867 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7868$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007870/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007871
7872 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007873int
7874main ()
7875{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007876loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007877 ;
7878 return 0;
7879}
Matthias Kloseb159a552010-04-25 21:00:44 +00007880
Martin v. Löwis11437992002-04-12 09:54:03 +00007881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007882if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007883
Matthias Kloseb159a552010-04-25 21:00:44 +00007884
Matthias Kloseb9621712010-04-24 17:59:49 +00007885$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007886
Matthias Kloseb159a552010-04-25 21:00:44 +00007887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007888$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007889
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007890else
Matthias Kloseb159a552010-04-25 21:00:44 +00007891
7892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007893$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007894
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007896rm -f core conftest.err conftest.$ac_objext \
7897 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007898 *) ;;
7899esac
7900
Guido van Rossum70c7f481998-03-26 18:44:10 +00007901# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7903$as_echo_n "checking for t_open in -lnsl... " >&6; }
7904if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7905 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007906else
Martin v. Löwis11437992002-04-12 09:54:03 +00007907 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007908LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912/* Override any GCC internal prototype to avoid an error.
7913 Use char because int might match the return type of a GCC
7914 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007915#ifdef __cplusplus
7916extern "C"
7917#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007918char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007919int
7920main ()
7921{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007922return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007923 ;
7924 return 0;
7925}
7926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007927if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007928 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007929else
Matthias Kloseb9621712010-04-24 17:59:49 +00007930 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007932rm -f core conftest.err conftest.$ac_objext \
7933 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007934LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7937$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
7938if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007939 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007940fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007941 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7943$as_echo_n "checking for socket in -lsocket... " >&6; }
7944if test "${ac_cv_lib_socket_socket+set}" = set; then :
7945 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007946else
Martin v. Löwis11437992002-04-12 09:54:03 +00007947 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007948LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007950/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007951
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007952/* Override any GCC internal prototype to avoid an error.
7953 Use char because int might match the return type of a GCC
7954 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007955#ifdef __cplusplus
7956extern "C"
7957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007958char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007959int
7960main ()
7961{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007962return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007963 ;
7964 return 0;
7965}
7966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007967if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007969else
Matthias Kloseb9621712010-04-24 17:59:49 +00007970 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007972rm -f core conftest.err conftest.$ac_objext \
7973 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007974LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
7977$as_echo "$ac_cv_lib_socket_socket" >&6; }
7978if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00007979 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00007980fi
7981 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00007982
Matthias Kloseb9621712010-04-24 17:59:49 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
7984$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00007987if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00007989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
7990$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00007991LIBS="$withval $LIBS"
7992
7993else
Matthias Kloseb9621712010-04-24 17:59:49 +00007994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7995$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996fi
7997
Guido van Rossum7f43da71994-08-01 12:15:30 +00007998
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00007999if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008000 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8001set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8003$as_echo_n "checking for $ac_word... " >&6; }
8004if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8005 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008006else
8007 case $PKG_CONFIG in
8008 [\\/]* | ?:[\\/]*)
8009 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8010 ;;
8011 *)
8012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8013for as_dir in $PATH
8014do
8015 IFS=$as_save_IFS
8016 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008017 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008018 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8019 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008021 break 2
8022 fi
8023done
Matthias Kloseb9621712010-04-24 17:59:49 +00008024 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008025IFS=$as_save_IFS
8026
8027 ;;
8028esac
8029fi
8030PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8031if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8033$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008034else
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8036$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008037fi
8038
8039
8040fi
8041if test -z "$ac_cv_path_PKG_CONFIG"; then
8042 ac_pt_PKG_CONFIG=$PKG_CONFIG
8043 # Extract the first word of "pkg-config", so it can be a program name with args.
8044set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8046$as_echo_n "checking for $ac_word... " >&6; }
8047if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8048 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008049else
8050 case $ac_pt_PKG_CONFIG in
8051 [\\/]* | ?:[\\/]*)
8052 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8053 ;;
8054 *)
8055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8056for as_dir in $PATH
8057do
8058 IFS=$as_save_IFS
8059 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008060 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008061 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8062 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008064 break 2
8065 fi
8066done
Matthias Kloseb9621712010-04-24 17:59:49 +00008067 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008068IFS=$as_save_IFS
8069
8070 ;;
8071esac
8072fi
8073ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8074if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8076$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008077else
Matthias Kloseb9621712010-04-24 17:59:49 +00008078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8079$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008080fi
8081
8082 if test "x$ac_pt_PKG_CONFIG" = x; then
8083 PKG_CONFIG=""
8084 else
8085 case $cross_compiling:$ac_tool_warned in
8086yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008087{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8088$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008089ac_tool_warned=yes ;;
8090esac
8091 PKG_CONFIG=$ac_pt_PKG_CONFIG
8092 fi
8093else
8094 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8095fi
8096
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008097
8098# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8100$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008101
8102# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008103if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008104 withval=$with_system_expat;
8105fi
8106
8107
Matthias Kloseb9621712010-04-24 17:59:49 +00008108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8109$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008110
8111# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8113$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008114
8115# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008116if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008117 withval=$with_system_ffi;
8118fi
8119
8120
8121if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008122 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8123else
8124 LIBFFI_INCLUDEDIR=""
8125fi
8126
8127
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8129$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008130
Matthias Klose55708cc2009-04-30 08:06:49 +00008131# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8133$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008134
8135# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008136if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008137 withval=$with_dbmliborder;
8138if test x$with_dbmliborder = xyes
8139then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00008140as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008141else
8142 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8143 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8144 then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00008145 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008146 fi
8147 done
8148fi
8149fi
8150
Matthias Kloseb9621712010-04-24 17:59:49 +00008151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8152$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008153
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008154# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008155
8156
Matthias Kloseb9621712010-04-24 17:59:49 +00008157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8158$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008160# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008161if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008162 withval=$with_signal_module;
8163fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008164
8165
8166if test -z "$with_signal_module"
8167then with_signal_module="yes"
8168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8170$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008171
8172if test "${with_signal_module}" = "yes"; then
8173 USE_SIGNAL_MODULE=""
8174 SIGNAL_OBJS=""
8175else
8176 USE_SIGNAL_MODULE="#"
8177 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8178fi
8179
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008180# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008181
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008182USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008183
Matthias Kloseb9621712010-04-24 17:59:49 +00008184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8185$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008186
Guido van Rossumec2f0731997-01-22 20:54:01 +00008187
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008188# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008189if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008190 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8192$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008193LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008194if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008195 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008196fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008197else
Matthias Kloseb9621712010-04-24 17:59:49 +00008198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8199$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008200fi
8201
Martin v. Löwis11437992002-04-12 09:54:03 +00008202
8203# Templates for things AC_DEFINEd more than once.
8204# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008205
8206
Martin v. Löwis11437992002-04-12 09:54:03 +00008207
8208
Matthias Kloseb9621712010-04-24 17:59:49 +00008209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8210$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008211
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008213if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008214 withval=$with_threads;
8215fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008216
8217
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008218# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008219
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008221if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222 withval=$with_thread; with_threads=$with_thread
8223fi
8224
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008225
8226if test -z "$with_threads"
8227then with_threads="yes"
8228fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8230$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008231
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008232
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008233if test "$with_threads" = "no"
8234then
8235 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008236elif test "$ac_cv_pthread_is_default" = yes
8237then
Matthias Kloseb9621712010-04-24 17:59:49 +00008238 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008239
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008240 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008241 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008242
8243 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008244 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008245elif test "$ac_cv_kpthread" = "yes"
8246then
8247 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008248 if test "$ac_cv_cxx_thread" = "yes"; then
8249 CXX="$CXX -Kpthread"
8250 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008251 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008252
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008253 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008254 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008255elif test "$ac_cv_kthread" = "yes"
8256then
8257 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008258 if test "$ac_cv_cxx_thread" = "yes"; then
8259 CXX="$CXX -Kthread"
8260 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008261 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008262
8263 posix_threads=yes
8264 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008265elif test "$ac_cv_pthread" = "yes"
8266then
8267 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008268 if test "$ac_cv_cxx_thread" = "yes"; then
8269 CXX="$CXX -pthread"
8270 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008271 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008272
8273 posix_threads=yes
8274 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008275else
8276 if test ! -z "$with_threads" -a -d "$with_threads"
8277 then LDFLAGS="$LDFLAGS -L$with_threads"
8278 fi
8279 if test ! -z "$withval" -a -d "$withval"
8280 then LDFLAGS="$LDFLAGS -L$withval"
8281 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008282
8283 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008284 # define _POSIX_THREADS in unistd.h. Some apparently don't
8285 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8287$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008289/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008290
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008291#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008292#ifdef _POSIX_THREADS
8293yes
8294#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008295
8296_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008297if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008298 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008299 unistd_defines_pthreads=yes
8300else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008301 unistd_defines_pthreads=no
8302fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008303rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008304
Matthias Kloseb9621712010-04-24 17:59:49 +00008305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8306$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008307
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008309
Matthias Kloseb9621712010-04-24 17:59:49 +00008310 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8311if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8312 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008313
Matthias Kloseb9621712010-04-24 17:59:49 +00008314 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008315
Martin v. Löwis11437992002-04-12 09:54:03 +00008316
Matthias Kloseb9621712010-04-24 17:59:49 +00008317$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008318
8319 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008320 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008321else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008322
Matthias Kloseb9621712010-04-24 17:59:49 +00008323 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8324if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8325 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008326
Matthias Kloseb9621712010-04-24 17:59:49 +00008327 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008328
Martin v. Löwis11437992002-04-12 09:54:03 +00008329
Matthias Kloseb9621712010-04-24 17:59:49 +00008330$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008331
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008332 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008333else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008334
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008335 # Just looking for pthread_create in libpthread is not enough:
8336 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8337 # So we really have to include pthread.h, and then link.
8338 _libs=$LIBS
8339 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8341$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008343/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008344#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008345
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008346void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008347int
8348main ()
8349{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008350
8351pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008352 ;
8353 return 0;
8354}
8355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008356if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008357
Matthias Kloseb9621712010-04-24 17:59:49 +00008358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8359$as_echo "yes" >&6; }
8360 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008361
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008362 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008363 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008364else
Martin v. Löwis11437992002-04-12 09:54:03 +00008365
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008366 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8368if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8369 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008370
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008371 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008372 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008373else
Guido van Rossumad678af1998-10-02 14:42:15 +00008374
Matthias Kloseb9621712010-04-24 17:59:49 +00008375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8376$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8377if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8378 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008379else
Martin v. Löwis11437992002-04-12 09:54:03 +00008380 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008381LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008385/* Override any GCC internal prototype to avoid an error.
8386 Use char because int might match the return type of a GCC
8387 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008388#ifdef __cplusplus
8389extern "C"
8390#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008391char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008392int
8393main ()
8394{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008395return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008396 ;
8397 return 0;
8398}
8399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008400if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008401 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008402else
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008404fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008405rm -f core conftest.err conftest.$ac_objext \
8406 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008407LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8410$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8411if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8412 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008413
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008414 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008415 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008416 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008417else
Greg Steinadf63d62000-07-05 10:38:09 +00008418
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8420$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8421if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8422 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008423else
Martin v. Löwis11437992002-04-12 09:54:03 +00008424 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008425LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008429/* Override any GCC internal prototype to avoid an error.
8430 Use char because int might match the return type of a GCC
8431 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008432#ifdef __cplusplus
8433extern "C"
8434#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008435char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008436int
8437main ()
8438{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008440 ;
8441 return 0;
8442}
8443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008444if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008445 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008446else
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008449rm -f core conftest.err conftest.$ac_objext \
8450 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008451LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008452fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8454$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8455if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8456 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008457
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008458 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008459 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008460 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008461else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008462
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8464$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8465if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8466 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008467else
Martin v. Löwis11437992002-04-12 09:54:03 +00008468 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008469LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008473/* Override any GCC internal prototype to avoid an error.
8474 Use char because int might match the return type of a GCC
8475 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008476#ifdef __cplusplus
8477extern "C"
8478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008479char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008480int
8481main ()
8482{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008483return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 ;
8485 return 0;
8486}
8487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008488if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008490else
Matthias Kloseb9621712010-04-24 17:59:49 +00008491 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008493rm -f core conftest.err conftest.$ac_objext \
8494 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008495LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8498$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8499if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8500 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008501
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008502 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008503 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008504 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008505else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008506
Matthias Kloseb9621712010-04-24 17:59:49 +00008507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8508$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8509if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8510 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008511else
Martin v. Löwis11437992002-04-12 09:54:03 +00008512 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008513LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008517/* Override any GCC internal prototype to avoid an error.
8518 Use char because int might match the return type of a GCC
8519 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008520#ifdef __cplusplus
8521extern "C"
8522#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008523char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008524int
8525main ()
8526{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008527return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 ;
8529 return 0;
8530}
8531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008532if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008533 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008534else
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008536fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008537rm -f core conftest.err conftest.$ac_objext \
8538 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008539LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008540fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8542$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8543if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8544 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008545
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008546 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008547 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008548 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008549else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008550
Martin v. Löwis130fb172001-07-19 11:00:41 +00008551 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008552fi
8553
Guido van Rossum627b2d71993-12-24 10:39:16 +00008554
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008555fi
8556
Guido van Rossum0be3e491997-05-22 20:33:33 +00008557fi
8558
Guido van Rossum49545951997-12-02 19:28:29 +00008559fi
8560
Guido van Rossumb93a8621998-05-07 13:27:32 +00008561fi
8562
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008564rm -f core conftest.err conftest.$ac_objext \
8565 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566fi
8567
Martin v. Löwis11437992002-04-12 09:54:03 +00008568
8569fi
8570
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008571
Michael W. Hudson54241132001-12-07 15:38:26 +00008572
Matthias Kloseb9621712010-04-24 17:59:49 +00008573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8574$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8575if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8576 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008577else
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008579LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008582
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583/* Override any GCC internal prototype to avoid an error.
8584 Use char because int might match the return type of a GCC
8585 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008586#ifdef __cplusplus
8587extern "C"
8588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008589char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008590int
8591main ()
8592{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008593return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008594 ;
8595 return 0;
8596}
8597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008598if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008599 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008600else
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008603rm -f core conftest.err conftest.$ac_objext \
8604 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008605LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8608$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8609if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8610 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008611
Martin v. Löwis130fb172001-07-19 11:00:41 +00008612 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008613 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008614 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008615fi
8616
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008617
Neal Norwitza978ab02002-11-02 16:58:05 +00008618 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8620$as_echo_n "checking for thr_create in -lthread... " >&6; }
8621if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8622 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008623else
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008625LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629/* Override any GCC internal prototype to avoid an error.
8630 Use char because int might match the return type of a GCC
8631 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008632#ifdef __cplusplus
8633extern "C"
8634#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008635char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008636int
8637main ()
8638{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008639return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008640 ;
8641 return 0;
8642}
8643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008644if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008646else
Matthias Kloseb9621712010-04-24 17:59:49 +00008647 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008649rm -f core conftest.err conftest.$ac_objext \
8650 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008651LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8654$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8655if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8656 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008657
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008658 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008659 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008660 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008661fi
8662
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008663 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008664
Martin v. Löwis130fb172001-07-19 11:00:41 +00008665 if test "$USE_THREAD_MODULE" != "#"
8666 then
8667 # If the above checks didn't disable threads, (at least) OSF1
8668 # needs this '-threads' argument during linking.
8669 case $ac_sys_system in
8670 OSF1) LDLAST=-threads;;
8671 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008672 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008673fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008674
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008675if test "$posix_threads" = "yes"; then
8676 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008677
Matthias Kloseb9621712010-04-24 17:59:49 +00008678$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008679
8680 fi
8681
8682 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8683 case $ac_sys_system/$ac_sys_release in
8684 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008685$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008686
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008687 ;;
8688 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008689$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008690
8691 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008692 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008693$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008694
8695 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008696 AIX/6)
8697$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8698
8699 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008700 esac
8701
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8703$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8704 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8705 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008706else
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008708 ac_cv_pthread_system_supported=no
8709else
Matthias Kloseb9621712010-04-24 17:59:49 +00008710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008711/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008712#include <pthread.h>
8713 void *foo(void *parm) {
8714 return NULL;
8715 }
8716 main() {
8717 pthread_attr_t attr;
8718 pthread_t id;
8719 if (pthread_attr_init(&attr)) exit(-1);
8720 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8721 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8722 exit(0);
8723 }
8724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008725if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008726 ac_cv_pthread_system_supported=yes
8727else
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8731 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008732fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008734
Guido van Rossum627b2d71993-12-24 10:39:16 +00008735fi
8736
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8738$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008739 if test "$ac_cv_pthread_system_supported" = "yes"; then
8740
Matthias Kloseb9621712010-04-24 17:59:49 +00008741$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008742
8743 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 for ac_func in pthread_sigmask
8745do :
8746 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8747if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008748 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008749#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008750_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008751 case $ac_sys_system in
8752 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008753
Matthias Kloseb9621712010-04-24 17:59:49 +00008754$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008755
8756 ;;
8757 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008758fi
8759done
8760
8761fi
8762
8763
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008764# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008765
Matthias Kloseb9621712010-04-24 17:59:49 +00008766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8767$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008768# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008769if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008770 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008771 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8773$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008774 ipv6=no
8775 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8777$as_echo "yes" >&6; }
8778 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008779
8780 ipv6=yes
8781 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008782 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008783else
Martin v. Löwis11437992002-04-12 09:54:03 +00008784
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008786
Matthias Kloseb9621712010-04-24 17:59:49 +00008787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8788$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008789 ipv6=no
8790
8791else
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008793/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008794 /* AF_INET6 available check */
8795#include <sys/types.h>
8796#include <sys/socket.h>
8797main()
8798{
8799 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8800 exit(1);
8801 else
8802 exit(0);
8803}
8804
Martin v. Löwis11437992002-04-12 09:54:03 +00008805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008806if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008807
Matthias Kloseb9621712010-04-24 17:59:49 +00008808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8809$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008810 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008811
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008812else
Matthias Kloseb159a552010-04-25 21:00:44 +00008813
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8815$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008816 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008817
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008819rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8820 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008821fi
8822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008824if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8826$as_echo_n "checking if RFC2553 API is available... " >&6; }
8827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008828/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008829
8830 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008831#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008832int
8833main ()
8834{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008835struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008836 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 ;
8838 return 0;
8839}
Matthias Kloseb159a552010-04-25 21:00:44 +00008840
Martin v. Löwis11437992002-04-12 09:54:03 +00008841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008842if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008843
8844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008845$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008846 ipv6=yes
8847
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008848else
Matthias Kloseb159a552010-04-25 21:00:44 +00008849
8850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008851$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008852 ipv6=no
8853
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008856fi
8857
8858if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008859 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008860
8861fi
8862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008863fi
8864
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008865
8866ipv6type=unknown
8867ipv6lib=none
8868ipv6trylibc=no
8869
8870if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8872$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008873 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8874 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008875 case $i in
8876 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008878/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008879
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008880#include <netinet/in.h>
8881#ifdef IPV6_INRIA_VERSION
8882yes
8883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008884_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008887 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008888fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008889rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008890
8891 ;;
8892 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008894/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008895
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008896#include <netinet/in.h>
8897#ifdef __KAME__
8898yes
8899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008900_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008903 ipv6type=$i;
8904 ipv6lib=inet6
8905 ipv6libdir=/usr/local/v6/lib
8906 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008907fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008908rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008909
8910 ;;
8911 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008913/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008914
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008915#include <features.h>
8916#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8917yes
8918#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008919_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008920if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008921 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008922 ipv6type=$i;
8923 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008924fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008925rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008926
8927 ;;
8928 linux-inet6)
8929 if test -d /usr/inet6; then
8930 ipv6type=$i
8931 ipv6lib=inet6
8932 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008933 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008934 fi
8935 ;;
8936 solaris)
8937 if test -f /etc/netconfig; then
8938 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
8939 ipv6type=$i
8940 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008941 fi
8942 fi
8943 ;;
8944 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008946/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008947
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008948#include <sys/param.h>
8949#ifdef _TOSHIBA_INET6
8950yes
8951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008952_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008953if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008955 ipv6type=$i;
8956 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008957 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008958fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008959rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008960
8961 ;;
8962 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008964/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008965
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008966#include </usr/local/v6/include/sys/v6config.h>
8967#ifdef __V6D__
8968yes
8969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008970_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008973 ipv6type=$i;
8974 ipv6lib=v6;
8975 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00008976 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008977fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008978rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008979
8980 ;;
8981 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008983/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008984
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008985#include <sys/param.h>
8986#ifdef _ZETA_MINAMI_INET6
8987yes
8988#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008989_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008992 ipv6type=$i;
8993 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008994 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008995fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008996rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008997
8998 ;;
8999 esac
9000 if test "$ipv6type" != "unknown"; then
9001 break
9002 fi
9003 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9005$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009006fi
9007
9008if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9009 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9010 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9011 echo "using lib$ipv6lib"
9012 else
9013 if test $ipv6trylibc = "yes"; then
9014 echo "using libc"
9015 else
9016 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9017 echo "You need to fetch lib$ipv6lib.a from appropriate"
9018 echo 'ipv6 kit and compile beforehand.'
9019 exit 1
9020 fi
9021 fi
9022fi
9023
Matthias Kloseb9621712010-04-24 17:59:49 +00009024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9025$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009027/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009028
9029 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009030int
9031main ()
9032{
9033FSIORefNum fRef = 0
9034 ;
9035 return 0;
9036}
Matthias Kloseb159a552010-04-25 21:00:44 +00009037
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009039if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009040
Matthias Kloseb159a552010-04-25 21:00:44 +00009041
Matthias Kloseb9621712010-04-24 17:59:49 +00009042$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009043
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9045$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009046
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009047else
Matthias Kloseb159a552010-04-25 21:00:44 +00009048
Matthias Kloseb9621712010-04-24 17:59:49 +00009049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9050$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009051
9052fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9054
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009055# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9057$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009059# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009060if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009061 withval=$with_doc_strings;
9062fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009063
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009064
9065if test -z "$with_doc_strings"
9066then with_doc_strings="yes"
9067fi
9068if test "$with_doc_strings" != "no"
9069then
9070
Matthias Kloseb9621712010-04-24 17:59:49 +00009071$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009072
9073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9075$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009076
Antoine Pitrou042b1282010-08-13 21:15:58 +00009077# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9079$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009081# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009082if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009083 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009084if test "$withval" != no
9085then
9086
Matthias Kloseb9621712010-04-24 17:59:49 +00009087$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009088
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9090$as_echo "yes" >&6; }
9091else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9092$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009093fi
9094else
Matthias Kloseb9621712010-04-24 17:59:49 +00009095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9096$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009097fi
9098
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009099
9100# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9102$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009104# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009105if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009106 withval=$with_pymalloc;
9107fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009108
Neil Schemenauera35c6882001-02-27 04:45:05 +00009109
Neil Schemenauer16c22972002-03-22 15:34:49 +00009110if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009111then
9112 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009113 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009114fi
9115if test "$with_pymalloc" != "no"
9116then
Martin v. Löwis11437992002-04-12 09:54:03 +00009117
Matthias Kloseb9621712010-04-24 17:59:49 +00009118$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009119
9120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9122$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009123
Benjamin Peterson05159c42009-12-03 03:01:27 +00009124# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9126$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009127
9128# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009129if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009130 withval=$with_valgrind;
9131else
9132 with_valgrind=no
9133fi
9134
Matthias Kloseb9621712010-04-24 17:59:49 +00009135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9136$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009137if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009138 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9139if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009140
Matthias Kloseb9621712010-04-24 17:59:49 +00009141$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009142
9143else
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009144 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009145
9146fi
9147
9148
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009149 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009150fi
9151
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009152# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009153
Guido van Rossum98935bf2001-09-05 19:13:16 +00009154DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009155
Guido van Rossume97ee181999-12-20 21:27:22 +00009156# the dlopen() function means we might want to use dynload_shlib.o. some
9157# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009158for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009159do :
9160 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9161if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009162 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009163#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009164_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009165
Guido van Rossume97ee181999-12-20 21:27:22 +00009166fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009167done
Guido van Rossume97ee181999-12-20 21:27:22 +00009168
Michael W. Hudson54241132001-12-07 15:38:26 +00009169
Guido van Rossume97ee181999-12-20 21:27:22 +00009170# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9171# loading of modules.
9172
Matthias Kloseb9621712010-04-24 17:59:49 +00009173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9174$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009175if test -z "$DYNLOADFILE"
9176then
9177 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009178 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9179 if test "$ac_cv_func_dlopen" = yes
9180 then DYNLOADFILE="dynload_shlib.o"
9181 else DYNLOADFILE="dynload_aix.o"
9182 fi
9183 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009184 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009185 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9186 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009187 *)
9188 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9189 # out any dynamic loading
9190 if test "$ac_cv_func_dlopen" = yes
9191 then DYNLOADFILE="dynload_shlib.o"
9192 else DYNLOADFILE="dynload_stub.o"
9193 fi
9194 ;;
9195 esac
9196fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9198$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009199if test "$DYNLOADFILE" != "dynload_stub.o"
9200then
Martin v. Löwis11437992002-04-12 09:54:03 +00009201
Matthias Kloseb9621712010-04-24 17:59:49 +00009202$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009203
9204fi
9205
Neil Schemenauer4e425612001-06-19 15:44:15 +00009206# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9207
Michael W. Hudson54241132001-12-07 15:38:26 +00009208
Matthias Kloseb9621712010-04-24 17:59:49 +00009209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9210$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009211if test -z "$MACHDEP_OBJS"
9212then
Jack Jansene578a632001-08-15 01:27:14 +00009213 MACHDEP_OBJS=$extra_machdep_objs
9214else
9215 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009216fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9218$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009219
Guido van Rossum627b2d71993-12-24 10:39:16 +00009220# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009221for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009222 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009223 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009224 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009225 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009226 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009227 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009228 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9229 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009230 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009231 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009232 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009233 truncate uname unsetenv utimes waitpid wait3 wait4 \
9234 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009235do :
9236 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9237ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009238if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009239 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009240#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009241_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009242
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009243fi
9244done
9245
Michael W. Hudson54241132001-12-07 15:38:26 +00009246
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009247# For some functions, having a definition is not sufficient, since
9248# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9250$as_echo_n "checking for chroot... " >&6; }
9251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009252/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009253#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009254int
9255main ()
9256{
9257void *x=chroot
9258 ;
9259 return 0;
9260}
9261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009262if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009263
Matthias Kloseb9621712010-04-24 17:59:49 +00009264$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009265
Matthias Kloseb159a552010-04-25 21:00:44 +00009266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009267$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009268else
Matthias Kloseb9621712010-04-24 17:59:49 +00009269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9270$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009271
9272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9275$as_echo_n "checking for link... " >&6; }
9276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009277/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009278#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009279int
9280main ()
9281{
9282void *x=link
9283 ;
9284 return 0;
9285}
9286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009287if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009288
Matthias Kloseb9621712010-04-24 17:59:49 +00009289$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009290
Matthias Kloseb159a552010-04-25 21:00:44 +00009291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009292$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009293else
Matthias Kloseb9621712010-04-24 17:59:49 +00009294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9295$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009296
9297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9300$as_echo_n "checking for symlink... " >&6; }
9301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009302/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009303#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009304int
9305main ()
9306{
9307void *x=symlink
9308 ;
9309 return 0;
9310}
9311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009312if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009313
Matthias Kloseb9621712010-04-24 17:59:49 +00009314$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009315
Matthias Kloseb159a552010-04-25 21:00:44 +00009316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009317$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009318else
Matthias Kloseb9621712010-04-24 17:59:49 +00009319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9320$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009321
9322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9325$as_echo_n "checking for fchdir... " >&6; }
9326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009327/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009328#include <unistd.h>
9329int
9330main ()
9331{
9332void *x=fchdir
9333 ;
9334 return 0;
9335}
9336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009337if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009338
Matthias Kloseb9621712010-04-24 17:59:49 +00009339$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009340
Matthias Kloseb159a552010-04-25 21:00:44 +00009341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009342$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009343else
Matthias Kloseb9621712010-04-24 17:59:49 +00009344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9345$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009346
9347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9350$as_echo_n "checking for fsync... " >&6; }
9351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009352/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009353#include <unistd.h>
9354int
9355main ()
9356{
9357void *x=fsync
9358 ;
9359 return 0;
9360}
9361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009362if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009363
Matthias Kloseb9621712010-04-24 17:59:49 +00009364$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009365
Matthias Kloseb159a552010-04-25 21:00:44 +00009366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009367$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009368else
Matthias Kloseb9621712010-04-24 17:59:49 +00009369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9370$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009371
9372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9375$as_echo_n "checking for fdatasync... " >&6; }
9376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009377/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009378#include <unistd.h>
9379int
9380main ()
9381{
9382void *x=fdatasync
9383 ;
9384 return 0;
9385}
9386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009388
Matthias Kloseb9621712010-04-24 17:59:49 +00009389$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009390
Matthias Kloseb159a552010-04-25 21:00:44 +00009391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009392$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009393else
Matthias Kloseb9621712010-04-24 17:59:49 +00009394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9395$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009396
9397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9400$as_echo_n "checking for epoll... " >&6; }
9401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009402/* end confdefs.h. */
9403#include <sys/epoll.h>
9404int
9405main ()
9406{
9407void *x=epoll_create
9408 ;
9409 return 0;
9410}
9411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009412if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009413
Matthias Kloseb9621712010-04-24 17:59:49 +00009414$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009415
Matthias Kloseb159a552010-04-25 21:00:44 +00009416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009417$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009418else
Matthias Kloseb9621712010-04-24 17:59:49 +00009419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9420$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009421
9422fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9425$as_echo_n "checking for kqueue... " >&6; }
9426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009427/* end confdefs.h. */
9428
9429#include <sys/types.h>
9430#include <sys/event.h>
9431
9432int
9433main ()
9434{
9435int x=kqueue()
9436 ;
9437 return 0;
9438}
9439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009440if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009441
Matthias Kloseb9621712010-04-24 17:59:49 +00009442$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009443
Matthias Kloseb159a552010-04-25 21:00:44 +00009444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009445$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009446else
Matthias Kloseb9621712010-04-24 17:59:49 +00009447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9448$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009449
9450fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009452# On some systems (eg. FreeBSD 5), we would find a definition of the
9453# functions ctermid_r, setgroups in the library, but no prototype
9454# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9455# address to avoid compiler warnings and potential miscompilations
9456# because of the missing prototypes.
9457
Matthias Kloseb9621712010-04-24 17:59:49 +00009458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9459$as_echo_n "checking for ctermid_r... " >&6; }
9460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009461/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009462
Martin v. Löwisd5843682002-11-21 20:41:28 +00009463#include <stdio.h>
9464
Martin v. Löwisd5843682002-11-21 20:41:28 +00009465int
9466main ()
9467{
9468void* p = ctermid_r
9469 ;
9470 return 0;
9471}
9472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009473if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009474
Matthias Kloseb9621712010-04-24 17:59:49 +00009475$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009476
Matthias Kloseb159a552010-04-25 21:00:44 +00009477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009478$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009479else
Matthias Kloseb9621712010-04-24 17:59:49 +00009480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9481$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009482
9483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9485
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9487$as_echo_n "checking for flock declaration... " >&6; }
9488if test "${ac_cv_flock_decl+set}" = set; then :
9489 $as_echo_n "(cached) " >&6
9490else
9491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009492/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009493#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009494int
9495main ()
9496{
9497void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009498
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009499 ;
9500 return 0;
9501}
9502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009503if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009504 ac_cv_flock_decl=yes
9505else
9506 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009507
9508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009510
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009511fi
9512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9513$as_echo "$ac_cv_flock_decl" >&6; }
9514if test "x${ac_cv_flock_decl}" = xyes; then
9515 for ac_func in flock
9516do :
9517 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
9518if test "x$ac_cv_func_flock" = x""yes; then :
9519 cat >>confdefs.h <<_ACEOF
9520#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009521_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009522
Antoine Pitroua3000072010-09-07 14:52:42 +00009523else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009525$as_echo_n "checking for flock in -lbsd... " >&6; }
9526if test "${ac_cv_lib_bsd_flock+set}" = set; then :
9527 $as_echo_n "(cached) " >&6
9528else
9529 ac_check_lib_save_LIBS=$LIBS
9530LIBS="-lbsd $LIBS"
9531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9532/* end confdefs.h. */
9533
9534/* Override any GCC internal prototype to avoid an error.
9535 Use char because int might match the return type of a GCC
9536 builtin and then its argument prototype would still apply. */
9537#ifdef __cplusplus
9538extern "C"
9539#endif
9540char flock ();
9541int
9542main ()
9543{
9544return flock ();
9545 ;
9546 return 0;
9547}
9548_ACEOF
9549if ac_fn_c_try_link "$LINENO"; then :
9550 ac_cv_lib_bsd_flock=yes
9551else
9552 ac_cv_lib_bsd_flock=no
9553fi
9554rm -f core conftest.err conftest.$ac_objext \
9555 conftest$ac_exeext conftest.$ac_ext
9556LIBS=$ac_check_lib_save_LIBS
9557fi
9558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9559$as_echo "$ac_cv_lib_bsd_flock" >&6; }
9560if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009561 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009562
9563
9564$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9565
9566
9567fi
9568
9569
9570fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009571done
9572
Antoine Pitroua3000072010-09-07 14:52:42 +00009573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009574
Matthias Kloseb9621712010-04-24 17:59:49 +00009575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9576$as_echo_n "checking for getpagesize... " >&6; }
9577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009578/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009579
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009580#include <unistd.h>
9581
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009582int
9583main ()
9584{
9585void* p = getpagesize
9586 ;
9587 return 0;
9588}
9589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009590if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009591
Matthias Kloseb9621712010-04-24 17:59:49 +00009592$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009593
Matthias Kloseb159a552010-04-25 21:00:44 +00009594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009595$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009596else
Matthias Kloseb9621712010-04-24 17:59:49 +00009597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9598$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009599
9600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009602
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009603for ac_prog in true
9604do
9605 # Extract the first word of "$ac_prog", so it can be a program name with args.
9606set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9608$as_echo_n "checking for $ac_word... " >&6; }
9609if test "${ac_cv_prog_TRUE+set}" = set; then :
9610 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009611else
9612 if test -n "$TRUE"; then
9613 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9614else
9615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9616for as_dir in $PATH
9617do
9618 IFS=$as_save_IFS
9619 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009621 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 +00009622 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009623 $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 +00009624 break 2
9625 fi
9626done
Matthias Kloseb9621712010-04-24 17:59:49 +00009627 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009628IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009629
9630fi
9631fi
9632TRUE=$ac_cv_prog_TRUE
9633if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9635$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009636else
Matthias Kloseb9621712010-04-24 17:59:49 +00009637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9638$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009639fi
9640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009641
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009642 test -n "$TRUE" && break
9643done
9644test -n "$TRUE" || TRUE="/bin/true"
9645
9646
Matthias Kloseb9621712010-04-24 17:59:49 +00009647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9648$as_echo_n "checking for inet_aton in -lc... " >&6; }
9649if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9650 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009651else
9652 ac_check_lib_save_LIBS=$LIBS
9653LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009655/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657/* Override any GCC internal prototype to avoid an error.
9658 Use char because int might match the return type of a GCC
9659 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009660#ifdef __cplusplus
9661extern "C"
9662#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009663char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009664int
9665main ()
9666{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009667return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009668 ;
9669 return 0;
9670}
9671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009672if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009673 ac_cv_lib_c_inet_aton=yes
9674else
Matthias Kloseb9621712010-04-24 17:59:49 +00009675 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009677rm -f core conftest.err conftest.$ac_objext \
9678 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009679LIBS=$ac_check_lib_save_LIBS
9680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9682$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9683if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009684 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009685else
Matthias Kloseb9621712010-04-24 17:59:49 +00009686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9687$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9688if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9689 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009690else
9691 ac_check_lib_save_LIBS=$LIBS
9692LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009694/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009696/* Override any GCC internal prototype to avoid an error.
9697 Use char because int might match the return type of a GCC
9698 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009699#ifdef __cplusplus
9700extern "C"
9701#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009702char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009703int
9704main ()
9705{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009706return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009707 ;
9708 return 0;
9709}
9710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009711if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009712 ac_cv_lib_resolv_inet_aton=yes
9713else
Matthias Kloseb9621712010-04-24 17:59:49 +00009714 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009716rm -f core conftest.err conftest.$ac_objext \
9717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009718LIBS=$ac_check_lib_save_LIBS
9719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9721$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9722if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009723 cat >>confdefs.h <<_ACEOF
9724#define HAVE_LIBRESOLV 1
9725_ACEOF
9726
9727 LIBS="-lresolv $LIBS"
9728
9729fi
9730
9731
9732fi
9733
9734
Christian Heimesd0764e22007-12-04 15:00:33 +00009735# On Tru64, chflags seems to be present, but calling it will
9736# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9738$as_echo_n "checking for chflags... " >&6; }
9739if test "${ac_cv_have_chflags+set}" = set; then :
9740 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009741else
Matthias Kloseb9621712010-04-24 17:59:49 +00009742 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009743 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009744else
Matthias Kloseb9621712010-04-24 17:59:49 +00009745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009746/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009747[
Christian Heimesd0764e22007-12-04 15:00:33 +00009748#include <sys/stat.h>
9749#include <unistd.h>
9750int main(int argc, char*argv[])
9751{
9752 if(chflags(argv[0], 0) != 0)
9753 return 1;
9754 return 0;
9755}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009756]
Christian Heimesd0764e22007-12-04 15:00:33 +00009757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009758if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009759 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009760else
Matthias Kloseb9621712010-04-24 17:59:49 +00009761 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9764 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009765fi
9766
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009767
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9770$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009771if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9773if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009774 ac_cv_have_chflags="yes"
9775else
9776 ac_cv_have_chflags="no"
9777fi
9778
9779fi
9780if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009781
Matthias Kloseb9621712010-04-24 17:59:49 +00009782$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009783
9784fi
9785
Matthias Kloseb9621712010-04-24 17:59:49 +00009786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9787$as_echo_n "checking for lchflags... " >&6; }
9788if test "${ac_cv_have_lchflags+set}" = set; then :
9789 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009790else
Matthias Kloseb9621712010-04-24 17:59:49 +00009791 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009792 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009793else
Matthias Kloseb9621712010-04-24 17:59:49 +00009794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009795/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009796[
Christian Heimesd0764e22007-12-04 15:00:33 +00009797#include <sys/stat.h>
9798#include <unistd.h>
9799int main(int argc, char*argv[])
9800{
9801 if(lchflags(argv[0], 0) != 0)
9802 return 1;
9803 return 0;
9804}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009805]
Christian Heimesd0764e22007-12-04 15:00:33 +00009806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009807if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009808 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009809else
Matthias Kloseb9621712010-04-24 17:59:49 +00009810 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009812rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9813 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009814fi
9815
9816
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9819$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009820if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9822if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009823 ac_cv_have_lchflags="yes"
9824else
9825 ac_cv_have_lchflags="no"
9826fi
9827
9828fi
9829if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009830
Matthias Kloseb9621712010-04-24 17:59:49 +00009831$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009832
9833fi
9834
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009835case $ac_sys_system/$ac_sys_release in
9836Darwin/*)
9837 _CUR_CFLAGS="${CFLAGS}"
9838 _CUR_LDFLAGS="${LDFLAGS}"
9839 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9840 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9841 ;;
9842esac
9843
Matthias Kloseb9621712010-04-24 17:59:49 +00009844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9845$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9846if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9847 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009848else
9849 ac_check_lib_save_LIBS=$LIBS
9850LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009852/* end confdefs.h. */
9853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854/* Override any GCC internal prototype to avoid an error.
9855 Use char because int might match the return type of a GCC
9856 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009857#ifdef __cplusplus
9858extern "C"
9859#endif
9860char inflateCopy ();
9861int
9862main ()
9863{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009865 ;
9866 return 0;
9867}
9868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009869if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009870 ac_cv_lib_z_inflateCopy=yes
9871else
Matthias Kloseb9621712010-04-24 17:59:49 +00009872 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009874rm -f core conftest.err conftest.$ac_objext \
9875 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009876LIBS=$ac_check_lib_save_LIBS
9877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9879$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9880if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009881
Matthias Kloseb9621712010-04-24 17:59:49 +00009882$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009883
9884fi
9885
9886
9887case $ac_sys_system/$ac_sys_release in
9888Darwin/*)
9889 CFLAGS="${_CUR_CFLAGS}"
9890 LDFLAGS="${_CUR_LDFLAGS}"
9891 ;;
9892esac
9893
Matthias Kloseb9621712010-04-24 17:59:49 +00009894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9895$as_echo_n "checking for hstrerror... " >&6; }
9896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009897/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009898
Martin v. Löwise9416172003-05-03 10:12:45 +00009899#include <netdb.h>
9900
Martin v. Löwise9416172003-05-03 10:12:45 +00009901int
9902main ()
9903{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009904void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009905 ;
9906 return 0;
9907}
9908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009909if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009910
Matthias Kloseb9621712010-04-24 17:59:49 +00009911$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009912
Matthias Kloseb159a552010-04-25 21:00:44 +00009913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009914$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009915else
Matthias Kloseb9621712010-04-24 17:59:49 +00009916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9917$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009918
9919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009920rm -f core conftest.err conftest.$ac_objext \
9921 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009922
Matthias Kloseb9621712010-04-24 17:59:49 +00009923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9924$as_echo_n "checking for inet_aton... " >&6; }
9925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009926/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009927
Martin v. Löwis86d66262006-02-17 08:40:11 +00009928#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009929#include <sys/socket.h>
9930#include <netinet/in.h>
9931#include <arpa/inet.h>
9932
Martin v. Löwise9416172003-05-03 10:12:45 +00009933int
9934main ()
9935{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009936void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009937 ;
9938 return 0;
9939}
9940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009941if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009942
Matthias Kloseb9621712010-04-24 17:59:49 +00009943$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009944
Matthias Kloseb159a552010-04-25 21:00:44 +00009945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009946$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009947else
Matthias Kloseb9621712010-04-24 17:59:49 +00009948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9949$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009950
9951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009952rm -f core conftest.err conftest.$ac_objext \
9953 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009954
Matthias Kloseb9621712010-04-24 17:59:49 +00009955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9956$as_echo_n "checking for inet_pton... " >&6; }
9957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009958/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009959
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009960#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009961#include <sys/socket.h>
9962#include <netinet/in.h>
9963#include <arpa/inet.h>
9964
Martin v. Löwise9416172003-05-03 10:12:45 +00009965int
9966main ()
9967{
9968void* p = inet_pton
9969 ;
9970 return 0;
9971}
9972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009973if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009974
Matthias Kloseb9621712010-04-24 17:59:49 +00009975$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009976
Matthias Kloseb159a552010-04-25 21:00:44 +00009977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009978$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009979else
Matthias Kloseb9621712010-04-24 17:59:49 +00009980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9981$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009982
9983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +00009985
Martin v. Löwisd6640d42003-07-06 09:29:52 +00009986# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +00009987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
9988$as_echo_n "checking for setgroups... " >&6; }
9989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009990/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009991
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009992#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +00009993#ifdef HAVE_GRP_H
9994#include <grp.h>
9995#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +00009996
Martin v. Löwisd5843682002-11-21 20:41:28 +00009997int
9998main ()
9999{
10000void* p = setgroups
10001 ;
10002 return 0;
10003}
10004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010005if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010006
Matthias Kloseb9621712010-04-24 17:59:49 +000010007$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010008
Matthias Kloseb159a552010-04-25 21:00:44 +000010009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010010$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010011else
Matthias Kloseb9621712010-04-24 17:59:49 +000010012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10013$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010014
10015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010017
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010018# check for openpty and forkpty
10019
10020for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010021do :
10022 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10023if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010024 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010025#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010026_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010027
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010028else
Matthias Kloseb9621712010-04-24 17:59:49 +000010029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10030$as_echo_n "checking for openpty in -lutil... " >&6; }
10031if test "${ac_cv_lib_util_openpty+set}" = set; then :
10032 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010033else
Martin v. Löwis11437992002-04-12 09:54:03 +000010034 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010035LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010037/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010039/* Override any GCC internal prototype to avoid an error.
10040 Use char because int might match the return type of a GCC
10041 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010042#ifdef __cplusplus
10043extern "C"
10044#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010045char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010046int
10047main ()
10048{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010049return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010050 ;
10051 return 0;
10052}
10053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010054if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010055 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010056else
Matthias Kloseb9621712010-04-24 17:59:49 +000010057 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010059rm -f core conftest.err conftest.$ac_objext \
10060 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010061LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10064$as_echo "$ac_cv_lib_util_openpty" >&6; }
10065if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10066 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010067 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010068else
Matthias Kloseb9621712010-04-24 17:59:49 +000010069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10070$as_echo_n "checking for openpty in -lbsd... " >&6; }
10071if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10072 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010073else
10074 ac_check_lib_save_LIBS=$LIBS
10075LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010077/* end confdefs.h. */
10078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010079/* Override any GCC internal prototype to avoid an error.
10080 Use char because int might match the return type of a GCC
10081 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010082#ifdef __cplusplus
10083extern "C"
10084#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010085char openpty ();
10086int
10087main ()
10088{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010089return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010090 ;
10091 return 0;
10092}
10093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010094if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010095 ac_cv_lib_bsd_openpty=yes
10096else
Matthias Kloseb9621712010-04-24 17:59:49 +000010097 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010099rm -f core conftest.err conftest.$ac_objext \
10100 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010101LIBS=$ac_check_lib_save_LIBS
10102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10104$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10105if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10106 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010107 LIBS="$LIBS -lbsd"
10108fi
10109
10110
10111fi
10112
Fred Drake8cef4cf2000-06-28 16:40:38 +000010113
10114fi
10115done
10116
10117for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010118do :
10119 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10120if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010121 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010122#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010123_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010124
Fred Drake8cef4cf2000-06-28 16:40:38 +000010125else
Matthias Kloseb9621712010-04-24 17:59:49 +000010126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10127$as_echo_n "checking for forkpty in -lutil... " >&6; }
10128if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10129 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010130else
Martin v. Löwis11437992002-04-12 09:54:03 +000010131 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010132LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010134/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010136/* Override any GCC internal prototype to avoid an error.
10137 Use char because int might match the return type of a GCC
10138 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010139#ifdef __cplusplus
10140extern "C"
10141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010142char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010143int
10144main ()
10145{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010147 ;
10148 return 0;
10149}
10150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010151if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010153else
Matthias Kloseb9621712010-04-24 17:59:49 +000010154 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010156rm -f core conftest.err conftest.$ac_objext \
10157 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010158LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10161$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10162if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10163 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010164 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010165else
Matthias Kloseb9621712010-04-24 17:59:49 +000010166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10167$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10168if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10169 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010170else
10171 ac_check_lib_save_LIBS=$LIBS
10172LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010174/* end confdefs.h. */
10175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176/* Override any GCC internal prototype to avoid an error.
10177 Use char because int might match the return type of a GCC
10178 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010179#ifdef __cplusplus
10180extern "C"
10181#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010182char forkpty ();
10183int
10184main ()
10185{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010186return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010187 ;
10188 return 0;
10189}
10190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010191if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010192 ac_cv_lib_bsd_forkpty=yes
10193else
Matthias Kloseb9621712010-04-24 17:59:49 +000010194 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010196rm -f core conftest.err conftest.$ac_objext \
10197 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010198LIBS=$ac_check_lib_save_LIBS
10199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10201$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10202if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10203 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010204 LIBS="$LIBS -lbsd"
10205fi
10206
10207
10208fi
10209
Fred Drake8cef4cf2000-06-28 16:40:38 +000010210
10211fi
10212done
10213
Jack Jansendd19cf82001-12-06 22:36:17 +000010214
Christian Heimesb186d002008-03-18 15:15:01 +000010215# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010216for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010217do :
10218 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10219if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010220 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010221#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010222_ACEOF
10223
10224fi
10225done
10226
10227
Michael W. Hudson54241132001-12-07 15:38:26 +000010228# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010229for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010230do :
10231 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10232ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000010233if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010235#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010236_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010237
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010238fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010239done
10240
Michael W. Hudson54241132001-12-07 15:38:26 +000010241
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000010242ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10243if test "x$ac_cv_func_dup2" = x""yes; then :
10244 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010245
Martin v. Löwis1142de32002-03-29 16:28:31 +000010246else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010247 case " $LIBOBJS " in
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000010248 *" dup2.$ac_objext "* ) ;;
10249 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010250 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010251esac
10252
Martin v. Löwis1142de32002-03-29 16:28:31 +000010253fi
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000010254
10255ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10256if test "x$ac_cv_func_getcwd" = x""yes; then :
10257 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10258
10259else
10260 case " $LIBOBJS " in
10261 *" getcwd.$ac_objext "* ) ;;
10262 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10263 ;;
10264esac
10265
10266fi
10267
10268ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10269if test "x$ac_cv_func_strdup" = x""yes; then :
10270 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10271
10272else
10273 case " $LIBOBJS " in
10274 *" strdup.$ac_objext "* ) ;;
10275 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10276 ;;
10277esac
10278
10279fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010280
10281
10282for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010283do :
10284 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10285if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010286 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010287#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010290/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010291#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010292int
10293main ()
10294{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010295getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 ;
10297 return 0;
10298}
10299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010300if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010301
Matthias Kloseb9621712010-04-24 17:59:49 +000010302$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010303
Guido van Rossum627b2d71993-12-24 10:39:16 +000010304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010306
Guido van Rossum627b2d71993-12-24 10:39:16 +000010307fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010308done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010309
Jack Jansen150753c2003-03-29 22:07:47 +000010310for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010311do :
10312 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10313if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010314 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010315#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010318/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010319#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010320int
10321main ()
10322{
10323setpgrp(0,0);
10324 ;
10325 return 0;
10326}
10327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010328if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010329
Matthias Kloseb9621712010-04-24 17:59:49 +000010330$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010331
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010334
10335fi
10336done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010337
Thomas Wouters3a584202000-08-05 23:28:51 +000010338for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010339do :
10340 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10341if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010342 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010343#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010346/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010347#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010348int
10349main ()
10350{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010351gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010352 ;
10353 return 0;
10354}
10355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010356if ac_fn_c_try_compile "$LINENO"; then :
10357
Guido van Rossum627b2d71993-12-24 10:39:16 +000010358else
Skip Montanaro6dead952003-09-25 14:50:04 +000010359
Matthias Kloseb9621712010-04-24 17:59:49 +000010360$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010361
Martin v. Löwis11437992002-04-12 09:54:03 +000010362
Guido van Rossum627b2d71993-12-24 10:39:16 +000010363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010365
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010366fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010367done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010368
Michael W. Hudson54241132001-12-07 15:38:26 +000010369
Matthias Kloseb9621712010-04-24 17:59:49 +000010370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10371$as_echo_n "checking for major... " >&6; }
10372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010373/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010374
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010375#if defined(MAJOR_IN_MKDEV)
10376#include <sys/mkdev.h>
10377#elif defined(MAJOR_IN_SYSMACROS)
10378#include <sys/sysmacros.h>
10379#else
10380#include <sys/types.h>
10381#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010382
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010383int
10384main ()
10385{
10386
10387 makedev(major(0),minor(0));
10388
10389 ;
10390 return 0;
10391}
10392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010393if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010394
10395
Matthias Kloseb9621712010-04-24 17:59:49 +000010396$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010397
Matthias Kloseb9621712010-04-24 17:59:49 +000010398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10399$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010400
10401else
Skip Montanaro6dead952003-09-25 14:50:04 +000010402
Matthias Kloseb9621712010-04-24 17:59:49 +000010403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10404$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010405
10406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010407rm -f core conftest.err conftest.$ac_objext \
10408 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010409
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010410# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010411# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10413$as_echo_n "checking for getaddrinfo... " >&6; }
10414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010415/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010416
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010417#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010418#include <sys/socket.h>
10419#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010420#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010421
Martin v. Löwis11437992002-04-12 09:54:03 +000010422int
10423main ()
10424{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010425getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010426 ;
10427 return 0;
10428}
10429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010430if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010431 have_getaddrinfo=yes
10432else
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010435rm -f core conftest.err conftest.$ac_objext \
10436 conftest$ac_exeext conftest.$ac_ext
10437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10438$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010439if test $have_getaddrinfo = yes
10440then
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10442$as_echo_n "checking getaddrinfo bug... " >&6; }
10443 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10444 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010445else
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010447 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010448else
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010450/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010451
10452#include <sys/types.h>
10453#include <netdb.h>
10454#include <string.h>
10455#include <sys/socket.h>
10456#include <netinet/in.h>
10457
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010458int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010459{
10460 int passive, gaierr, inet4 = 0, inet6 = 0;
10461 struct addrinfo hints, *ai, *aitop;
10462 char straddr[INET6_ADDRSTRLEN], strport[16];
10463
10464 for (passive = 0; passive <= 1; passive++) {
10465 memset(&hints, 0, sizeof(hints));
10466 hints.ai_family = AF_UNSPEC;
10467 hints.ai_flags = passive ? AI_PASSIVE : 0;
10468 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010469 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010470 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10471 (void)gai_strerror(gaierr);
10472 goto bad;
10473 }
10474 for (ai = aitop; ai; ai = ai->ai_next) {
10475 if (ai->ai_addr == NULL ||
10476 ai->ai_addrlen == 0 ||
10477 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10478 straddr, sizeof(straddr), strport, sizeof(strport),
10479 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10480 goto bad;
10481 }
10482 switch (ai->ai_family) {
10483 case AF_INET:
10484 if (strcmp(strport, "54321") != 0) {
10485 goto bad;
10486 }
10487 if (passive) {
10488 if (strcmp(straddr, "0.0.0.0") != 0) {
10489 goto bad;
10490 }
10491 } else {
10492 if (strcmp(straddr, "127.0.0.1") != 0) {
10493 goto bad;
10494 }
10495 }
10496 inet4++;
10497 break;
10498 case AF_INET6:
10499 if (strcmp(strport, "54321") != 0) {
10500 goto bad;
10501 }
10502 if (passive) {
10503 if (strcmp(straddr, "::") != 0) {
10504 goto bad;
10505 }
10506 } else {
10507 if (strcmp(straddr, "::1") != 0) {
10508 goto bad;
10509 }
10510 }
10511 inet6++;
10512 break;
10513 case AF_UNSPEC:
10514 goto bad;
10515 break;
10516 default:
10517 /* another family support? */
10518 break;
10519 }
10520 }
10521 }
10522
10523 if (!(inet4 == 0 || inet4 == 2))
10524 goto bad;
10525 if (!(inet6 == 0 || inet6 == 2))
10526 goto bad;
10527
10528 if (aitop)
10529 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010530 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010531
10532 bad:
10533 if (aitop)
10534 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010535 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010536}
10537
Martin v. Löwis11437992002-04-12 09:54:03 +000010538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010539if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010540 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010541else
Matthias Kloseb9621712010-04-24 17:59:49 +000010542 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10545 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010547
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010548fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010549
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010551
Mark Dickinson2df5d282009-12-31 21:22:50 +000010552if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010553then
10554 if test $ipv6 = yes
10555 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010556 echo 'Fatal: You must get working getaddrinfo() function.'
10557 echo ' or you can specify "--disable-ipv6"'.
10558 exit 1
10559 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010560else
Martin v. Löwis11437992002-04-12 09:54:03 +000010561
Matthias Kloseb9621712010-04-24 17:59:49 +000010562$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010563
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010564fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010565for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010566do :
10567 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10568if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010569 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010570#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010571_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010572
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010573fi
10574done
10575
Michael W. Hudson54241132001-12-07 15:38:26 +000010576
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010577# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10579$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10580if test "${ac_cv_header_time+set}" = set; then :
10581 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010582else
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010584/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010585#include <sys/types.h>
10586#include <sys/time.h>
10587#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010588
Martin v. Löwis11437992002-04-12 09:54:03 +000010589int
10590main ()
10591{
10592if ((struct tm *) 0)
10593return 0;
10594 ;
10595 return 0;
10596}
10597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010598if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010599 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010600else
Matthias Kloseb9621712010-04-24 17:59:49 +000010601 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10606$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010607if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010608
Matthias Kloseb9621712010-04-24 17:59:49 +000010609$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010610
10611fi
10612
Matthias Kloseb9621712010-04-24 17:59:49 +000010613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10614$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10615if test "${ac_cv_struct_tm+set}" = set; then :
10616 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010617else
Matthias Kloseb9621712010-04-24 17:59:49 +000010618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010619/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010620#include <sys/types.h>
10621#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010622
Martin v. Löwis11437992002-04-12 09:54:03 +000010623int
10624main ()
10625{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010626struct tm tm;
10627 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010628 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010629 ;
10630 return 0;
10631}
10632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010633if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010634 ac_cv_struct_tm=time.h
10635else
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10641$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010642if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010643
Matthias Kloseb9621712010-04-24 17:59:49 +000010644$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010645
10646fi
10647
Matthias Kloseb9621712010-04-24 17:59:49 +000010648ac_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 +000010649#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010650
Matthias Kloseb9621712010-04-24 17:59:49 +000010651"
10652if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010653
10654cat >>confdefs.h <<_ACEOF
10655#define HAVE_STRUCT_TM_TM_ZONE 1
10656_ACEOF
10657
10658
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010659fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010660
Martin v. Löwis11437992002-04-12 09:54:03 +000010661if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10662
Matthias Kloseb9621712010-04-24 17:59:49 +000010663$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010664
10665else
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10667"
10668if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10669 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010670else
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010672fi
10673
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010675#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010676_ACEOF
10677
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10679$as_echo_n "checking for tzname... " >&6; }
10680if test "${ac_cv_var_tzname+set}" = set; then :
10681 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010682else
Matthias Kloseb9621712010-04-24 17:59:49 +000010683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010684/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010685#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686#if !HAVE_DECL_TZNAME
10687extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010689
Martin v. Löwis11437992002-04-12 09:54:03 +000010690int
10691main ()
10692{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010694 ;
10695 return 0;
10696}
10697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010698if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010699 ac_cv_var_tzname=yes
10700else
Matthias Kloseb9621712010-04-24 17:59:49 +000010701 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010703rm -f core conftest.err conftest.$ac_objext \
10704 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10707$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010708 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010709
Matthias Kloseb9621712010-04-24 17:59:49 +000010710$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010711
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010712 fi
10713fi
10714
Matthias Kloseb9621712010-04-24 17:59:49 +000010715ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10716if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010717
10718cat >>confdefs.h <<_ACEOF
10719#define HAVE_STRUCT_STAT_ST_RDEV 1
10720_ACEOF
10721
10722
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010723fi
10724
Matthias Kloseb9621712010-04-24 17:59:49 +000010725ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10726if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010727
Martin v. Löwis11437992002-04-12 09:54:03 +000010728cat >>confdefs.h <<_ACEOF
10729#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10730_ACEOF
10731
10732
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010733fi
10734
Matthias Kloseb9621712010-04-24 17:59:49 +000010735ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10736if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010737
10738cat >>confdefs.h <<_ACEOF
10739#define HAVE_STRUCT_STAT_ST_FLAGS 1
10740_ACEOF
10741
10742
10743fi
10744
Matthias Kloseb9621712010-04-24 17:59:49 +000010745ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10746if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010747
10748cat >>confdefs.h <<_ACEOF
10749#define HAVE_STRUCT_STAT_ST_GEN 1
10750_ACEOF
10751
10752
10753fi
10754
Matthias Kloseb9621712010-04-24 17:59:49 +000010755ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10756if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010757
10758cat >>confdefs.h <<_ACEOF
10759#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10760_ACEOF
10761
10762
10763fi
10764
Matthias Kloseb9621712010-04-24 17:59:49 +000010765ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10766if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010767
Martin v. Löwis11437992002-04-12 09:54:03 +000010768cat >>confdefs.h <<_ACEOF
10769#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10770_ACEOF
10771
10772
Matthias Kloseb9621712010-04-24 17:59:49 +000010773$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010774
10775else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010776 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010777 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010778 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10779 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010780esac
10781
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010782fi
10783
Michael W. Hudson54241132001-12-07 15:38:26 +000010784
Martin v. Löwis11437992002-04-12 09:54:03 +000010785
Matthias Kloseb9621712010-04-24 17:59:49 +000010786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10787$as_echo_n "checking for time.h that defines altzone... " >&6; }
10788if test "${ac_cv_header_time_altzone+set}" = set; then :
10789 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010790else
Matthias Kloseb159a552010-04-25 21:00:44 +000010791
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010793/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010794#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010795int
10796main ()
10797{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010798return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010799 ;
10800 return 0;
10801}
10802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010803if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010804 ac_cv_header_time_altzone=yes
10805else
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010810fi
10811
Matthias Kloseb9621712010-04-24 17:59:49 +000010812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10813$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010814if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010815
Matthias Kloseb9621712010-04-24 17:59:49 +000010816$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010817
10818fi
10819
Guido van Rossumda88dad1995-01-26 00:46:29 +000010820was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10822$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010824/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010825
10826#include <sys/types.h>
10827#include <sys/select.h>
10828#include <sys/time.h>
10829
Martin v. Löwis11437992002-04-12 09:54:03 +000010830int
10831main ()
10832{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010833;
Martin v. Löwis11437992002-04-12 09:54:03 +000010834 ;
10835 return 0;
10836}
10837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010838if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010839
10840
Matthias Kloseb9621712010-04-24 17:59:49 +000010841$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010842
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010843 was_it_defined=yes
10844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10848$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10851$as_echo_n "checking for addrinfo... " >&6; }
10852if test "${ac_cv_struct_addrinfo+set}" = set; then :
10853 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010854else
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010856/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010857#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010858int
10859main ()
10860{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010861struct addrinfo a
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öwis01dfdb32001-06-23 16:30:13 +000010867 ac_cv_struct_addrinfo=yes
10868else
Matthias Kloseb9621712010-04-24 17:59:49 +000010869 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10872fi
10873
Matthias Kloseb9621712010-04-24 17:59:49 +000010874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10875$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010876if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010877
Matthias Kloseb9621712010-04-24 17:59:49 +000010878$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010879
10880fi
10881
Matthias Kloseb9621712010-04-24 17:59:49 +000010882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10883$as_echo_n "checking for sockaddr_storage... " >&6; }
10884if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10885 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010886else
Matthias Kloseb9621712010-04-24 17:59:49 +000010887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010888/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010889
10890# include <sys/types.h>
10891# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010892int
10893main ()
10894{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010895struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010896 ;
10897 return 0;
10898}
10899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010900if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010901 ac_cv_struct_sockaddr_storage=yes
10902else
Matthias Kloseb9621712010-04-24 17:59:49 +000010903 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10906fi
10907
Matthias Kloseb9621712010-04-24 17:59:49 +000010908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10909$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010910if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010911
Matthias Kloseb9621712010-04-24 17:59:49 +000010912$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010913
10914fi
10915
Guido van Rossum627b2d71993-12-24 10:39:16 +000010916# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010917
Matthias Kloseb9621712010-04-24 17:59:49 +000010918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10919$as_echo_n "checking whether char is unsigned... " >&6; }
10920if test "${ac_cv_c_char_unsigned+set}" = set; then :
10921 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010922else
Matthias Kloseb9621712010-04-24 17:59:49 +000010923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010925$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010926int
10927main ()
10928{
10929static int test_array [1 - 2 * !(((char) -1) < 0)];
10930test_array [0] = 0
10931
10932 ;
10933 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010934}
Martin v. Löwis11437992002-04-12 09:54:03 +000010935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010936if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010937 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010938else
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010942fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10944$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010945if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010946 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010947
10948fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010949
Matthias Kloseb9621712010-04-24 17:59:49 +000010950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10951$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10952if test "${ac_cv_c_const+set}" = set; then :
10953 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010954else
Matthias Kloseb9621712010-04-24 17:59:49 +000010955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010956/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010957
Martin v. Löwis11437992002-04-12 09:54:03 +000010958int
10959main ()
10960{
10961/* FIXME: Include the comments suggested by Paul. */
10962#ifndef __cplusplus
10963 /* Ultrix mips cc rejects this. */
10964 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010965 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010966 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010967 char const *const *pcpcc;
10968 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010969 /* NEC SVR4.0.2 mips cc rejects this. */
10970 struct point {int x, y;};
10971 static struct point const zero = {0,0};
10972 /* AIX XL C 1.02.0.0 rejects this.
10973 It does not let you subtract one const X* pointer from another in
10974 an arm of an if-expression whose if-part is not a constant
10975 expression */
10976 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010977 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010979 ++pcpcc;
10980 ppc = (char**) pcpcc;
10981 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010982 { /* SCO 3.2v4 cc rejects this. */
10983 char *t;
10984 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010985
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010987 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010988 }
10989 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10990 int x[] = {25, 17};
10991 const int *foo = &x[0];
10992 ++foo;
10993 }
10994 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10995 typedef const int *iptr;
10996 iptr p = 0;
10997 ++p;
10998 }
10999 { /* AIX XL C 1.02.0.0 rejects this saying
11000 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11001 struct s { int j; const int *ap[3]; };
11002 struct s *b; b->j = 5;
11003 }
11004 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11005 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011006 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011008 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011009#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011010
Martin v. Löwis11437992002-04-12 09:54:03 +000011011 ;
11012 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011013}
Martin v. Löwis11437992002-04-12 09:54:03 +000011014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011015if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011016 ac_cv_c_const=yes
11017else
Matthias Kloseb9621712010-04-24 17:59:49 +000011018 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11023$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011024if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011025
Matthias Kloseb9621712010-04-24 17:59:49 +000011026$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011027
11028fi
11029
Michael W. Hudson54241132001-12-07 15:38:26 +000011030
Guido van Rossumda88dad1995-01-26 00:46:29 +000011031works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11033$as_echo_n "checking for working volatile... " >&6; }
11034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011035/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011036
Martin v. Löwis11437992002-04-12 09:54:03 +000011037int
11038main ()
11039{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011040volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011041 ;
11042 return 0;
11043}
11044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011045if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011046 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011047else
Skip Montanaro6dead952003-09-25 14:50:04 +000011048
Matthias Kloseb9621712010-04-24 17:59:49 +000011049$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011050
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011051
Guido van Rossum627b2d71993-12-24 10:39:16 +000011052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11055$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011056
Guido van Rossumda88dad1995-01-26 00:46:29 +000011057works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11059$as_echo_n "checking for working signed char... " >&6; }
11060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011061/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011062
Martin v. Löwis11437992002-04-12 09:54:03 +000011063int
11064main ()
11065{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011066signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011067 ;
11068 return 0;
11069}
11070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011071if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011072 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011073else
Skip Montanaro6dead952003-09-25 14:50:04 +000011074
Matthias Kloseb9621712010-04-24 17:59:49 +000011075$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011076
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011077
Guido van Rossum7f43da71994-08-01 12:15:30 +000011078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11081$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011082
Guido van Rossumda88dad1995-01-26 00:46:29 +000011083have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11085$as_echo_n "checking for prototypes... " >&6; }
11086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011087/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011088int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011089int
11090main ()
11091{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011092return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011093 ;
11094 return 0;
11095}
11096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011097if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011098
Matthias Kloseb9621712010-04-24 17:59:49 +000011099$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011100
Matthias Kloseb159a552010-04-25 21:00:44 +000011101 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11105$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011106
Guido van Rossumda88dad1995-01-26 00:46:29 +000011107works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11109$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011111/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011112
11113#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011114int foo(int x, ...) {
11115 va_list va;
11116 va_start(va, x);
11117 va_arg(va, int);
11118 va_arg(va, char *);
11119 va_arg(va, double);
11120 return 0;
11121}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011122
Martin v. Löwis11437992002-04-12 09:54:03 +000011123int
11124main ()
11125{
Guido van Rossum90eea071996-08-30 20:58:57 +000011126return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 ;
11128 return 0;
11129}
11130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011131if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011132
11133
Matthias Kloseb9621712010-04-24 17:59:49 +000011134$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011135
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011136 works=yes
11137
Guido van Rossum627b2d71993-12-24 10:39:16 +000011138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11141$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011142
Martin v. Löwisd6320502004-08-12 13:45:08 +000011143# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11145$as_echo_n "checking for socketpair... " >&6; }
11146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011147/* end confdefs.h. */
11148
11149#include <sys/types.h>
11150#include <sys/socket.h>
11151
11152int
11153main ()
11154{
11155void *x=socketpair
11156 ;
11157 return 0;
11158}
11159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011160if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011161
Matthias Kloseb9621712010-04-24 17:59:49 +000011162$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011163
Matthias Kloseb159a552010-04-25 21:00:44 +000011164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011165$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011166else
Matthias Kloseb9621712010-04-24 17:59:49 +000011167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11168$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011169
11170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011172
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011173# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11175$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011177/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011178#include <sys/types.h>
11179#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011180int
11181main ()
11182{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011183struct sockaddr x;
11184x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011185 ;
11186 return 0;
11187}
11188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011189if ac_fn_c_try_compile "$LINENO"; then :
11190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11191$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011192
Matthias Kloseb9621712010-04-24 17:59:49 +000011193$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011194
11195else
Matthias Kloseb9621712010-04-24 17:59:49 +000011196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11197$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011198
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011201
Guido van Rossumda88dad1995-01-26 00:46:29 +000011202va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11204$as_echo_n "checking whether va_list is an array... " >&6; }
11205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011206/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011207
11208#ifdef HAVE_STDARG_PROTOTYPES
11209#include <stdarg.h>
11210#else
11211#include <varargs.h>
11212#endif
11213
Martin v. Löwis11437992002-04-12 09:54:03 +000011214int
11215main ()
11216{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011217va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011218 ;
11219 return 0;
11220}
11221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011222if ac_fn_c_try_compile "$LINENO"; then :
11223
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011224else
Skip Montanaro6dead952003-09-25 14:50:04 +000011225
Martin v. Löwis11437992002-04-12 09:54:03 +000011226
Matthias Kloseb9621712010-04-24 17:59:49 +000011227$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011228
Guido van Rossumda88dad1995-01-26 00:46:29 +000011229 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011230
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11234$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011235
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011236# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011237
11238
Matthias Kloseb9621712010-04-24 17:59:49 +000011239ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11240if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011241
Matthias Kloseb9621712010-04-24 17:59:49 +000011242 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011243
Matthias Kloseb9621712010-04-24 17:59:49 +000011244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11245$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011246 OLD_CFLAGS=$CFLAGS
11247 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011249/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011250
11251# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011252
Martin v. Löwis11437992002-04-12 09:54:03 +000011253int
11254main ()
11255{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011256
11257 char *name;
11258 struct hostent *he, *res;
11259 char buffer[2048];
11260 int buflen = 2048;
11261 int h_errnop;
11262
11263 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011264
11265 ;
11266 return 0;
11267}
11268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011269if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011270
Matthias Kloseb9621712010-04-24 17:59:49 +000011271 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011272
Martin v. Löwis11437992002-04-12 09:54:03 +000011273
Matthias Kloseb9621712010-04-24 17:59:49 +000011274$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011275
Matthias Kloseb9621712010-04-24 17:59:49 +000011276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11277$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011278
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011279else
Skip Montanaro6dead952003-09-25 14:50:04 +000011280
Matthias Kloseb9621712010-04-24 17:59:49 +000011281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11282$as_echo "no" >&6; }
11283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11284$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011286/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011287
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011288# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011289
Martin v. Löwis11437992002-04-12 09:54:03 +000011290int
11291main ()
11292{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011293
11294 char *name;
11295 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011296 char buffer[2048];
11297 int buflen = 2048;
11298 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011299
Matthias Kloseb159a552010-04-25 21:00:44 +000011300 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011301
11302 ;
11303 return 0;
11304}
11305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011306if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011307
Matthias Kloseb9621712010-04-24 17:59:49 +000011308 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011309
Martin v. Löwis11437992002-04-12 09:54:03 +000011310
Matthias Kloseb159a552010-04-25 21:00:44 +000011311$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011312
Matthias Kloseb9621712010-04-24 17:59:49 +000011313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11314$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011315
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011316else
Skip Montanaro6dead952003-09-25 14:50:04 +000011317
Matthias Kloseb9621712010-04-24 17:59:49 +000011318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11319$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11321$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11323/* end confdefs.h. */
11324
11325# include <netdb.h>
11326
11327int
11328main ()
11329{
11330
11331 char *name;
11332 struct hostent *he;
11333 struct hostent_data data;
11334
11335 (void) gethostbyname_r(name, he, &data);
11336
11337 ;
11338 return 0;
11339}
11340_ACEOF
11341if ac_fn_c_try_compile "$LINENO"; then :
11342
11343 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11344
11345
11346$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11347
11348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11349$as_echo "yes" >&6; }
11350
11351else
11352
11353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11354$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011355
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011358
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011361
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011364 CFLAGS=$OLD_CFLAGS
11365
11366else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011367
Matthias Kloseb9621712010-04-24 17:59:49 +000011368 for ac_func in gethostbyname
11369do :
11370 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11371if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011373#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011374_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011375
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011376fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011377done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011378
Michael W. Hudson54241132001-12-07 15:38:26 +000011379
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011380fi
11381
Michael W. Hudson54241132001-12-07 15:38:26 +000011382
11383
11384
11385
11386
11387
Guido van Rossum627b2d71993-12-24 10:39:16 +000011388# checks for system services
11389# (none yet)
11390
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011391# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011392ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11393if test "x$ac_cv_func___fpu_control" = x""yes; then :
11394
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011395else
Matthias Kloseb9621712010-04-24 17:59:49 +000011396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11397$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11398if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11399 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011400else
Martin v. Löwis11437992002-04-12 09:54:03 +000011401 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011402LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011406/* Override any GCC internal prototype to avoid an error.
11407 Use char because int might match the return type of a GCC
11408 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011409#ifdef __cplusplus
11410extern "C"
11411#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011412char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011413int
11414main ()
11415{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011416return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011417 ;
11418 return 0;
11419}
11420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011421if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011422 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011423else
Matthias Kloseb9621712010-04-24 17:59:49 +000011424 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011426rm -f core conftest.err conftest.$ac_objext \
11427 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011428LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11431$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11432if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011433 cat >>confdefs.h <<_ACEOF
11434#define HAVE_LIBIEEE 1
11435_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011436
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011437 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011438
Guido van Rossum627b2d71993-12-24 10:39:16 +000011439fi
11440
Michael W. Hudson54241132001-12-07 15:38:26 +000011441
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011442fi
11443
Michael W. Hudson54241132001-12-07 15:38:26 +000011444
Guido van Rossum7f253911997-05-09 02:42:48 +000011445# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11447$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011449# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011450if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011451 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011452if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011453then
11454
Matthias Kloseb9621712010-04-24 17:59:49 +000011455$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011456
Matthias Kloseb9621712010-04-24 17:59:49 +000011457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11458$as_echo "yes" >&6; }
11459else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11460$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011461fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011462else
Matthias Kloseb9621712010-04-24 17:59:49 +000011463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11464$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011465fi
11466
Guido van Rossum7f253911997-05-09 02:42:48 +000011467
Guido van Rossum7f43da71994-08-01 12:15:30 +000011468# check for --with-libm=...
11469
Guido van Rossum563e7081996-09-10 18:20:48 +000011470case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011471Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011472*) LIBM=-lm
11473esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11475$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011477# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011478if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011479 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011480if test "$withval" = no
11481then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11483$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011484elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011485then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11487$as_echo "set LIBM=\"$withval\"" >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000011488else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011489fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011490else
Matthias Kloseb9621712010-04-24 17:59:49 +000011491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11492$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011493fi
11494
Guido van Rossum7f43da71994-08-01 12:15:30 +000011495
11496# check for --with-libc=...
11497
Matthias Kloseb9621712010-04-24 17:59:49 +000011498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11499$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011501# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011502if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011503 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011504if test "$withval" = no
11505then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11507$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011508elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011509then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11511$as_echo "set LIBC=\"$withval\"" >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000011512else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011513fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011514else
Matthias Kloseb9621712010-04-24 17:59:49 +000011515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11516$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011517fi
11518
Guido van Rossum7f43da71994-08-01 12:15:30 +000011519
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011520# **************************************************
11521# * Check for various properties of floating point *
11522# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011523
Matthias Kloseb9621712010-04-24 17:59:49 +000011524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11525$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11526if test "${ac_cv_little_endian_double+set}" = set; then :
11527 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011528else
11529
Matthias Kloseb9621712010-04-24 17:59:49 +000011530if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011531 ac_cv_little_endian_double=no
11532else
Matthias Kloseb9621712010-04-24 17:59:49 +000011533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011534/* end confdefs.h. */
11535
11536#include <string.h>
11537int main() {
11538 double x = 9006104071832581.0;
11539 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11540 return 0;
11541 else
11542 return 1;
11543}
11544
11545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011546if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011547 ac_cv_little_endian_double=yes
11548else
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011550fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11552 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011553fi
11554
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011555fi
11556
Matthias Kloseb9621712010-04-24 17:59:49 +000011557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11558$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011559if test "$ac_cv_little_endian_double" = yes
11560then
11561
Matthias Kloseb9621712010-04-24 17:59:49 +000011562$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011563
11564fi
11565
Matthias Kloseb9621712010-04-24 17:59:49 +000011566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11567$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11568if test "${ac_cv_big_endian_double+set}" = set; then :
11569 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011570else
11571
Matthias Kloseb9621712010-04-24 17:59:49 +000011572if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011573 ac_cv_big_endian_double=no
11574else
Matthias Kloseb9621712010-04-24 17:59:49 +000011575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011576/* end confdefs.h. */
11577
11578#include <string.h>
11579int main() {
11580 double x = 9006104071832581.0;
11581 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11582 return 0;
11583 else
11584 return 1;
11585}
11586
11587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011588if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011589 ac_cv_big_endian_double=yes
11590else
Matthias Kloseb9621712010-04-24 17:59:49 +000011591 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011593rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11594 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011595fi
11596
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011597fi
11598
Matthias Kloseb9621712010-04-24 17:59:49 +000011599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11600$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011601if test "$ac_cv_big_endian_double" = yes
11602then
11603
Matthias Kloseb9621712010-04-24 17:59:49 +000011604$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011605
11606fi
11607
11608# Some ARM platforms use a mixed-endian representation for doubles.
11609# While Python doesn't currently have full support for these platforms
11610# (see e.g., issue 1762561), we can at least make sure that float <-> string
11611# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11613$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11614if test "${ac_cv_mixed_endian_double+set}" = set; then :
11615 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011616else
11617
Matthias Kloseb9621712010-04-24 17:59:49 +000011618if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011619 ac_cv_mixed_endian_double=no
11620else
Matthias Kloseb9621712010-04-24 17:59:49 +000011621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011622/* end confdefs.h. */
11623
11624#include <string.h>
11625int main() {
11626 double x = 9006104071832581.0;
11627 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11628 return 0;
11629 else
11630 return 1;
11631}
11632
11633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011634if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011635 ac_cv_mixed_endian_double=yes
11636else
Matthias Kloseb9621712010-04-24 17:59:49 +000011637 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11640 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011641fi
11642
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011643fi
11644
Matthias Kloseb9621712010-04-24 17:59:49 +000011645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11646$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011647if test "$ac_cv_mixed_endian_double" = yes
11648then
11649
Matthias Kloseb9621712010-04-24 17:59:49 +000011650$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011651
11652fi
11653
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011654# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011655# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011656# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011657# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011658# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011659# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011660
11661# This inline assembler syntax may also work for suncc and icc,
11662# so we try it on all platforms.
11663
Matthias Kloseb9621712010-04-24 17:59:49 +000011664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11665$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011667/* end confdefs.h. */
11668
11669int
11670main ()
11671{
11672
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011673 unsigned short cw;
11674 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11675 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011676
11677 ;
11678 return 0;
11679}
11680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011681if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011682 have_gcc_asm_for_x87=yes
11683else
Matthias Kloseb9621712010-04-24 17:59:49 +000011684 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011685fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11688$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011689if test "$have_gcc_asm_for_x87" = yes
11690then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011691
Matthias Kloseb9621712010-04-24 17:59:49 +000011692$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011693
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011694fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011695
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011696# Detect whether system arithmetic is subject to x87-style double
11697# rounding issues. The result of this test has little meaning on non
11698# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11699# mode is round-to-nearest and double rounding issues are present, and
11700# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11702$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011703# $BASECFLAGS may affect the result
11704ac_save_cc="$CC"
11705CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011706if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011707 ac_cv_x87_double_rounding=no
11708else
Matthias Kloseb9621712010-04-24 17:59:49 +000011709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011710/* end confdefs.h. */
11711
11712#include <stdlib.h>
11713#include <math.h>
11714int main() {
11715 volatile double x, y, z;
11716 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11717 x = 0.99999999999999989; /* 1-2**-53 */
11718 y = 1./x;
11719 if (y != 1.)
11720 exit(0);
11721 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11722 x = 1e16;
11723 y = 2.99999;
11724 z = x + y;
11725 if (z != 1e16+4.)
11726 exit(0);
11727 /* both tests show evidence of double rounding */
11728 exit(1);
11729}
11730
11731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011732if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011733 ac_cv_x87_double_rounding=no
11734else
Matthias Kloseb9621712010-04-24 17:59:49 +000011735 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11738 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011739fi
11740
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011741CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11743$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011744if test "$ac_cv_x87_double_rounding" = yes
11745then
11746
Matthias Kloseb9621712010-04-24 17:59:49 +000011747$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011748
11749fi
11750
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011751# ************************************
11752# * Check for mathematical functions *
11753# ************************************
11754
11755LIBS_SAVE=$LIBS
11756LIBS="$LIBS $LIBM"
11757
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011758# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11759# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11761$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11762if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11763 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011764else
11765
Matthias Kloseb9621712010-04-24 17:59:49 +000011766if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011767 ac_cv_tanh_preserves_zero_sign=no
11768else
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011770/* end confdefs.h. */
11771
11772#include <math.h>
11773#include <stdlib.h>
11774int main() {
11775 /* return 0 if either negative zeros don't exist
11776 on this platform or if negative zeros exist
11777 and tanh(-0.) == -0. */
11778 if (atan2(0., -1.) == atan2(-0., -1.) ||
11779 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11780 else exit(1);
11781}
11782
11783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011784if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011785 ac_cv_tanh_preserves_zero_sign=yes
11786else
Matthias Kloseb9621712010-04-24 17:59:49 +000011787 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11790 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011791fi
11792
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011793fi
11794
Matthias Kloseb9621712010-04-24 17:59:49 +000011795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11796$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011797if test "$ac_cv_tanh_preserves_zero_sign" = yes
11798then
11799
Matthias Kloseb9621712010-04-24 17:59:49 +000011800$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011801
11802fi
11803
Mark Dickinson9c113362009-09-05 10:36:23 +000011804for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011805do :
11806 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11807ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000011808if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011809 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011810#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011811_ACEOF
11812
11813fi
11814done
11815
Mark Dickinson9c113362009-09-05 10:36:23 +000011816for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011817do :
11818 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11819ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000011820if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011821 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011822#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011823_ACEOF
11824
11825fi
11826done
11827
Matthias Kloseb9621712010-04-24 17:59:49 +000011828ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11829"
11830if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11831 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011832else
Matthias Kloseb9621712010-04-24 17:59:49 +000011833 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011834fi
11835
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011836cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011837#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011839ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11840"
11841if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11842 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011843else
Matthias Kloseb9621712010-04-24 17:59:49 +000011844 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011845fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011846
11847cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011848#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011850ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11851"
11852if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11853 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011854else
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011856fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011857
11858cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011859#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011860_ACEOF
11861
11862
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011863LIBS=$LIBS_SAVE
11864
Mark Dickinsona614f042009-11-28 12:48:43 +000011865# For multiprocessing module, check that sem_open
11866# actually works. For FreeBSD versions <= 7.2,
11867# the kernel module that provides POSIX semaphores
11868# isn't loaded by default, so an attempt to call
11869# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11871$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11872if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11873 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011874else
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011876 ac_cv_posix_semaphores_enabled=yes
11877else
Matthias Kloseb9621712010-04-24 17:59:49 +000011878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011879/* end confdefs.h. */
11880
11881#include <unistd.h>
11882#include <fcntl.h>
11883#include <stdio.h>
11884#include <semaphore.h>
11885#include <sys/stat.h>
11886
11887int main(void) {
11888 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11889 if (a == SEM_FAILED) {
11890 perror("sem_open");
11891 return 1;
11892 }
11893 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011894 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011895 return 0;
11896}
11897
11898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011899if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011900 ac_cv_posix_semaphores_enabled=yes
11901else
Matthias Kloseb9621712010-04-24 17:59:49 +000011902 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011903fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11905 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011906fi
11907
11908
Mark Dickinsona614f042009-11-28 12:48:43 +000011909fi
11910
Matthias Kloseb9621712010-04-24 17:59:49 +000011911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11912$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011913if test $ac_cv_posix_semaphores_enabled = no
11914then
11915
Matthias Kloseb9621712010-04-24 17:59:49 +000011916$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011917
11918fi
11919
Mark Dickinson10683072009-04-18 21:18:19 +000011920# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11922$as_echo_n "checking for broken sem_getvalue... " >&6; }
11923if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11924 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011925else
Matthias Kloseb9621712010-04-24 17:59:49 +000011926 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011927 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011928else
Matthias Kloseb9621712010-04-24 17:59:49 +000011929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011930/* end confdefs.h. */
11931
11932#include <unistd.h>
11933#include <fcntl.h>
11934#include <stdio.h>
11935#include <semaphore.h>
11936#include <sys/stat.h>
11937
11938int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000011939 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000011940 int count;
11941 int res;
11942 if(a==SEM_FAILED){
11943 perror("sem_open");
11944 return 1;
11945
11946 }
11947 res = sem_getvalue(a, &count);
11948 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011949 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000011950 return res==-1 ? 1 : 0;
11951}
11952
Mark Dickinson10683072009-04-18 21:18:19 +000011953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011954if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011955 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000011956else
Matthias Kloseb9621712010-04-24 17:59:49 +000011957 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011958fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011959rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11960 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011961fi
11962
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011963
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011964fi
11965
Matthias Kloseb9621712010-04-24 17:59:49 +000011966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
11967$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011968if test $ac_cv_broken_sem_getvalue = yes
11969then
11970
Matthias Kloseb9621712010-04-24 17:59:49 +000011971$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011972
11973fi
11974
Mark Dickinsonbd792642009-03-18 20:06:12 +000011975# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000011976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
11977$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011978# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011979if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000011980 enableval=$enable_big_digits; case $enable_big_digits in
11981yes)
11982 enable_big_digits=30 ;;
11983no)
11984 enable_big_digits=15 ;;
1198515|30)
11986 ;;
11987*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000011988 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 +000011989esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
11991$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011992
11993cat >>confdefs.h <<_ACEOF
11994#define PYLONG_BITS_IN_DIGIT $enable_big_digits
11995_ACEOF
11996
11997
11998else
Matthias Kloseb9621712010-04-24 17:59:49 +000011999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12000$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012001fi
12002
12003
Guido van Rossumef2255b2000-03-10 22:30:29 +000012004# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012005ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12006if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012007
12008
Matthias Kloseb9621712010-04-24 17:59:49 +000012009$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012010
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012011 wchar_h="yes"
12012
Guido van Rossumef2255b2000-03-10 22:30:29 +000012013else
Martin v. Löwis11437992002-04-12 09:54:03 +000012014 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012015
12016fi
12017
Michael W. Hudson54241132001-12-07 15:38:26 +000012018
Martin v. Löwis11437992002-04-12 09:54:03 +000012019
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012020# determine wchar_t size
12021if test "$wchar_h" = yes
12022then
Matthias Kloseb9621712010-04-24 17:59:49 +000012023 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012024# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12025# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12026# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12028$as_echo_n "checking size of wchar_t... " >&6; }
12029if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12030 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012031else
Matthias Kloseb9621712010-04-24 17:59:49 +000012032 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12033"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012034
Martin v. Löwis11437992002-04-12 09:54:03 +000012035else
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 if test "$ac_cv_type_wchar_t" = yes; then
12037 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12038$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012039as_fn_error 77 "cannot compute sizeof (wchar_t)
12040See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012041 else
12042 ac_cv_sizeof_wchar_t=0
12043 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012045
Martin v. Löwis11437992002-04-12 09:54:03 +000012046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12048$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012049
12050
12051
Martin v. Löwis11437992002-04-12 09:54:03 +000012052cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012053#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012054_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012055
Michael W. Hudson54241132001-12-07 15:38:26 +000012056
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012057fi
12058
Matthias Kloseb9621712010-04-24 17:59:49 +000012059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12060$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012061have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012063/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012064
12065#include <tcl.h>
12066#if TCL_UTF_MAX != 6
12067# error "NOT UCS4_TCL"
12068#endif
12069int
12070main ()
12071{
12072
12073 ;
12074 return 0;
12075}
12076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012077if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012078
12079
Matthias Kloseb9621712010-04-24 17:59:49 +000012080$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012081
12082 have_ucs4_tcl=yes
12083
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12087$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012088
Skip Montanaro6dead952003-09-25 14:50:04 +000012089# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012090if test "$wchar_h" = yes
12091then
12092 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12094$as_echo_n "checking whether wchar_t is signed... " >&6; }
12095 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12096 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012097else
12098
Matthias Kloseb9621712010-04-24 17:59:49 +000012099 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012100 ac_cv_wchar_t_signed=yes
12101else
Matthias Kloseb9621712010-04-24 17:59:49 +000012102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012103/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012104
12105 #include <wchar.h>
12106 int main()
12107 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012108 /* Success: exit code 0 */
12109 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012110 }
12111
12112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012113if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012114 ac_cv_wchar_t_signed=yes
12115else
Matthias Kloseb9621712010-04-24 17:59:49 +000012116 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12119 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012120fi
12121
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012122fi
12123
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12125$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012126fi
12127
Matthias Kloseb9621712010-04-24 17:59:49 +000012128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12129$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012130
12131# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012132if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012133 withval=$with_wide_unicode;
12134if test "$withval" != no
12135then unicode_size="4"
12136else unicode_size="2"
12137fi
12138
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012139else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012140
Georg Brandl52d168a2008-01-07 18:10:24 +000012141case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012142 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012143 *) unicode_size="2" ;;
12144esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012145
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012146fi
12147
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012148
12149
Georg Brandl52d168a2008-01-07 18:10:24 +000012150case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012151 4)
12152 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12153
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012154 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012155 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012156 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012157 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012158esac
12159
Michael W. Hudson54241132001-12-07 15:38:26 +000012160
Martin v. Löwis11437992002-04-12 09:54:03 +000012161
Georg Brandl52d168a2008-01-07 18:10:24 +000012162# wchar_t is only usable if it maps to an unsigned type
12163if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012164 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012165then
12166 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012167
Matthias Kloseb9621712010-04-24 17:59:49 +000012168$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012169
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012171
Georg Brandl52d168a2008-01-07 18:10:24 +000012172elif test "$ac_cv_sizeof_short" = "$unicode_size"
12173then
12174 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012175 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012176
Georg Brandl52d168a2008-01-07 18:10:24 +000012177elif test "$ac_cv_sizeof_long" = "$unicode_size"
12178then
12179 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012180 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012181
Georg Brandl52d168a2008-01-07 18:10:24 +000012182else
12183 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12186$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012187
12188# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12190$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12191if test "${ac_cv_c_bigendian+set}" = set; then :
12192 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012193else
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 ac_cv_c_bigendian=unknown
12195 # See if we're dealing with a universal compiler.
12196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12197/* end confdefs.h. */
12198#ifndef __APPLE_CC__
12199 not a universal capable compiler
12200 #endif
12201 typedef int dummy;
12202
Skip Montanaro6dead952003-09-25 14:50:04 +000012203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012204if ac_fn_c_try_compile "$LINENO"; then :
12205
12206 # Check for potential -arch flags. It is not universal unless
12207 # there are at least two -arch flags with different values.
12208 ac_arch=
12209 ac_prev=
12210 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12211 if test -n "$ac_prev"; then
12212 case $ac_word in
12213 i?86 | x86_64 | ppc | ppc64)
12214 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12215 ac_arch=$ac_word
12216 else
12217 ac_cv_c_bigendian=universal
12218 break
12219 fi
12220 ;;
12221 esac
12222 ac_prev=
12223 elif test "x$ac_word" = "x-arch"; then
12224 ac_prev=arch
12225 fi
12226 done
12227fi
12228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12229 if test $ac_cv_c_bigendian = unknown; then
12230 # See if sys/param.h defines the BYTE_ORDER macro.
12231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012232/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012233#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012234 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012235
Martin v. Löwis11437992002-04-12 09:54:03 +000012236int
12237main ()
12238{
Matthias Kloseb9621712010-04-24 17:59:49 +000012239#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12240 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12241 && LITTLE_ENDIAN)
12242 bogus endian macros
12243 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012244
12245 ;
12246 return 0;
12247}
12248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012249if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012250 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012252/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012253#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012254 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012255
Martin v. Löwis11437992002-04-12 09:54:03 +000012256int
12257main ()
12258{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012259#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012260 not big endian
12261 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012262
12263 ;
12264 return 0;
12265}
12266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012267if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012268 ac_cv_c_bigendian=yes
12269else
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012273fi
12274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12275 fi
12276 if test $ac_cv_c_bigendian = unknown; then
12277 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012279/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012280#include <limits.h>
12281
Martin v. Löwis11437992002-04-12 09:54:03 +000012282int
12283main ()
12284{
Matthias Kloseb9621712010-04-24 17:59:49 +000012285#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12286 bogus endian macros
12287 #endif
12288
Martin v. Löwis11437992002-04-12 09:54:03 +000012289 ;
12290 return 0;
12291}
12292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012293if ac_fn_c_try_compile "$LINENO"; then :
12294 # It does; now see whether it defined to _BIG_ENDIAN or not.
12295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12296/* end confdefs.h. */
12297#include <limits.h>
12298
12299int
12300main ()
12301{
12302#ifndef _BIG_ENDIAN
12303 not big endian
12304 #endif
12305
12306 ;
12307 return 0;
12308}
12309_ACEOF
12310if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012311 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012312else
Matthias Kloseb9621712010-04-24 17:59:49 +000012313 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12316fi
12317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12318 fi
12319 if test $ac_cv_c_bigendian = unknown; then
12320 # Compile a test program.
12321 if test "$cross_compiling" = yes; then :
12322 # Try to guess by grepping values from an object file.
12323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12324/* end confdefs.h. */
12325short int ascii_mm[] =
12326 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12327 short int ascii_ii[] =
12328 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12329 int use_ascii (int i) {
12330 return ascii_mm[i] + ascii_ii[i];
12331 }
12332 short int ebcdic_ii[] =
12333 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12334 short int ebcdic_mm[] =
12335 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12336 int use_ebcdic (int i) {
12337 return ebcdic_mm[i] + ebcdic_ii[i];
12338 }
12339 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012340
Matthias Kloseb9621712010-04-24 17:59:49 +000012341int
12342main ()
12343{
12344return use_ascii (foo) == use_ebcdic (foo);
12345 ;
12346 return 0;
12347}
12348_ACEOF
12349if ac_fn_c_try_compile "$LINENO"; then :
12350 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12351 ac_cv_c_bigendian=yes
12352 fi
12353 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12354 if test "$ac_cv_c_bigendian" = unknown; then
12355 ac_cv_c_bigendian=no
12356 else
12357 # finding both strings is unlikely to happen, but who knows?
12358 ac_cv_c_bigendian=unknown
12359 fi
12360 fi
12361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012363else
Matthias Kloseb9621712010-04-24 17:59:49 +000012364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012365/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012366$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012367int
12368main ()
12369{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012370
Matthias Kloseb9621712010-04-24 17:59:49 +000012371 /* Are we little or big endian? From Harbison&Steele. */
12372 union
12373 {
12374 long int l;
12375 char c[sizeof (long int)];
12376 } u;
12377 u.l = 1;
12378 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012379
12380 ;
12381 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012382}
Martin v. Löwis11437992002-04-12 09:54:03 +000012383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012384if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012385 ac_cv_c_bigendian=no
12386else
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12390 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012392
Matthias Kloseb9621712010-04-24 17:59:49 +000012393 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012394fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12396$as_echo "$ac_cv_c_bigendian" >&6; }
12397 case $ac_cv_c_bigendian in #(
12398 yes)
12399 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12400;; #(
12401 no)
12402 ;; #(
12403 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012404
Matthias Kloseb9621712010-04-24 17:59:49 +000012405$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012406
Matthias Kloseb9621712010-04-24 17:59:49 +000012407 ;; #(
12408 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012409 as_fn_error $? "unknown endianness
12410 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012412
Michael W. Hudson54241132001-12-07 15:38:26 +000012413
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012414# ABI version string for Python extension modules. This appears between the
12415# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12416# from the following attributes which affect the ABI of this Python build (in
12417# this order):
12418#
12419# * The Python implementation (always 'cpython-' for us)
12420# * The major and minor version numbers
12421# * --with-pydebug (adds a 'd')
12422# * --with-pymalloc (adds a 'm')
12423# * --with-wide-unicode (adds a 'u')
12424#
12425# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012426# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12427# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012428
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12430$as_echo_n "checking ABIFLAGS... " >&6; }
12431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12432$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12434$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012435SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12437$as_echo "$SOABI" >&6; }
12438
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12440$as_echo_n "checking LDVERSION... " >&6; }
12441LDVERSION='$(VERSION)$(ABIFLAGS)'
12442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12443$as_echo "$LDVERSION" >&6; }
12444
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012445# SO is the extension of shared libraries `(including the dot!)
12446# -- usually .so, .sl on HP-UX, .dll on Cygwin
12447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12448$as_echo_n "checking SO... " >&6; }
12449if test -z "$SO"
12450then
12451 case $ac_sys_system in
12452 hp*|HP*)
12453 case `uname -m` in
12454 ia64) SO=.so;;
12455 *) SO=.sl;;
12456 esac
12457 ;;
12458 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012459 Linux*|GNU*)
12460 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012461 *) SO=.so;;
12462 esac
12463else
12464 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012465 echo
12466 echo '====================================================================='
12467 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012468 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012469 echo '+ Do you really mean to change the extension for shared libraries? +'
12470 echo '+ Continuing in 10 seconds to let you to ponder. +'
12471 echo '+ +'
12472 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012473 sleep 10
12474fi
12475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12476$as_echo "$SO" >&6; }
12477
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012478# Check whether right shifting a negative integer extends the sign bit
12479# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12481$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12482if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12483 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012484else
Martin v. Löwis11437992002-04-12 09:54:03 +000012485
Matthias Kloseb9621712010-04-24 17:59:49 +000012486if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012487 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012488else
Matthias Kloseb9621712010-04-24 17:59:49 +000012489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012490/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012491
12492int main()
12493{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012494 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012495}
12496
Martin v. Löwis11437992002-04-12 09:54:03 +000012497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012498if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012499 ac_cv_rshift_extends_sign=yes
12500else
Matthias Kloseb9621712010-04-24 17:59:49 +000012501 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012503rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12504 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012505fi
12506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012507fi
12508
Matthias Kloseb9621712010-04-24 17:59:49 +000012509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12510$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012511if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012512then
Martin v. Löwis11437992002-04-12 09:54:03 +000012513
Matthias Kloseb9621712010-04-24 17:59:49 +000012514$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012515
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012516fi
12517
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012518# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12520$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12521if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12522 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012523else
Martin v. Löwis11437992002-04-12 09:54:03 +000012524
Matthias Kloseb9621712010-04-24 17:59:49 +000012525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012526/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012527#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012528int
12529main ()
12530{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012531
12532 FILE *f = fopen("/dev/null", "r");
12533 flockfile(f);
12534 getc_unlocked(f);
12535 funlockfile(f);
12536
Martin v. Löwis11437992002-04-12 09:54:03 +000012537 ;
12538 return 0;
12539}
12540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012541if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012542 ac_cv_have_getc_unlocked=yes
12543else
Matthias Kloseb9621712010-04-24 17:59:49 +000012544 ac_cv_have_getc_unlocked=no
12545fi
12546rm -f core conftest.err conftest.$ac_objext \
12547 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012549
Matthias Kloseb9621712010-04-24 17:59:49 +000012550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12551$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012552if test "$ac_cv_have_getc_unlocked" = yes
12553then
Martin v. Löwis11437992002-04-12 09:54:03 +000012554
Matthias Kloseb9621712010-04-24 17:59:49 +000012555$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012556
12557fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012558
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012559# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012560# save the value of LIBS so we don't actually link Python with readline
12561LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012562
Gregory P. Smith18820942008-09-07 06:24:49 +000012563# On some systems we need to link readline to a termcap compatible
12564# library. NOTE: Keep the precedence of listed libraries synchronised
12565# with setup.py.
12566py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12568$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012569for py_libtermcap in "" ncursesw ncurses curses termcap; do
12570 if test -z "$py_libtermcap"; then
12571 READLINE_LIBS="-lreadline"
12572 else
12573 READLINE_LIBS="-lreadline -l$py_libtermcap"
12574 fi
12575 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012577/* end confdefs.h. */
12578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012579/* Override any GCC internal prototype to avoid an error.
12580 Use char because int might match the return type of a GCC
12581 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012582#ifdef __cplusplus
12583extern "C"
12584#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012585char readline ();
12586int
12587main ()
12588{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012589return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012590 ;
12591 return 0;
12592}
12593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012594if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012595 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012597rm -f core conftest.err conftest.$ac_objext \
12598 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012599 if test $py_cv_lib_readline = yes; then
12600 break
12601 fi
12602done
12603# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12604#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012605if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12607$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012608else
Matthias Kloseb9621712010-04-24 17:59:49 +000012609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12610$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012611
Matthias Kloseb9621712010-04-24 17:59:49 +000012612$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012613
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012614fi
12615
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012616# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12618$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12619if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12620 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012621else
12622 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012623LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012625/* end confdefs.h. */
12626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012627/* Override any GCC internal prototype to avoid an error.
12628 Use char because int might match the return type of a GCC
12629 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012630#ifdef __cplusplus
12631extern "C"
12632#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012633char rl_callback_handler_install ();
12634int
12635main ()
12636{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012637return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012638 ;
12639 return 0;
12640}
12641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012642if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012643 ac_cv_lib_readline_rl_callback_handler_install=yes
12644else
Matthias Kloseb9621712010-04-24 17:59:49 +000012645 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012647rm -f core conftest.err conftest.$ac_objext \
12648 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012649LIBS=$ac_check_lib_save_LIBS
12650fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12652$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12653if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012654
Matthias Kloseb9621712010-04-24 17:59:49 +000012655$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012656
12657fi
12658
12659
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012660# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012662/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012663#include <readline/readline.h>
12664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012665if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012666 have_readline=yes
12667else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012668 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012669
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012670fi
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012671rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012672if test $have_readline = yes
12673then
Matthias Kloseb9621712010-04-24 17:59:49 +000012674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012675/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012676#include <readline/readline.h>
12677
12678_ACEOF
12679if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012680 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012681
Matthias Kloseb9621712010-04-24 17:59:49 +000012682$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012683
12684fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012685rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012686
Matthias Kloseb9621712010-04-24 17:59:49 +000012687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012688/* end confdefs.h. */
12689#include <readline/readline.h>
12690
12691_ACEOF
12692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012693 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012694
Matthias Kloseb9621712010-04-24 17:59:49 +000012695$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012696
12697fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012698rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012699
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012700fi
12701
Martin v. Löwis0daad592001-09-30 21:09:59 +000012702# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12704$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12705if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12706 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012707else
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012709LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012713/* Override any GCC internal prototype to avoid an error.
12714 Use char because int might match the return type of a GCC
12715 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012716#ifdef __cplusplus
12717extern "C"
12718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012719char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012720int
12721main ()
12722{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012723return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012724 ;
12725 return 0;
12726}
12727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012728if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012729 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012730else
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012733rm -f core conftest.err conftest.$ac_objext \
12734 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012735LIBS=$ac_check_lib_save_LIBS
12736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12738$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12739if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012742
Martin v. Löwis0daad592001-09-30 21:09:59 +000012743fi
12744
Michael W. Hudson54241132001-12-07 15:38:26 +000012745
Thomas Wouters89d996e2007-09-08 17:39:28 +000012746# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12748$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12749if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12750 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012751else
12752 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012753LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012755/* end confdefs.h. */
12756
12757/* Override any GCC internal prototype to avoid an error.
12758 Use char because int might match the return type of a GCC
12759 builtin and then its argument prototype would still apply. */
12760#ifdef __cplusplus
12761extern "C"
12762#endif
12763char rl_completion_display_matches_hook ();
12764int
12765main ()
12766{
12767return rl_completion_display_matches_hook ();
12768 ;
12769 return 0;
12770}
12771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012772if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012773 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12774else
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012777rm -f core conftest.err conftest.$ac_objext \
12778 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012779LIBS=$ac_check_lib_save_LIBS
12780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12782$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12783if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012784
Matthias Kloseb9621712010-04-24 17:59:49 +000012785$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012786
12787fi
12788
12789
Martin v. Löwis0daad592001-09-30 21:09:59 +000012790# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12792$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12793if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12794 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012795else
Martin v. Löwis11437992002-04-12 09:54:03 +000012796 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012797LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801/* Override any GCC internal prototype to avoid an error.
12802 Use char because int might match the return type of a GCC
12803 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012804#ifdef __cplusplus
12805extern "C"
12806#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012807char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012808int
12809main ()
12810{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012811return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012812 ;
12813 return 0;
12814}
12815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012816if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012817 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012818else
Matthias Kloseb9621712010-04-24 17:59:49 +000012819 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012821rm -f core conftest.err conftest.$ac_objext \
12822 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012823LIBS=$ac_check_lib_save_LIBS
12824fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12826$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12827if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012828
Matthias Kloseb9621712010-04-24 17:59:49 +000012829$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012830
Guido van Rossum353ae582001-07-10 16:45:32 +000012831fi
12832
Jack Jansendd19cf82001-12-06 22:36:17 +000012833
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012834# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012836/* end confdefs.h. */
12837#include <readline/readline.h>
12838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012839if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012840 have_readline=yes
12841else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012842 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012843
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012844fi
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012845rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012846if test $have_readline = yes
12847then
Matthias Kloseb9621712010-04-24 17:59:49 +000012848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012849/* end confdefs.h. */
12850#include <readline/readline.h>
12851
12852_ACEOF
12853if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012854 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012855
Matthias Kloseb9621712010-04-24 17:59:49 +000012856$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012857
12858fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012859rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012860
12861fi
12862
Martin v. Löwis82bca632006-02-10 20:49:30 +000012863# End of readline checks: restore LIBS
12864LIBS=$LIBS_no_readline
12865
Matthias Kloseb9621712010-04-24 17:59:49 +000012866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12867$as_echo_n "checking for broken nice()... " >&6; }
12868if test "${ac_cv_broken_nice+set}" = set; then :
12869 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012870else
Martin v. Löwis11437992002-04-12 09:54:03 +000012871
Matthias Kloseb9621712010-04-24 17:59:49 +000012872if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012873 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012874else
Matthias Kloseb9621712010-04-24 17:59:49 +000012875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012876/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012877
12878int main()
12879{
12880 int val1 = nice(1);
12881 if (val1 != -1 && val1 == nice(2))
12882 exit(0);
12883 exit(1);
12884}
12885
Martin v. Löwis11437992002-04-12 09:54:03 +000012886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012887if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012888 ac_cv_broken_nice=yes
12889else
Matthias Kloseb9621712010-04-24 17:59:49 +000012890 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12893 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012894fi
12895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012896fi
12897
Matthias Kloseb9621712010-04-24 17:59:49 +000012898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12899$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012900if test "$ac_cv_broken_nice" = yes
12901then
Martin v. Löwis11437992002-04-12 09:54:03 +000012902
Matthias Kloseb9621712010-04-24 17:59:49 +000012903$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012904
12905fi
12906
Matthias Kloseb9621712010-04-24 17:59:49 +000012907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12908$as_echo_n "checking for broken poll()... " >&6; }
12909if test "${ac_cv_broken_poll+set}" = set; then :
12910 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012911else
Matthias Kloseb9621712010-04-24 17:59:49 +000012912 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012913 ac_cv_broken_poll=no
12914else
Matthias Kloseb9621712010-04-24 17:59:49 +000012915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012916/* end confdefs.h. */
12917
12918#include <poll.h>
12919
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012920int main()
12921{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012922 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012923 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012924
12925 close (42);
12926
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012927 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012928 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012929 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012930 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012931 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012932 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012933 return 1;
12934}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012935
12936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012937if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012938 ac_cv_broken_poll=yes
12939else
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012942rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12943 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012945
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012946fi
12947
Matthias Kloseb9621712010-04-24 17:59:49 +000012948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
12949$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012950if test "$ac_cv_broken_poll" = yes
12951then
12952
Matthias Kloseb9621712010-04-24 17:59:49 +000012953$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012954
12955fi
12956
Brett Cannon43802422005-02-10 20:48:03 +000012957# 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 +000012958# (which is not required by ISO C or UNIX spec) and/or if we support
12959# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000012960ac_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 +000012961#include <$ac_cv_struct_tm>
12962
Matthias Kloseb9621712010-04-24 17:59:49 +000012963"
12964if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000012965
12966cat >>confdefs.h <<_ACEOF
12967#define HAVE_STRUCT_TM_TM_ZONE 1
12968_ACEOF
12969
12970
12971fi
12972
12973if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12974
Matthias Kloseb9621712010-04-24 17:59:49 +000012975$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012976
12977else
Matthias Kloseb9621712010-04-24 17:59:49 +000012978 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12979"
12980if test "x$ac_cv_have_decl_tzname" = x""yes; then :
12981 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982else
Matthias Kloseb9621712010-04-24 17:59:49 +000012983 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012984fi
12985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012986cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012987#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012988_ACEOF
12989
Matthias Kloseb9621712010-04-24 17:59:49 +000012990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12991$as_echo_n "checking for tzname... " >&6; }
12992if test "${ac_cv_var_tzname+set}" = set; then :
12993 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012994else
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012996/* end confdefs.h. */
12997#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012998#if !HAVE_DECL_TZNAME
12999extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013000#endif
13001
13002int
13003main ()
13004{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013005return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013006 ;
13007 return 0;
13008}
13009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013010if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013011 ac_cv_var_tzname=yes
13012else
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013015rm -f core conftest.err conftest.$ac_objext \
13016 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13019$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013020 if test $ac_cv_var_tzname = yes; then
13021
Matthias Kloseb9621712010-04-24 17:59:49 +000013022$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013023
13024 fi
13025fi
13026
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013027
Martin v. Löwis1d459062005-03-14 21:23:33 +000013028# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13030$as_echo_n "checking for working tzset()... " >&6; }
13031if test "${ac_cv_working_tzset+set}" = set; then :
13032 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013033else
13034
Matthias Kloseb9621712010-04-24 17:59:49 +000013035if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013036 ac_cv_working_tzset=no
13037else
Matthias Kloseb9621712010-04-24 17:59:49 +000013038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013039/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013040
13041#include <stdlib.h>
13042#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013043#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013044
13045#if HAVE_TZNAME
13046extern char *tzname[];
13047#endif
13048
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013049int main()
13050{
Brett Cannon18367812003-09-19 00:59:16 +000013051 /* Note that we need to ensure that not only does tzset(3)
13052 do 'something' with localtime, but it works as documented
13053 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013054 This includes making sure that tzname is set properly if
13055 tm->tm_zone does not exist since it is the alternative way
13056 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013057
13058 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013059 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013060 */
13061
Martin v. Löwis1d459062005-03-14 21:23:33 +000013062 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013063 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13064
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013065 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013066 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013067 if (localtime(&groundhogday)->tm_hour != 0)
13068 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013069#if HAVE_TZNAME
13070 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13071 if (strcmp(tzname[0], "UTC") ||
13072 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13073 exit(1);
13074#endif
Brett Cannon18367812003-09-19 00:59:16 +000013075
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013076 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013077 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013078 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013079 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013080#if HAVE_TZNAME
13081 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13082 exit(1);
13083#endif
Brett Cannon18367812003-09-19 00:59:16 +000013084
13085 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13086 tzset();
13087 if (localtime(&groundhogday)->tm_hour != 11)
13088 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013089#if HAVE_TZNAME
13090 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13091 exit(1);
13092#endif
13093
13094#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013095 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13096 exit(1);
13097 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13098 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013099#endif
Brett Cannon18367812003-09-19 00:59:16 +000013100
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013101 exit(0);
13102}
13103
13104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013105if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013106 ac_cv_working_tzset=yes
13107else
Matthias Kloseb9621712010-04-24 17:59:49 +000013108 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013110rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13111 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013112fi
13113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013114fi
13115
Matthias Kloseb9621712010-04-24 17:59:49 +000013116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13117$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013118if test "$ac_cv_working_tzset" = yes
13119then
13120
Matthias Kloseb9621712010-04-24 17:59:49 +000013121$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013122
13123fi
13124
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013125# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13127$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13128if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13129 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013130else
Matthias Kloseb9621712010-04-24 17:59:49 +000013131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013132/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013133#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013134int
13135main ()
13136{
13137
13138struct stat st;
13139st.st_mtim.tv_nsec = 1;
13140
13141 ;
13142 return 0;
13143}
13144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013145if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013146 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013147else
Matthias Kloseb9621712010-04-24 17:59:49 +000013148 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13151fi
13152
Matthias Kloseb9621712010-04-24 17:59:49 +000013153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13154$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013155if test "$ac_cv_stat_tv_nsec" = yes
13156then
13157
Matthias Kloseb9621712010-04-24 17:59:49 +000013158$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013159
13160fi
13161
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013162# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13164$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13165if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13166 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013167else
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013169/* end confdefs.h. */
13170#include <sys/stat.h>
13171int
13172main ()
13173{
13174
13175struct stat st;
13176st.st_mtimespec.tv_nsec = 1;
13177
13178 ;
13179 return 0;
13180}
13181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013182if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013183 ac_cv_stat_tv_nsec2=yes
13184else
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13188fi
13189
Matthias Kloseb9621712010-04-24 17:59:49 +000013190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13191$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013192if test "$ac_cv_stat_tv_nsec2" = yes
13193then
13194
Matthias Kloseb9621712010-04-24 17:59:49 +000013195$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013196
13197fi
13198
Jack Jansen666b1e72001-10-31 12:11:48 +000013199# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13201$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13202if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13203 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013204else
Matthias Kloseb9621712010-04-24 17:59:49 +000013205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013206/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013207#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013208int
13209main ()
13210{
Jack Jansen666b1e72001-10-31 12:11:48 +000013211
13212 int rtn;
13213 rtn = mvwdelch(0,0,0);
13214
Martin v. Löwis11437992002-04-12 09:54:03 +000013215 ;
13216 return 0;
13217}
13218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013219if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013220 ac_cv_mvwdelch_is_expression=yes
13221else
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13225fi
13226
Matthias Kloseb9621712010-04-24 17:59:49 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13228$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013229
13230if test "$ac_cv_mvwdelch_is_expression" = yes
13231then
Martin v. Löwis11437992002-04-12 09:54:03 +000013232
Matthias Kloseb9621712010-04-24 17:59:49 +000013233$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013234
13235fi
13236
Matthias Kloseb9621712010-04-24 17:59:49 +000013237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13238$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13239if test "${ac_cv_window_has_flags+set}" = set; then :
13240 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013241else
Matthias Kloseb9621712010-04-24 17:59:49 +000013242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013243/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013244#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013245int
13246main ()
13247{
Jack Jansen666b1e72001-10-31 12:11:48 +000013248
13249 WINDOW *w;
13250 w->_flags = 0;
13251
Martin v. Löwis11437992002-04-12 09:54:03 +000013252 ;
13253 return 0;
13254}
13255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013256if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013257 ac_cv_window_has_flags=yes
13258else
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13262fi
13263
Matthias Kloseb9621712010-04-24 17:59:49 +000013264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13265$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013266
Jack Jansen666b1e72001-10-31 12:11:48 +000013267
13268if test "$ac_cv_window_has_flags" = yes
13269then
Martin v. Löwis11437992002-04-12 09:54:03 +000013270
Matthias Kloseb9621712010-04-24 17:59:49 +000013271$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013272
13273fi
13274
Matthias Kloseb9621712010-04-24 17:59:49 +000013275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13276$as_echo_n "checking for is_term_resized... " >&6; }
13277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013278/* end confdefs.h. */
13279#include <curses.h>
13280int
13281main ()
13282{
13283void *x=is_term_resized
13284 ;
13285 return 0;
13286}
13287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013288if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013289
Matthias Kloseb9621712010-04-24 17:59:49 +000013290$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013291
Matthias Kloseb159a552010-04-25 21:00:44 +000013292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013293$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013294else
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13296$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013297
13298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13300
Matthias Kloseb9621712010-04-24 17:59:49 +000013301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13302$as_echo_n "checking for resize_term... " >&6; }
13303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013304/* end confdefs.h. */
13305#include <curses.h>
13306int
13307main ()
13308{
13309void *x=resize_term
13310 ;
13311 return 0;
13312}
13313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013314if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013315
Matthias Kloseb9621712010-04-24 17:59:49 +000013316$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013317
Matthias Kloseb159a552010-04-25 21:00:44 +000013318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013319$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013320else
Matthias Kloseb9621712010-04-24 17:59:49 +000013321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13322$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013323
13324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13326
Matthias Kloseb9621712010-04-24 17:59:49 +000013327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13328$as_echo_n "checking for resizeterm... " >&6; }
13329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013330/* end confdefs.h. */
13331#include <curses.h>
13332int
13333main ()
13334{
13335void *x=resizeterm
13336 ;
13337 return 0;
13338}
13339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013340if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013341
Matthias Kloseb9621712010-04-24 17:59:49 +000013342$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013343
Matthias Kloseb159a552010-04-25 21:00:44 +000013344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013345$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013346else
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13348$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013349
13350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13352
Matthias Kloseb9621712010-04-24 17:59:49 +000013353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13354$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013355
13356if test -r /dev/ptmx
13357then
Matthias Kloseb9621712010-04-24 17:59:49 +000013358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13359$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013360
Matthias Kloseb9621712010-04-24 17:59:49 +000013361$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013362
Thomas Wouters89f507f2006-12-13 04:49:30 +000013363else
Matthias Kloseb9621712010-04-24 17:59:49 +000013364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13365$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013366fi
13367
Matthias Kloseb9621712010-04-24 17:59:49 +000013368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13369$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013370
13371if test -r /dev/ptc
13372then
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13374$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013377
Thomas Wouters89f507f2006-12-13 04:49:30 +000013378else
Matthias Kloseb9621712010-04-24 17:59:49 +000013379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13380$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013381fi
13382
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013383if test "$have_long_long" = yes
13384then
Matthias Kloseb9621712010-04-24 17:59:49 +000013385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13386$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13387 if test "${ac_cv_have_long_long_format+set}" = set; then :
13388 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013389else
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013391 ac_cv_have_long_long_format=no
13392else
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013394/* end confdefs.h. */
13395
13396 #include <stdio.h>
13397 #include <stddef.h>
13398 #include <string.h>
13399
13400 #ifdef HAVE_SYS_TYPES_H
13401 #include <sys/types.h>
13402 #endif
13403
13404 int main()
13405 {
13406 char buffer[256];
13407
13408 if (sprintf(buffer, "%lld", (long long)123) < 0)
13409 return 1;
13410 if (strcmp(buffer, "123"))
13411 return 1;
13412
13413 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13414 return 1;
13415 if (strcmp(buffer, "-123"))
13416 return 1;
13417
13418 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13419 return 1;
13420 if (strcmp(buffer, "123"))
13421 return 1;
13422
13423 return 0;
13424 }
13425
13426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013427if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013428 ac_cv_have_long_long_format=yes
13429else
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013431fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013432rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13433 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013434fi
13435
13436
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013437fi
13438
Matthias Kloseb9621712010-04-24 17:59:49 +000013439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13440$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013441fi
13442
Mark Dickinson89d7d412009-12-31 20:50:59 +000013443if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013444then
13445
Matthias Kloseb9621712010-04-24 17:59:49 +000013446$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013447
13448fi
13449
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013450if test $ac_sys_system = Darwin
13451then
13452 LIBS="$LIBS -framework CoreFoundation"
13453fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013454
Matthias Kloseb9621712010-04-24 17:59:49 +000013455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13456$as_echo_n "checking for %zd printf() format support... " >&6; }
13457if test "${ac_cv_have_size_t_format+set}" = set; then :
13458 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013459else
Matthias Kloseb9621712010-04-24 17:59:49 +000013460 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013461 ac_cv_have_size_t_format="cross -- assuming yes"
13462
Thomas Wouters477c8d52006-05-27 19:21:47 +000013463else
Matthias Kloseb9621712010-04-24 17:59:49 +000013464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013465/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013466
Thomas Wouters477c8d52006-05-27 19:21:47 +000013467#include <stdio.h>
13468#include <stddef.h>
13469#include <string.h>
13470
Christian Heimes2c181612007-12-17 20:04:13 +000013471#ifdef HAVE_SYS_TYPES_H
13472#include <sys/types.h>
13473#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013474
13475#ifdef HAVE_SSIZE_T
13476typedef ssize_t Py_ssize_t;
13477#elif SIZEOF_VOID_P == SIZEOF_LONG
13478typedef long Py_ssize_t;
13479#else
13480typedef int Py_ssize_t;
13481#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013482
Christian Heimes2c181612007-12-17 20:04:13 +000013483int main()
13484{
13485 char buffer[256];
13486
Thomas Wouters477c8d52006-05-27 19:21:47 +000013487 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13488 return 1;
13489
Thomas Wouters89f507f2006-12-13 04:49:30 +000013490 if (strcmp(buffer, "123"))
13491 return 1;
13492
13493 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13494 return 1;
13495
13496 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013497 return 1;
13498
13499 return 0;
13500}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013501
Thomas Wouters477c8d52006-05-27 19:21:47 +000013502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013503if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013504 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013505else
Matthias Kloseb9621712010-04-24 17:59:49 +000013506 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13509 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013510fi
13511
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13514$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013515if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013516
Matthias Kloseb9621712010-04-24 17:59:49 +000013517$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013518
13519fi
13520
Matthias Kloseb9621712010-04-24 17:59:49 +000013521ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013522#ifdef HAVE_SYS_TYPES_H
13523#include <sys/types.h>
13524#endif
13525#ifdef HAVE_SYS_SOCKET_H
13526#include <sys/socket.h>
13527#endif
13528
Matthias Kloseb9621712010-04-24 17:59:49 +000013529"
13530if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013531
Martin v. Löwis11437992002-04-12 09:54:03 +000013532else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013533
Matthias Kloseb9621712010-04-24 17:59:49 +000013534$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013535
13536fi
13537
Michael W. Hudson54241132001-12-07 15:38:26 +000013538
Matthias Kloseb9621712010-04-24 17:59:49 +000013539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13540$as_echo_n "checking for broken mbstowcs... " >&6; }
13541if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13542 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013543else
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013545 ac_cv_broken_mbstowcs=no
13546else
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013548/* end confdefs.h. */
13549
13550#include<stdlib.h>
13551int main() {
13552 size_t len = -1;
13553 const char *str = "text";
13554 len = mbstowcs(NULL, str, 0);
13555 return (len != 4);
13556}
13557
13558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013559if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013560 ac_cv_broken_mbstowcs=no
13561else
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013564rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13565 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013566fi
13567
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013568fi
13569
Matthias Kloseb9621712010-04-24 17:59:49 +000013570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13571$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013572if test "$ac_cv_broken_mbstowcs" = yes
13573then
13574
Matthias Kloseb9621712010-04-24 17:59:49 +000013575$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013576
13577fi
13578
Antoine Pitrou042b1282010-08-13 21:15:58 +000013579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13580$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
13581if test "${ac_cv_computed_gotos+set}" = set; then :
13582 $as_echo_n "(cached) " >&6
13583else
13584 if test "$cross_compiling" = yes; then :
13585 ac_cv_computed_gotos=no
13586else
13587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13588/* end confdefs.h. */
13589
13590int main(int argc, char **argv)
13591{
13592 static void *targets[1] = { &&LABEL1 };
13593 goto LABEL2;
13594LABEL1:
13595 return 0;
13596LABEL2:
13597 goto *targets[0];
13598 return 1;
13599}
13600
13601_ACEOF
13602if ac_fn_c_try_run "$LINENO"; then :
13603 ac_cv_computed_gotos=yes
13604else
13605 ac_cv_computed_gotos=no
13606fi
13607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13608 conftest.$ac_objext conftest.beam conftest.$ac_ext
13609fi
13610
13611fi
13612
13613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13614$as_echo "$ac_cv_computed_gotos" >&6; }
13615if test "$ac_cv_computed_gotos" = yes
13616then
13617
13618$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13619
13620fi
13621
Antoine Pitroub52ec782009-01-25 16:34:23 +000013622# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13624$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013625
13626# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013627if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013628 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013629if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013630then
13631
Matthias Kloseb9621712010-04-24 17:59:49 +000013632$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013633
Matthias Kloseb9621712010-04-24 17:59:49 +000013634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13635$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013636fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013637if test "$withval" = no
13638then
13639
13640$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13641
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13643$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013644fi
13645
Antoine Pitrou042b1282010-08-13 21:15:58 +000013646else
13647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13648$as_echo "no value specified" >&6; }
13649fi
13650
Antoine Pitroub52ec782009-01-25 16:34:23 +000013651
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013652case $ac_sys_system in
13653AIX*)
13654
13655$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13656 ;;
13657esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013658
Michael W. Hudson54241132001-12-07 15:38:26 +000013659
Jesus Cea6a792292010-05-03 21:18:48 +000013660case $ac_sys_system in
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013661 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 +000013662esac
13663
13664
13665
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013666
13667
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013668for h in `(cd $srcdir;echo Python/thread_*.h)`
13669do
13670 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13671done
13672
Michael W. Hudson54241132001-12-07 15:38:26 +000013673
Neal Norwitzd24499d2005-12-18 21:36:39 +000013674SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13676$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013677for dir in $SRCDIRS; do
13678 if test ! -d $dir; then
13679 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013680 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013681done
Matthias Kloseb9621712010-04-24 17:59:49 +000013682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13683$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013684
Guido van Rossum627b2d71993-12-24 10:39:16 +000013685# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013686ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013687
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013688ac_config_files="$ac_config_files Modules/ld_so_aix"
13689
Martin v. Löwis11437992002-04-12 09:54:03 +000013690cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013691# This file is a shell script that caches the results of configure
13692# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013693# scripts and configure runs, see configure's option --config-cache.
13694# It is not useful on other systems. If it contains results you don't
13695# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013696#
Martin v. Löwis11437992002-04-12 09:54:03 +000013697# config.status only pays attention to the cache file if you give it
13698# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013699#
Skip Montanaro6dead952003-09-25 14:50:04 +000013700# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013701# loading this file, other *unset* `ac_cv_foo' will be assigned the
13702# following values.
13703
13704_ACEOF
13705
Guido van Rossumf78abae1997-01-21 22:02:36 +000013706# The following way of writing the cache mishandles newlines in values,
13707# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013708# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013709# Ultrix sh set writes to stderr and can't be redirected directly,
13710# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013711(
13712 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13713 eval ac_val=\$$ac_var
13714 case $ac_val in #(
13715 *${as_nl}*)
13716 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13718$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013719 esac
13720 case $ac_var in #(
13721 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13723 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013724 esac ;;
13725 esac
13726 done
13727
Martin v. Löwis11437992002-04-12 09:54:03 +000013728 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013729 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13730 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013731 # `set' does not quote correctly, so add quotes: double-quote
13732 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013733 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013734 "s/'/'\\\\''/g;
13735 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013736 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013737 *)
13738 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013739 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013741 esac |
13742 sort
13743) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013744 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013745 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013746 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013747 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013748 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13749 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13751 :end' >>confcache
13752if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13753 if test -w "$cache_file"; then
13754 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13756$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013757 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013758 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13760$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013761 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013762fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013763rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013764
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013765test "x$prefix" = xNONE && prefix=$ac_default_prefix
13766# Let make expand exec_prefix.
13767test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013768
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013769DEFS=-DHAVE_CONFIG_H
13770
Skip Montanaro6dead952003-09-25 14:50:04 +000013771ac_libobjs=
13772ac_ltlibobjs=
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013773U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013774for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13775 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013776 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013778 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13779 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13781 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013782done
13783LIBOBJS=$ac_libobjs
13784
13785LTLIBOBJS=$ac_ltlibobjs
13786
13787
Martin v. Löwis11437992002-04-12 09:54:03 +000013788
Matthias Kloseb9621712010-04-24 17:59:49 +000013789
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013790: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013791ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013792ac_clean_files_save=$ac_clean_files
13793ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013794{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13795$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13796as_write_fail=0
13797cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013798#! $SHELL
13799# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013800# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013801# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013802# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013803
Martin v. Löwis11437992002-04-12 09:54:03 +000013804debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013805ac_cs_recheck=false
13806ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013807
Matthias Kloseb9621712010-04-24 17:59:49 +000013808SHELL=\${CONFIG_SHELL-$SHELL}
13809export SHELL
13810_ASEOF
13811cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13812## -------------------- ##
13813## M4sh Initialization. ##
13814## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013816# Be more Bourne compatible
13817DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013818if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013819 emulate sh
13820 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013821 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013822 # is contrary to our usage. Disable this feature.
13823 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013824 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013825else
Matthias Kloseb9621712010-04-24 17:59:49 +000013826 case `(set -o) 2>/dev/null` in #(
13827 *posix*) :
13828 set -o posix ;; #(
13829 *) :
13830 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013832fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013833
13834
Matthias Kloseb9621712010-04-24 17:59:49 +000013835as_nl='
13836'
13837export as_nl
13838# Printing a long string crashes Solaris 7 /usr/bin/printf.
13839as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13840as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13841as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13842# Prefer a ksh shell builtin over an external printf program on Solaris,
13843# but without wasting forks for bash or zsh.
13844if test -z "$BASH_VERSION$ZSH_VERSION" \
13845 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13846 as_echo='print -r --'
13847 as_echo_n='print -rn --'
13848elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13849 as_echo='printf %s\n'
13850 as_echo_n='printf %s'
13851else
13852 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13853 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13854 as_echo_n='/usr/ucb/echo -n'
13855 else
13856 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13857 as_echo_n_body='eval
13858 arg=$1;
13859 case $arg in #(
13860 *"$as_nl"*)
13861 expr "X$arg" : "X\\(.*\\)$as_nl";
13862 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13863 esac;
13864 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13865 '
13866 export as_echo_n_body
13867 as_echo_n='sh -c $as_echo_n_body as_echo'
13868 fi
13869 export as_echo_body
13870 as_echo='sh -c $as_echo_body as_echo'
13871fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013872
13873# The user is always right.
13874if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 PATH_SEPARATOR=:
13876 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13877 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13878 PATH_SEPARATOR=';'
13879 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013880fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013882
13883# IFS
13884# We need space, tab and new line, in precisely that order. Quoting is
13885# there to prevent editors from complaining about space-tab.
13886# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13887# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013888IFS=" "" $as_nl"
13889
13890# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013891case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892 *[\\/]* ) as_myself=$0 ;;
13893 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013894for as_dir in $PATH
13895do
13896 IFS=$as_save_IFS
13897 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13899 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902 ;;
13903esac
13904# We did not find ourselves, most probably we were run as `sh COMMAND'
13905# in which case we are not to be found in the path.
13906if test "x$as_myself" = x; then
13907 as_myself=$0
13908fi
13909if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013910 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13911 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013912fi
13913
Matthias Kloseb9621712010-04-24 17:59:49 +000013914# Unset variables that we do not need and which cause bugs (e.g. in
13915# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13916# suppresses any "Segmentation fault" message there. '((' could
13917# trigger a bug in pdksh 5.2.14.
13918for as_var in BASH_ENV ENV MAIL MAILPATH
13919do eval test x\${$as_var+set} = xset \
13920 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013921done
13922PS1='$ '
13923PS2='> '
13924PS4='+ '
13925
13926# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013927LC_ALL=C
13928export LC_ALL
13929LANGUAGE=C
13930export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013931
Matthias Kloseb9621712010-04-24 17:59:49 +000013932# CDPATH.
13933(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13934
13935
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013936# as_fn_error STATUS ERROR [LINENO LOG_FD]
13937# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000013938# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13939# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013940# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000013941as_fn_error ()
13942{
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013943 as_status=$1; test $as_status -eq 0 && as_status=1
13944 if test "$4"; then
13945 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13946 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000013947 fi
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013948 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 as_fn_exit $as_status
13950} # as_fn_error
13951
13952
13953# as_fn_set_status STATUS
13954# -----------------------
13955# Set $? to STATUS, without forking.
13956as_fn_set_status ()
13957{
13958 return $1
13959} # as_fn_set_status
13960
13961# as_fn_exit STATUS
13962# -----------------
13963# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13964as_fn_exit ()
13965{
13966 set +e
13967 as_fn_set_status $1
13968 exit $1
13969} # as_fn_exit
13970
13971# as_fn_unset VAR
13972# ---------------
13973# Portably unset VAR.
13974as_fn_unset ()
13975{
13976 { eval $1=; unset $1;}
13977}
13978as_unset=as_fn_unset
13979# as_fn_append VAR VALUE
13980# ----------------------
13981# Append the text in VALUE to the end of the definition contained in VAR. Take
13982# advantage of any shell optimizations that allow amortized linear growth over
13983# repeated appends, instead of the typical quadratic growth present in naive
13984# implementations.
13985if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13986 eval 'as_fn_append ()
13987 {
13988 eval $1+=\$2
13989 }'
13990else
13991 as_fn_append ()
13992 {
13993 eval $1=\$$1\$2
13994 }
13995fi # as_fn_append
13996
13997# as_fn_arith ARG...
13998# ------------------
13999# Perform arithmetic evaluation on the ARGs, and store the result in the
14000# global $as_val. Take advantage of shells that can avoid forks. The arguments
14001# must be portable across $(()) and expr.
14002if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14003 eval 'as_fn_arith ()
14004 {
14005 as_val=$(( $* ))
14006 }'
14007else
14008 as_fn_arith ()
14009 {
14010 as_val=`expr "$@" || test $? -eq 1`
14011 }
14012fi # as_fn_arith
14013
14014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014015if expr a : '\(a\)' >/dev/null 2>&1 &&
14016 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14017 as_expr=expr
14018else
14019 as_expr=false
14020fi
14021
14022if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14023 as_basename=basename
14024else
14025 as_basename=false
14026fi
14027
Matthias Kloseb9621712010-04-24 17:59:49 +000014028if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14029 as_dirname=dirname
14030else
14031 as_dirname=false
14032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014034as_me=`$as_basename -- "$0" ||
14035$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14036 X"$0" : 'X\(//\)$' \| \
14037 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014038$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014039 sed '/^.*\/\([^/][^/]*\)\/*$/{
14040 s//\1/
14041 q
14042 }
14043 /^X\/\(\/\/\)$/{
14044 s//\1/
14045 q
14046 }
14047 /^X\/\(\/\).*/{
14048 s//\1/
14049 q
14050 }
14051 s/.*/./; q'`
14052
Matthias Kloseb9621712010-04-24 17:59:49 +000014053# Avoid depending upon Character Ranges.
14054as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14055as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14056as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14057as_cr_digits='0123456789'
14058as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014059
14060ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014061case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014062-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014063 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014064 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014065 xy) ECHO_C='\c';;
14066 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14067 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014068 esac;;
14069*)
14070 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014071esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014072
Martin v. Löwis11437992002-04-12 09:54:03 +000014073rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014074if test -d conf$$.dir; then
14075 rm -f conf$$.dir/conf$$.file
14076else
14077 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014078 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014080if (echo >conf$$.file) 2>/dev/null; then
14081 if ln -s conf$$.file conf$$ 2>/dev/null; then
14082 as_ln_s='ln -s'
14083 # ... but there are two gotchas:
14084 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14085 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14086 # In both cases, we have to default to `cp -p'.
14087 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14088 as_ln_s='cp -p'
14089 elif ln conf$$.file conf$$ 2>/dev/null; then
14090 as_ln_s=ln
14091 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014092 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014093 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014094else
14095 as_ln_s='cp -p'
14096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014097rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14098rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014099
Matthias Kloseb9621712010-04-24 17:59:49 +000014100
14101# as_fn_mkdir_p
14102# -------------
14103# Create "$as_dir" as a directory, including parents if necessary.
14104as_fn_mkdir_p ()
14105{
14106
14107 case $as_dir in #(
14108 -*) as_dir=./$as_dir;;
14109 esac
14110 test -d "$as_dir" || eval $as_mkdir_p || {
14111 as_dirs=
14112 while :; do
14113 case $as_dir in #(
14114 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14115 *) as_qdir=$as_dir;;
14116 esac
14117 as_dirs="'$as_qdir' $as_dirs"
14118 as_dir=`$as_dirname -- "$as_dir" ||
14119$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14120 X"$as_dir" : 'X\(//\)[^/]' \| \
14121 X"$as_dir" : 'X\(//\)$' \| \
14122 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14123$as_echo X"$as_dir" |
14124 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14125 s//\1/
14126 q
14127 }
14128 /^X\(\/\/\)[^/].*/{
14129 s//\1/
14130 q
14131 }
14132 /^X\(\/\/\)$/{
14133 s//\1/
14134 q
14135 }
14136 /^X\(\/\).*/{
14137 s//\1/
14138 q
14139 }
14140 s/.*/./; q'`
14141 test -d "$as_dir" && break
14142 done
14143 test -z "$as_dirs" || eval "mkdir $as_dirs"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014144 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014145
14146
14147} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014148if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014149 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014150else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014151 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014152 as_mkdir_p=false
14153fi
14154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014155if test -x / >/dev/null 2>&1; then
14156 as_test_x='test -x'
14157else
14158 if ls -dL / >/dev/null 2>&1; then
14159 as_ls_L_option=L
14160 else
14161 as_ls_L_option=
14162 fi
14163 as_test_x='
14164 eval sh -c '\''
14165 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014166 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014167 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 case $1 in #(
14169 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014171 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014172 ???[sx]*):;;*)false;;esac;fi
14173 '\'' sh
14174 '
14175fi
14176as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014177
14178# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014179as_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 +000014180
14181# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014182as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014183
14184
Martin v. Löwis11437992002-04-12 09:54:03 +000014185exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014186## ----------------------------------- ##
14187## Main body of $CONFIG_STATUS script. ##
14188## ----------------------------------- ##
14189_ASEOF
14190test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014191
Matthias Kloseb9621712010-04-24 17:59:49 +000014192cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14193# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014194# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014195# values after options handling.
14196ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014197This file was extended by python $as_me 3.2, which was
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014198generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014199
14200 CONFIG_FILES = $CONFIG_FILES
14201 CONFIG_HEADERS = $CONFIG_HEADERS
14202 CONFIG_LINKS = $CONFIG_LINKS
14203 CONFIG_COMMANDS = $CONFIG_COMMANDS
14204 $ $0 $@
14205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014206on `(hostname || uname -n) 2>/dev/null | sed 1q`
14207"
14208
Martin v. Löwis11437992002-04-12 09:54:03 +000014209_ACEOF
14210
Matthias Kloseb9621712010-04-24 17:59:49 +000014211case $ac_config_files in *"
14212"*) set x $ac_config_files; shift; ac_config_files=$*;;
14213esac
14214
14215case $ac_config_headers in *"
14216"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14217esac
14218
14219
14220cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014221# Files that config.status was made for.
Barry Warsaw278266f2010-10-14 17:38:46 +000014222config_files="$ac_config_files"
14223config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014225_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014226
Matthias Kloseb9621712010-04-24 17:59:49 +000014227cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014228ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014229\`$as_me' instantiates files and other configuration actions
14230from templates according to the current configuration. Unless the files
14231and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014232
Matthias Kloseb9621712010-04-24 17:59:49 +000014233Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014234
14235 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014236 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014237 --config print configuration, then exit
14238 -q, --quiet, --silent
14239 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014240 -d, --debug don't remove temporary files
14241 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 --file=FILE[:TEMPLATE]
14243 instantiate the configuration file FILE
14244 --header=FILE[:TEMPLATE]
14245 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014246
14247Configuration files:
14248$config_files
14249
14250Configuration headers:
14251$config_headers
14252
Matthias Kloseb9621712010-04-24 17:59:49 +000014253Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014256cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14257ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014258ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014259python config.status 3.2
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014260configured by $0, generated by GNU Autoconf 2.67,
Matthias Kloseb9621712010-04-24 17:59:49 +000014261 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014262
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014263Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014264This config.status script is free software; the Free Software Foundation
14265gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014266
14267ac_pwd='$ac_pwd'
14268srcdir='$srcdir'
14269INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014270test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014271_ACEOF
14272
Matthias Kloseb9621712010-04-24 17:59:49 +000014273cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14274# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014275ac_need_defaults=:
14276while test $# != 0
14277do
14278 case $1 in
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014279 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014280 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14281 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014282 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014283 ;;
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014284 --*=)
14285 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14286 ac_optarg=
14287 ac_shift=:
14288 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014289 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014290 ac_option=$1
14291 ac_optarg=$2
14292 ac_shift=shift
14293 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014294 esac
14295
Skip Montanaro6dead952003-09-25 14:50:04 +000014296 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014297 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014298 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14299 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014300 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014301 $as_echo "$ac_cs_version"; exit ;;
14302 --config | --confi | --conf | --con | --co | --c )
14303 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014304 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014305 debug=: ;;
14306 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014307 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014308 case $ac_optarg in
14309 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014310 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014311 esac
14312 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014313 ac_need_defaults=false;;
14314 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014315 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014316 case $ac_optarg in
14317 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14318 esac
14319 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014320 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014321 --he | --h)
14322 # Conflict between --help and --header
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014323 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014324Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014326 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014327 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14328 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14329 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014330
14331 # This is an error.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014332 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014333Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014334
Matthias Kloseb9621712010-04-24 17:59:49 +000014335 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014336 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014337
14338 esac
14339 shift
14340done
14341
Skip Montanaro6dead952003-09-25 14:50:04 +000014342ac_configure_extra_args=
14343
14344if $ac_cs_silent; then
14345 exec 6>/dev/null
14346 ac_configure_extra_args="$ac_configure_extra_args --silent"
14347fi
14348
14349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014350cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014351if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14353 shift
14354 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14355 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014356 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014357 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014358fi
14359
Martin v. Löwis11437992002-04-12 09:54:03 +000014360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014361cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014362exec 5>>config.log
14363{
14364 echo
14365 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14366## Running $as_me. ##
14367_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014368 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014369} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014372cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014373_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014374
Matthias Kloseb9621712010-04-24 17:59:49 +000014375cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014376
14377# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014378for ac_config_target in $ac_config_targets
14379do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014380 case $ac_config_target in
14381 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14382 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14383 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014384 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14385 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014386 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14387 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014388 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014389 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014390
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014391 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014392 esac
14393done
14394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014395
Martin v. Löwis11437992002-04-12 09:54:03 +000014396# If the user did not use the arguments to specify the items to instantiate,
14397# then the envvar interface is used. Set only those that are not.
14398# We use the long form for the default assignment because of an extremely
14399# bizarre bug on SunOS 4.1.3.
14400if $ac_need_defaults; then
14401 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14402 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14403fi
14404
Skip Montanaro6dead952003-09-25 14:50:04 +000014405# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014406# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014407# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014408# Hook for its removal unless debugging.
14409# Note that there is a small window in which the directory will not be cleaned:
14410# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014411$debug ||
14412{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014413 tmp=
14414 trap 'exit_status=$?
14415 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14416' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014417 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014418}
Martin v. Löwis11437992002-04-12 09:54:03 +000014419# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014420
Martin v. Löwis11437992002-04-12 09:54:03 +000014421{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014422 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014423 test -n "$tmp" && test -d "$tmp"
14424} ||
14425{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014426 tmp=./conf$$-$RANDOM
14427 (umask 077 && mkdir "$tmp")
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014428} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014429
Matthias Kloseb9621712010-04-24 17:59:49 +000014430# Set up the scripts for CONFIG_FILES section.
14431# No need to generate them if there are no CONFIG_FILES.
14432# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014433if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014434
Matthias Kloseb9621712010-04-24 17:59:49 +000014435
14436ac_cr=`echo X | tr X '\015'`
14437# On cygwin, bash can eat \r inside `` if the user requested igncr.
14438# But we know of no other shell where ac_cr would be empty at this
14439# point, so we can use a bashism as a fallback.
14440if test "x$ac_cr" = x; then
14441 eval ac_cr=\$\'\\r\'
14442fi
14443ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14444if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014445 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014446else
14447 ac_cs_awk_cr=$ac_cr
14448fi
14449
14450echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014451_ACEOF
14452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014453
Matthias Kloseb9621712010-04-24 17:59:49 +000014454{
14455 echo "cat >conf$$subs.awk <<_ACEOF" &&
14456 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14457 echo "_ACEOF"
14458} >conf$$subs.sh ||
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014459 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14460ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014461ac_delim='%!_!# '
14462for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014463 . ./conf$$subs.sh ||
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014464 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014465
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14467 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014468 break
14469 elif $ac_last_try; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014470 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471 else
14472 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014474done
Matthias Kloseb9621712010-04-24 17:59:49 +000014475rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014476
Matthias Kloseb9621712010-04-24 17:59:49 +000014477cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14478cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014480sed -n '
14481h
14482s/^/S["/; s/!.*/"]=/
14483p
14484g
14485s/^[^!]*!//
14486:repl
14487t repl
14488s/'"$ac_delim"'$//
14489t delim
14490:nl
14491h
14492s/\(.\{148\}\)..*/\1/
14493t more1
14494s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14495p
14496n
14497b repl
14498:more1
14499s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14500p
14501g
14502s/.\{148\}//
14503t nl
14504:delim
14505h
14506s/\(.\{148\}\)..*/\1/
14507t more2
14508s/["\\]/\\&/g; s/^/"/; s/$/"/
14509p
14510b
14511:more2
14512s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14513p
14514g
14515s/.\{148\}//
14516t delim
14517' <conf$$subs.awk | sed '
14518/^[^""]/{
14519 N
14520 s/\n//
14521}
14522' >>$CONFIG_STATUS || ac_write_fail=1
14523rm -f conf$$subs.awk
14524cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14525_ACAWK
14526cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14527 for (key in S) S_is_set[key] = 1
14528 FS = ""
14529
14530}
14531{
14532 line = $ 0
14533 nfields = split(line, field, "@")
14534 substed = 0
14535 len = length(field[1])
14536 for (i = 2; i < nfields; i++) {
14537 key = field[i]
14538 keylen = length(key)
14539 if (S_is_set[key]) {
14540 value = S[key]
14541 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14542 len += length(value) + length(field[++i])
14543 substed = 1
14544 } else
14545 len += 1 + keylen
14546 }
14547
14548 print line
14549}
14550
14551_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014553cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14554if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14555 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14556else
14557 cat
14558fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014559 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014560_ACEOF
14561
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014562# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14563# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564# trailing colons and then remove the whole line if VPATH becomes empty
14565# (actually we leave an empty line to preserve line numbers).
14566if test "x$srcdir" = x.; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014567 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14568h
14569s///
14570s/^/:/
14571s/[ ]*$/:/
14572s/:\$(srcdir):/:/g
14573s/:\${srcdir}:/:/g
14574s/:@srcdir@:/:/g
14575s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576s/:*$//
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014577x
14578s/\(=[ ]*\).*/\1/
14579G
14580s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014581s/^[^=]*=[ ]*$//
14582}'
14583fi
14584
Matthias Kloseb9621712010-04-24 17:59:49 +000014585cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014586fi # test -n "$CONFIG_FILES"
14587
Matthias Kloseb9621712010-04-24 17:59:49 +000014588# Set up the scripts for CONFIG_HEADERS section.
14589# No need to generate them if there are no CONFIG_HEADERS.
14590# This happens for instance with `./config.status Makefile'.
14591if test -n "$CONFIG_HEADERS"; then
14592cat >"$tmp/defines.awk" <<\_ACAWK ||
14593BEGIN {
14594_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595
Matthias Kloseb9621712010-04-24 17:59:49 +000014596# Transform confdefs.h into an awk script `defines.awk', embedded as
14597# here-document in config.status, that substitutes the proper values into
14598# config.h.in to produce config.h.
14599
14600# Create a delimiter string that does not exist in confdefs.h, to ease
14601# handling of long lines.
14602ac_delim='%!_!# '
14603for ac_last_try in false false :; do
14604 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14605 if test -z "$ac_t"; then
14606 break
14607 elif $ac_last_try; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014608 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014609 else
14610 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14611 fi
14612done
14613
14614# For the awk script, D is an array of macro values keyed by name,
14615# likewise P contains macro parameters if any. Preserve backslash
14616# newline sequences.
14617
14618ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14619sed -n '
14620s/.\{148\}/&'"$ac_delim"'/g
14621t rset
14622:rset
14623s/^[ ]*#[ ]*define[ ][ ]*/ /
14624t def
14625d
14626:def
14627s/\\$//
14628t bsnl
14629s/["\\]/\\&/g
14630s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14631D["\1"]=" \3"/p
14632s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14633d
14634:bsnl
14635s/["\\]/\\&/g
14636s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14637D["\1"]=" \3\\\\\\n"\\/p
14638t cont
14639s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14640t cont
14641d
14642:cont
14643n
14644s/.\{148\}/&'"$ac_delim"'/g
14645t clear
14646:clear
14647s/\\$//
14648t bsnlc
14649s/["\\]/\\&/g; s/^/"/; s/$/"/p
14650d
14651:bsnlc
14652s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14653b cont
14654' <confdefs.h | sed '
14655s/'"$ac_delim"'/"\\\
14656"/g' >>$CONFIG_STATUS || ac_write_fail=1
14657
14658cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14659 for (key in D) D_is_set[key] = 1
14660 FS = ""
14661}
14662/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14663 line = \$ 0
14664 split(line, arg, " ")
14665 if (arg[1] == "#") {
14666 defundef = arg[2]
14667 mac1 = arg[3]
14668 } else {
14669 defundef = substr(arg[1], 2)
14670 mac1 = arg[2]
14671 }
14672 split(mac1, mac2, "(") #)
14673 macro = mac2[1]
14674 prefix = substr(line, 1, index(line, defundef) - 1)
14675 if (D_is_set[macro]) {
14676 # Preserve the white space surrounding the "#".
14677 print prefix "define", macro P[macro] D[macro]
14678 next
14679 } else {
14680 # Replace #undef with comments. This is necessary, for example,
14681 # in the case of _POSIX_SOURCE, which is predefined and required
14682 # on some systems where configure will not decide to define it.
14683 if (defundef == "undef") {
14684 print "/*", prefix defundef, macro, "*/"
14685 next
14686 }
14687 }
14688}
14689{ print }
14690_ACAWK
14691_ACEOF
14692cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014693 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014694fi # test -n "$CONFIG_HEADERS"
14695
14696
14697eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14698shift
14699for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014700do
14701 case $ac_tag in
14702 :[FHLC]) ac_mode=$ac_tag; continue;;
14703 esac
14704 case $ac_mode$ac_tag in
14705 :[FHL]*:*);;
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014706 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014707 :[FH]-) ac_tag=-:-;;
14708 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14709 esac
14710 ac_save_IFS=$IFS
14711 IFS=:
14712 set x $ac_tag
14713 IFS=$ac_save_IFS
14714 shift
14715 ac_file=$1
14716 shift
14717
14718 case $ac_mode in
14719 :L) ac_source=$1;;
14720 :[FH])
14721 ac_file_inputs=
14722 for ac_f
14723 do
14724 case $ac_f in
14725 -) ac_f="$tmp/stdin";;
14726 *) # Look for the file first in the build tree, then in the source tree
14727 # (if the path is not absolute). The absolute path cannot be DOS-style,
14728 # because $ac_f cannot contain `:'.
14729 test -f "$ac_f" ||
14730 case $ac_f in
14731 [\\/$]*) false;;
14732 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14733 esac ||
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014734 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14737 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014738 done
14739
14740 # Let's still pretend it is `configure' which instantiates (i.e., don't
14741 # use $as_me), people would be surprised to read:
14742 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014743 configure_input='Generated from '`
14744 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14745 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014746 if test x"$ac_file" != x-; then
14747 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014748 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14749$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014751 # Neutralize special characters interpreted by sed in replacement strings.
14752 case $configure_input in #(
14753 *\&* | *\|* | *\\* )
14754 ac_sed_conf_input=`$as_echo "$configure_input" |
14755 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14756 *) ac_sed_conf_input=$configure_input;;
14757 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014758
14759 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014760 *:-:* | *:-) cat >"$tmp/stdin" \
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014761 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014762 esac
14763 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014764 esac
14765
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014766 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014767$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014768 X"$ac_file" : 'X\(//\)[^/]' \| \
14769 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014770 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014771$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014772 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14773 s//\1/
14774 q
14775 }
14776 /^X\(\/\/\)[^/].*/{
14777 s//\1/
14778 q
14779 }
14780 /^X\(\/\/\)$/{
14781 s//\1/
14782 q
14783 }
14784 /^X\(\/\).*/{
14785 s//\1/
14786 q
14787 }
14788 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014790 ac_builddir=.
14791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014792case "$ac_dir" in
14793.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14794*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014795 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014796 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014797 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014798 case $ac_top_builddir_sub in
14799 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14800 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14801 esac ;;
14802esac
14803ac_abs_top_builddir=$ac_pwd
14804ac_abs_builddir=$ac_pwd$ac_dir_suffix
14805# for backward compatibility:
14806ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014807
14808case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014810 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811 ac_top_srcdir=$ac_top_builddir_sub
14812 ac_abs_top_srcdir=$ac_pwd ;;
14813 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014814 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815 ac_top_srcdir=$srcdir
14816 ac_abs_top_srcdir=$srcdir ;;
14817 *) # Relative name.
14818 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14819 ac_top_srcdir=$ac_top_build_prefix$srcdir
14820 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014821esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014822ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014823
Martin v. Löwis11437992002-04-12 09:54:03 +000014824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014825 case $ac_mode in
14826 :F)
14827 #
14828 # CONFIG_FILE
14829 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014830
14831 case $INSTALL in
14832 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014833 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014834 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014835_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836
Matthias Kloseb9621712010-04-24 17:59:49 +000014837cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014838# If the template does not know about datarootdir, expand it.
14839# FIXME: This hack should be removed a few years after 2.60.
14840ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014841ac_sed_dataroot='
14842/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014843 p
14844 q
14845}
14846/@datadir@/p
14847/@docdir@/p
14848/@infodir@/p
14849/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014850/@mandir@/p'
14851case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014852*datarootdir*) ac_datarootdir_seen=yes;;
14853*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014854 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14855$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014857cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014858 ac_datarootdir_hack='
14859 s&@datadir@&$datadir&g
14860 s&@docdir@&$docdir&g
14861 s&@infodir@&$infodir&g
14862 s&@localedir@&$localedir&g
14863 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014864 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014865esac
14866_ACEOF
14867
14868# Neutralize VPATH when `$srcdir' = `.'.
14869# Shell code in configure.ac might set extrasub.
14870# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014871cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14872ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014873$extrasub
14874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014875cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014876:t
14877/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014878s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014879s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014880s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881s&@srcdir@&$ac_srcdir&;t t
14882s&@abs_srcdir@&$ac_abs_srcdir&;t t
14883s&@top_srcdir@&$ac_top_srcdir&;t t
14884s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14885s&@builddir@&$ac_builddir&;t t
14886s&@abs_builddir@&$ac_abs_builddir&;t t
14887s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14888s&@INSTALL@&$ac_INSTALL&;t t
14889$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014890"
14891eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014892 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014894test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14895 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14896 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014898which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014899$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014900which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014902 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014903 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014904 -) cat "$tmp/out" && rm -f "$tmp/out";;
14905 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14906 esac \
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014907 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014908 ;;
14909 :H)
14910 #
14911 # CONFIG_HEADER
14912 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014913 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014914 {
14915 $as_echo "/* $configure_input */" \
14916 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14917 } >"$tmp/config.h" \
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014918 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014919 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14920 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14921$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014922 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014923 rm -f "$ac_file"
14924 mv "$tmp/config.h" "$ac_file" \
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014925 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014926 fi
14927 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014928 $as_echo "/* $configure_input */" \
14929 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014930 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014931 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934
14935 esac
14936
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014937
14938 case $ac_file$ac_mode in
14939 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
14940
14941 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014942done # for ac_tag
14943
Guido van Rossum627b2d71993-12-24 10:39:16 +000014944
Matthias Kloseb9621712010-04-24 17:59:49 +000014945as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014946_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014947ac_clean_files=$ac_clean_files_save
14948
Matthias Kloseb9621712010-04-24 17:59:49 +000014949test $ac_write_fail = 0 ||
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014950 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014951
Martin v. Löwis11437992002-04-12 09:54:03 +000014952
14953# configure is writing to config.log, and then calls config.status.
14954# config.status does its own redirection, appending to config.log.
14955# Unfortunately, on DOS this fails, as config.log is still kept open
14956# by configure, so config.status won't be able to write to it; its
14957# output is simply discarded. So we exec the FD to /dev/null,
14958# effectively closing config.log, so it can be properly (re)opened and
14959# appended to by config.status. When coming back to configure, we
14960# need to make the FD available again.
14961if test "$no_create" != yes; then
14962 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014963 ac_config_status_args=
14964 test "$silent" = yes &&
14965 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014966 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014967 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014968 exec 5>>config.log
14969 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14970 # would make configure fail if this is the last instruction.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014971 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000014972fi
14973if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14974 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14975$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014976fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014977
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014978
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014979echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014980if test ! -f Modules/Setup
14981then
14982 cp $srcdir/Modules/Setup.dist Modules/Setup
14983fi
14984
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014985echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014986if test ! -f Modules/Setup.local
14987then
14988 echo "# Edit this file for local setup changes" >Modules/Setup.local
14989fi
14990
14991echo "creating Makefile"
14992$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
14993 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000014994 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014995mv config.c Modules