blob: c7156efb27e406b13f6d33b4300abd5a1b8766e8 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002# From configure.in Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Barry Warsaw14d98ac2010-11-24 19:43:47 +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,
Mark Dickinsonec0d3552010-11-20 10:29:12 +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
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000225fi
226
227 if test x$as_have_required = xno; then :
228 $as_echo "$0: This script requires a shell more modern than all"
229 $as_echo "$0: the shells that I found on your system."
230 if test x${ZSH_VERSION+set} = xset ; then
231 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
232 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
233 else
234 $as_echo "$0: Please tell bug-autoconf@gnu.org and
235$0: http://bugs.python.org/ about your system, including
236$0: any error possibly output before this message. Then
237$0: install a modern shell, or manually run the script
238$0: under such a shell if you do have one."
239 fi
240 exit 1
241fi
242fi
243fi
244SHELL=${CONFIG_SHELL-/bin/sh}
245export SHELL
246# Unset more variables known to interfere with behavior of common tools.
247CLICOLOR_FORCE= GREP_OPTIONS=
248unset CLICOLOR_FORCE GREP_OPTIONS
249
250## --------------------- ##
251## M4sh Shell Functions. ##
252## --------------------- ##
253# as_fn_unset VAR
254# ---------------
255# Portably unset VAR.
256as_fn_unset ()
257{
258 { eval $1=; unset $1;}
259}
260as_unset=as_fn_unset
261
262# as_fn_set_status STATUS
263# -----------------------
264# Set $? to STATUS, without forking.
265as_fn_set_status ()
266{
267 return $1
268} # as_fn_set_status
269
270# as_fn_exit STATUS
271# -----------------
272# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
273as_fn_exit ()
274{
275 set +e
276 as_fn_set_status $1
277 exit $1
278} # as_fn_exit
279
280# as_fn_mkdir_p
281# -------------
282# Create "$as_dir" as a directory, including parents if necessary.
283as_fn_mkdir_p ()
284{
285
286 case $as_dir in #(
287 -*) as_dir=./$as_dir;;
288 esac
289 test -d "$as_dir" || eval $as_mkdir_p || {
290 as_dirs=
291 while :; do
292 case $as_dir in #(
293 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
294 *) as_qdir=$as_dir;;
295 esac
296 as_dirs="'$as_qdir' $as_dirs"
297 as_dir=`$as_dirname -- "$as_dir" ||
298$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
299 X"$as_dir" : 'X\(//\)[^/]' \| \
300 X"$as_dir" : 'X\(//\)$' \| \
301 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
302$as_echo X"$as_dir" |
303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)[^/].*/{
308 s//\1/
309 q
310 }
311 /^X\(\/\/\)$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\).*/{
316 s//\1/
317 q
318 }
319 s/.*/./; q'`
320 test -d "$as_dir" && break
321 done
322 test -z "$as_dirs" || eval "mkdir $as_dirs"
Mark Dickinsonec0d3552010-11-20 10:29:12 +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
Mark Dickinsonec0d3552010-11-20 10:29:12 +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
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000367# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Mark Dickinsonec0d3552010-11-20 10:29:12 +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
Mark Dickinsonec0d3552010-11-20 10:29:12 +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.
Mark Dickinsonec0d3552010-11-20 10:29:12 +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
Benjamin Peterson076ed002010-10-31 17:11:02 +0000742enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000743with_dbmliborder
744with_signal_module
745with_dec_threads
746with_threads
747with_thread
748enable_ipv6
749with_doc_strings
750with_tsc
751with_pymalloc
752with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000753with_fpectl
754with_libm
755with_libc
756enable_big_digits
757with_wide_unicode
758with_computed_gotos
759'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000760 ac_precious_vars='build_alias
761host_alias
762target_alias
763CC
764CFLAGS
765LDFLAGS
766LIBS
767CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000768CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000769
Guido van Rossum627b2d71993-12-24 10:39:16 +0000770
Guido van Rossum7f43da71994-08-01 12:15:30 +0000771# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000772ac_init_help=
773ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000774ac_unrecognized_opts=
775ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000776# The variables have the same names as the options, with
777# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000778cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000779exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000780no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000781no_recursion=
782prefix=NONE
783program_prefix=NONE
784program_suffix=NONE
785program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000786silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000790x_includes=NONE
791x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000792
793# Installation directory options.
794# These are left unexpanded so users can "make install exec_prefix=/foo"
795# and all the variables that are supposed to be based on exec_prefix
796# by default will actually change.
797# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000798# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000799bindir='${exec_prefix}/bin'
800sbindir='${exec_prefix}/sbin'
801libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000802datarootdir='${prefix}/share'
803datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000804sysconfdir='${prefix}/etc'
805sharedstatedir='${prefix}/com'
806localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000807includedir='${prefix}/include'
808oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
810infodir='${datarootdir}/info'
811htmldir='${docdir}'
812dvidir='${docdir}'
813pdfdir='${docdir}'
814psdir='${docdir}'
815libdir='${exec_prefix}/lib'
816localedir='${datarootdir}/locale'
817mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000818
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000820ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000822do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823 # If the previous option needs an argument, assign it.
824 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000825 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826 ac_prev=
827 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000828 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830 case $ac_option in
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000831 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
832 *=) ac_optarg= ;;
833 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836 # Accept the important Cygnus configure options, so we can diagnose typos.
837
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 case $ac_dashdash$ac_option in
839 --)
840 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842 -bindir | --bindir | --bindi | --bind | --bin | --bi)
843 ac_prev=bindir ;;
844 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000845 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846
847 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000849 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000850 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 -cache-file | --cache-file | --cache-fil | --cache-fi \
853 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
854 ac_prev=cache_file ;;
855 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
856 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 cache_file=$ac_optarg ;;
858
859 --config-cache | -C)
860 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000865 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000866
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
868 | --dataroo | --dataro | --datar)
869 ac_prev=datarootdir ;;
870 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
871 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
872 datarootdir=$ac_optarg ;;
873
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000875 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000877 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000878 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000879 ac_useropt_orig=$ac_useropt
880 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
881 case $ac_user_opts in
882 *"
883"enable_$ac_useropt"
884"*) ;;
885 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
886 ac_unrecognized_sep=', ';;
887 esac
888 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889
890 -docdir | --docdir | --docdi | --doc | --do)
891 ac_prev=docdir ;;
892 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
893 docdir=$ac_optarg ;;
894
895 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
896 ac_prev=dvidir ;;
897 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
898 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000901 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000902 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000903 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000904 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000905 ac_useropt_orig=$ac_useropt
906 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
907 case $ac_user_opts in
908 *"
909"enable_$ac_useropt"
910"*) ;;
911 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
912 ac_unrecognized_sep=', ';;
913 esac
914 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
917 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
918 | --exec | --exe | --ex)
919 ac_prev=exec_prefix ;;
920 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
921 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
922 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
925 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Obsolete; use --with-gas.
927 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 -help | --help | --hel | --he | -h)
930 ac_init_help=long ;;
931 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
932 ac_init_help=recursive ;;
933 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
934 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
936 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
942 ac_prev=htmldir ;;
943 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
944 | --ht=*)
945 htmldir=$ac_optarg ;;
946
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947 -includedir | --includedir | --includedi | --included | --include \
948 | --includ | --inclu | --incl | --inc)
949 ac_prev=includedir ;;
950 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
951 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953
954 -infodir | --infodir | --infodi | --infod | --info | --inf)
955 ac_prev=infodir ;;
956 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
959 -libdir | --libdir | --libdi | --libd)
960 ac_prev=libdir ;;
961 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963
964 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
965 | --libexe | --libex | --libe)
966 ac_prev=libexecdir ;;
967 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
968 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971 -localedir | --localedir | --localedi | --localed | --locale)
972 ac_prev=localedir ;;
973 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
974 localedir=$ac_optarg ;;
975
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000977 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978 ac_prev=localstatedir ;;
979 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
983 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
984 ac_prev=mandir ;;
985 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989 # Obsolete; use --without-fp.
990 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994 no_create=yes ;;
995
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
997 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
998 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1001 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1002 | --oldin | --oldi | --old | --ol | --o)
1003 ac_prev=oldincludedir ;;
1004 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1005 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1006 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001008
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1010 ac_prev=prefix ;;
1011 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
1014 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1015 | --program-pre | --program-pr | --program-p)
1016 ac_prev=program_prefix ;;
1017 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1018 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
1021 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1022 | --program-suf | --program-su | --program-s)
1023 ac_prev=program_suffix ;;
1024 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1025 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
1028 -program-transform-name | --program-transform-name \
1029 | --program-transform-nam | --program-transform-na \
1030 | --program-transform-n | --program-transform- \
1031 | --program-transform | --program-transfor \
1032 | --program-transfo | --program-transf \
1033 | --program-trans | --program-tran \
1034 | --progr-tra | --program-tr | --program-t)
1035 ac_prev=program_transform_name ;;
1036 -program-transform-name=* | --program-transform-name=* \
1037 | --program-transform-nam=* | --program-transform-na=* \
1038 | --program-transform-n=* | --program-transform-=* \
1039 | --program-transform=* | --program-transfor=* \
1040 | --program-transfo=* | --program-transf=* \
1041 | --program-trans=* | --program-tran=* \
1042 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001045 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1046 ac_prev=pdfdir ;;
1047 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1048 pdfdir=$ac_optarg ;;
1049
1050 -psdir | --psdir | --psdi | --psd | --ps)
1051 ac_prev=psdir ;;
1052 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1053 psdir=$ac_optarg ;;
1054
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1056 | -silent | --silent | --silen | --sile | --sil)
1057 silent=yes ;;
1058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1060 ac_prev=sbindir ;;
1061 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1062 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
1065 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1066 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1067 | --sharedst | --shareds | --shared | --share | --shar \
1068 | --sha | --sh)
1069 ac_prev=sharedstatedir ;;
1070 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1071 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1072 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1073 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 -site | --site | --sit)
1077 ac_prev=site ;;
1078 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1082 ac_prev=srcdir ;;
1083 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1087 | --syscon | --sysco | --sysc | --sys | --sy)
1088 ac_prev=sysconfdir ;;
1089 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1090 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1099 verbose=yes ;;
1100
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 -version | --version | --versio | --versi | --vers | -V)
1102 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001105 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001106 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001107 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001108 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001109 ac_useropt_orig=$ac_useropt
1110 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1111 case $ac_user_opts in
1112 *"
1113"with_$ac_useropt"
1114"*) ;;
1115 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1116 ac_unrecognized_sep=', ';;
1117 esac
1118 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001121 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001122 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001123 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001124 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001125 ac_useropt_orig=$ac_useropt
1126 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1127 case $ac_user_opts in
1128 *"
1129"with_$ac_useropt"
1130"*) ;;
1131 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1132 ac_unrecognized_sep=', ';;
1133 esac
1134 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136 --x)
1137 # Obsolete; use --with-x.
1138 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
1140 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1141 | --x-incl | --x-inc | --x-in | --x-i)
1142 ac_prev=x_includes ;;
1143 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1144 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146
1147 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1148 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1149 ac_prev=x_libraries ;;
1150 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1151 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001154 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1155Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156 ;;
1157
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 *=*)
1159 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1160 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001161 case $ac_envvar in #(
1162 '' | [0-9]* | *[!_$as_cr_alnum]* )
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001163 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001164 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001165 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 export $ac_envvar ;;
1167
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001173 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 ;;
1175
1176 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001177done
1178
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001181 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182fi
1183
Matthias Kloseb9621712010-04-24 17:59:49 +00001184if test -n "$ac_unrecognized_opts"; then
1185 case $enable_option_checking in
1186 no) ;;
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001187 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1189 esac
1190fi
1191
1192# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001193for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1194 datadir sysconfdir sharedstatedir localstatedir includedir \
1195 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1196 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001198 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 # Remove trailing slashes.
1200 case $ac_val in
1201 */ )
1202 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1203 eval $ac_var=\$ac_val;;
1204 esac
1205 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001207 [\\/$]* | ?:[\\/]* ) continue;;
1208 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 esac
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001210 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001211done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212
Martin v. Löwis11437992002-04-12 09:54:03 +00001213# There might be people who depend on the old broken behavior: `$host'
1214# used to hold the argument of --host etc.
1215# FIXME: To remove some day.
1216build=$build_alias
1217host=$host_alias
1218target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001219
Martin v. Löwis11437992002-04-12 09:54:03 +00001220# FIXME: To remove some day.
1221if test "x$host_alias" != x; then
1222 if test "x$build_alias" = x; then
1223 cross_compiling=maybe
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001224 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1225 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001226 elif test "x$build_alias" != "x$host_alias"; then
1227 cross_compiling=yes
1228 fi
1229fi
1230
1231ac_tool_prefix=
1232test -n "$host_alias" && ac_tool_prefix=$host_alias-
1233
1234test "$silent" = yes && exec 6>/dev/null
1235
Guido van Rossum627b2d71993-12-24 10:39:16 +00001236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237ac_pwd=`pwd` && test -n "$ac_pwd" &&
1238ac_ls_di=`ls -di .` &&
1239ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001240 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001241test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001242 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001243
1244
Guido van Rossum627b2d71993-12-24 10:39:16 +00001245# Find the source files, if location was not specified.
1246if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001248 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001249 ac_confdir=`$as_dirname -- "$as_myself" ||
1250$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1251 X"$as_myself" : 'X\(//\)[^/]' \| \
1252 X"$as_myself" : 'X\(//\)$' \| \
1253 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1254$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1256 s//\1/
1257 q
1258 }
1259 /^X\(\/\/\)[^/].*/{
1260 s//\1/
1261 q
1262 }
1263 /^X\(\/\/\)$/{
1264 s//\1/
1265 q
1266 }
1267 /^X\(\/\).*/{
1268 s//\1/
1269 q
1270 }
1271 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001273 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274 srcdir=..
1275 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001276else
1277 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279if test ! -r "$srcdir/$ac_unique_file"; then
1280 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001281 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1284ac_abs_confdir=`(
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001285 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286 pwd)`
1287# When building in place, set srcdir=.
1288if test "$ac_abs_confdir" = "$ac_pwd"; then
1289 srcdir=.
1290fi
1291# Remove unnecessary trailing slashes from srcdir.
1292# Double slashes in file names in object file debugging info
1293# mess up M-x gdb in Emacs.
1294case $srcdir in
1295*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1296esac
1297for ac_var in $ac_precious_vars; do
1298 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1299 eval ac_env_${ac_var}_value=\$${ac_var}
1300 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1301 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1302done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001303
Martin v. Löwis11437992002-04-12 09:54:03 +00001304#
1305# Report the --help message.
1306#
1307if test "$ac_init_help" = "long"; then
1308 # Omit some internal or obsolete options to make the list less imposing.
1309 # This message is too long to be a string in the A/UX 3.1 sh.
1310 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001311\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001312
1313Usage: $0 [OPTION]... [VAR=VALUE]...
1314
1315To assign environment variables (e.g., CC, CFLAGS...), specify them as
1316VAR=VALUE. See below for descriptions of some of the useful variables.
1317
1318Defaults for the options are specified in brackets.
1319
1320Configuration:
1321 -h, --help display this help and exit
1322 --help=short display options specific to this package
1323 --help=recursive display the short help of all the included packages
1324 -V, --version display version information and exit
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001325 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001326 --cache-file=FILE cache test results in FILE [disabled]
1327 -C, --config-cache alias for \`--cache-file=config.cache'
1328 -n, --no-create do not create output files
1329 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1330
Martin v. Löwis11437992002-04-12 09:54:03 +00001331Installation directories:
1332 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001333 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001334 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001335 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001336
1337By default, \`make install' will install all the files in
1338\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1339an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1340for instance \`--prefix=\$HOME'.
1341
1342For better control, use the options below.
1343
1344Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001345 --bindir=DIR user executables [EPREFIX/bin]
1346 --sbindir=DIR system admin executables [EPREFIX/sbin]
1347 --libexecdir=DIR program executables [EPREFIX/libexec]
1348 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1349 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1350 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1351 --libdir=DIR object code libraries [EPREFIX/lib]
1352 --includedir=DIR C header files [PREFIX/include]
1353 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1354 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1355 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1356 --infodir=DIR info documentation [DATAROOTDIR/info]
1357 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1358 --mandir=DIR man documentation [DATAROOTDIR/man]
1359 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1360 --htmldir=DIR html documentation [DOCDIR]
1361 --dvidir=DIR dvi documentation [DOCDIR]
1362 --pdfdir=DIR pdf documentation [DOCDIR]
1363 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001364_ACEOF
1365
1366 cat <<\_ACEOF
1367_ACEOF
1368fi
1369
1370if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001371 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001372 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001373 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001374 cat <<\_ACEOF
1375
1376Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001377 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1379 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001380 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001381 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001382 --enable-framework[=INSTALLDIR]
1383 Build (MacOSX|Darwin) framework
1384 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001385 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001386 --enable-loadable-sqlite-extensions
1387 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001388 --enable-ipv6 Enable ipv6 (with ipv4) support
1389 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001390 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001391 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393Optional Packages:
1394 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1395 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001396 --with-universal-archs=ARCH
1397 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001398 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001399 --with-framework-name=FRAMEWORK
1400 specify an alternate name of the framework built
1401 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001402 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001403 --with-cxx-main=<compiler>
1404 compile main() and link python executable with C++
1405 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001406 --with-suffix=.exe set executable suffix
1407 --with-pydebug build with Py_DEBUG defined
1408 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001409 --with-system-expat build pyexpat module using an installed expat
1410 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001411 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001412 --with-dbmliborder=db1:db2:...
1413 order to check db backends for dbm. Valid value is a
1414 colon separated string with the backend names
1415 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --with-signal-module disable/enable signal module
1417 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1418 --with(out)-threads[=DIRECTORY]
1419 disable/enable thread support
1420 --with(out)-thread[=DIRECTORY]
1421 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001422 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001423 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001424 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001425 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001426 --with-fpectl enable SIGFPE catching
1427 --with-libm=STRING math library
1428 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001429 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001430 --with(out)-computed-gotos
1431 Use computed gotos in evaluation loop (enabled by
1432 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001433
1434Some influential environment variables:
1435 CC C compiler command
1436 CFLAGS C compiler flags
1437 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1438 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001439 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001440 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001441 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001442 CPP C preprocessor
1443
1444Use these variables to override the choices made by `configure' or to help
1445it to find libraries and programs with nonstandard names/locations.
1446
Georg Brandle2e15612009-05-20 18:25:10 +00001447Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001448_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001450fi
1451
1452if test "$ac_init_help" = "recursive"; then
1453 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001454 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001455 test -d "$ac_dir" ||
1456 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1457 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 ac_builddir=.
1459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460case "$ac_dir" in
1461.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1462*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001463 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001464 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001465 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001466 case $ac_top_builddir_sub in
1467 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1468 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1469 esac ;;
1470esac
1471ac_abs_top_builddir=$ac_pwd
1472ac_abs_builddir=$ac_pwd$ac_dir_suffix
1473# for backward compatibility:
1474ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001475
1476case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479 ac_top_srcdir=$ac_top_builddir_sub
1480 ac_abs_top_srcdir=$ac_pwd ;;
1481 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483 ac_top_srcdir=$srcdir
1484 ac_abs_top_srcdir=$srcdir ;;
1485 *) # Relative name.
1486 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1487 ac_top_srcdir=$ac_top_build_prefix$srcdir
1488 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001489esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001490ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492 cd "$ac_dir" || { ac_status=$?; continue; }
1493 # Check for guested configure.
1494 if test -f "$ac_srcdir/configure.gnu"; then
1495 echo &&
1496 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1497 elif test -f "$ac_srcdir/configure"; then
1498 echo &&
1499 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001500 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001501 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502 fi || ac_status=$?
1503 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001504 done
1505fi
1506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001507test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001508if $ac_init_version; then
1509 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001510python configure 3.2
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001511generated by GNU Autoconf 2.67
Martin v. Löwis11437992002-04-12 09:54:03 +00001512
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001513Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514This configure script is free software; the Free Software Foundation
1515gives unlimited permission to copy, distribute and modify it.
1516_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001519
1520## ------------------------ ##
1521## Autoconf initialization. ##
1522## ------------------------ ##
1523
1524# ac_fn_c_try_compile LINENO
1525# --------------------------
1526# Try to compile conftest.$ac_ext, and return whether this succeeded.
1527ac_fn_c_try_compile ()
1528{
1529 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1530 rm -f conftest.$ac_objext
1531 if { { ac_try="$ac_compile"
1532case "(($ac_try" in
1533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1534 *) ac_try_echo=$ac_try;;
1535esac
1536eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1537$as_echo "$ac_try_echo"; } >&5
1538 (eval "$ac_compile") 2>conftest.err
1539 ac_status=$?
1540 if test -s conftest.err; then
1541 grep -v '^ *+' conftest.err >conftest.er1
1542 cat conftest.er1 >&5
1543 mv -f conftest.er1 conftest.err
1544 fi
1545 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1546 test $ac_status = 0; } && {
1547 test -z "$ac_c_werror_flag" ||
1548 test ! -s conftest.err
1549 } && test -s conftest.$ac_objext; then :
1550 ac_retval=0
1551else
1552 $as_echo "$as_me: failed program was:" >&5
1553sed 's/^/| /' conftest.$ac_ext >&5
1554
1555 ac_retval=1
1556fi
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001557 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001558 as_fn_set_status $ac_retval
1559
1560} # ac_fn_c_try_compile
1561
1562# ac_fn_c_try_cpp LINENO
1563# ----------------------
1564# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1565ac_fn_c_try_cpp ()
1566{
1567 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1568 if { { ac_try="$ac_cpp conftest.$ac_ext"
1569case "(($ac_try" in
1570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1571 *) ac_try_echo=$ac_try;;
1572esac
1573eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1574$as_echo "$ac_try_echo"; } >&5
1575 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1576 ac_status=$?
1577 if test -s conftest.err; then
1578 grep -v '^ *+' conftest.err >conftest.er1
1579 cat conftest.er1 >&5
1580 mv -f conftest.er1 conftest.err
1581 fi
1582 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001583 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1585 test ! -s conftest.err
1586 }; then :
1587 ac_retval=0
1588else
1589 $as_echo "$as_me: failed program was:" >&5
1590sed 's/^/| /' conftest.$ac_ext >&5
1591
1592 ac_retval=1
1593fi
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001594 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001595 as_fn_set_status $ac_retval
1596
1597} # ac_fn_c_try_cpp
1598
1599# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1600# -------------------------------------------------------
1601# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1602# the include files in INCLUDES and setting the cache variable VAR
1603# accordingly.
1604ac_fn_c_check_header_mongrel ()
1605{
1606 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001607 if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1609$as_echo_n "checking for $2... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001610if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001611 $as_echo_n "(cached) " >&6
1612fi
1613eval ac_res=\$$3
1614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1615$as_echo "$ac_res" >&6; }
1616else
1617 # Is the header compilable?
1618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1619$as_echo_n "checking $2 usability... " >&6; }
1620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1621/* end confdefs.h. */
1622$4
1623#include <$2>
1624_ACEOF
1625if ac_fn_c_try_compile "$LINENO"; then :
1626 ac_header_compiler=yes
1627else
1628 ac_header_compiler=no
1629fi
1630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1632$as_echo "$ac_header_compiler" >&6; }
1633
1634# Is the header present?
1635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1636$as_echo_n "checking $2 presence... " >&6; }
1637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1638/* end confdefs.h. */
1639#include <$2>
1640_ACEOF
1641if ac_fn_c_try_cpp "$LINENO"; then :
1642 ac_header_preproc=yes
1643else
1644 ac_header_preproc=no
1645fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001646rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1648$as_echo "$ac_header_preproc" >&6; }
1649
1650# So? What about this header?
1651case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1652 yes:no: )
1653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1654$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1656$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1657 ;;
1658 no:yes:* )
1659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1660$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1662$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1663 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1664$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1666$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1667 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1668$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001669( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001670## Report this to http://bugs.python.org/ ##
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001671## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001672 ) | sed "s/^/$as_me: WARNING: /" >&2
1673 ;;
1674esac
1675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1676$as_echo_n "checking for $2... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001677if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001678 $as_echo_n "(cached) " >&6
1679else
1680 eval "$3=\$ac_header_compiler"
1681fi
1682eval ac_res=\$$3
1683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1684$as_echo "$ac_res" >&6; }
1685fi
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001686 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001687
1688} # ac_fn_c_check_header_mongrel
1689
1690# ac_fn_c_try_run LINENO
1691# ----------------------
1692# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1693# that executables *can* be run.
1694ac_fn_c_try_run ()
1695{
1696 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1697 if { { ac_try="$ac_link"
1698case "(($ac_try" in
1699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1700 *) ac_try_echo=$ac_try;;
1701esac
1702eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1703$as_echo "$ac_try_echo"; } >&5
1704 (eval "$ac_link") 2>&5
1705 ac_status=$?
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1708 { { case "(($ac_try" in
1709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1710 *) ac_try_echo=$ac_try;;
1711esac
1712eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1713$as_echo "$ac_try_echo"; } >&5
1714 (eval "$ac_try") 2>&5
1715 ac_status=$?
1716 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1717 test $ac_status = 0; }; }; then :
1718 ac_retval=0
1719else
1720 $as_echo "$as_me: program exited with status $ac_status" >&5
1721 $as_echo "$as_me: failed program was:" >&5
1722sed 's/^/| /' conftest.$ac_ext >&5
1723
1724 ac_retval=$ac_status
1725fi
1726 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001727 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001728 as_fn_set_status $ac_retval
1729
1730} # ac_fn_c_try_run
1731
1732# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1733# -------------------------------------------------------
1734# Tests whether HEADER exists and can be compiled using the include files in
1735# INCLUDES, setting the cache variable VAR accordingly.
1736ac_fn_c_check_header_compile ()
1737{
1738 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1740$as_echo_n "checking for $2... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001741if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001742 $as_echo_n "(cached) " >&6
1743else
1744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1745/* end confdefs.h. */
1746$4
1747#include <$2>
1748_ACEOF
1749if ac_fn_c_try_compile "$LINENO"; then :
1750 eval "$3=yes"
1751else
1752 eval "$3=no"
1753fi
1754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1755fi
1756eval ac_res=\$$3
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1758$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001759 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001760
1761} # ac_fn_c_check_header_compile
1762
1763# ac_fn_c_try_link LINENO
1764# -----------------------
1765# Try to link conftest.$ac_ext, and return whether this succeeded.
1766ac_fn_c_try_link ()
1767{
1768 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1769 rm -f conftest.$ac_objext conftest$ac_exeext
1770 if { { ac_try="$ac_link"
1771case "(($ac_try" in
1772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1773 *) ac_try_echo=$ac_try;;
1774esac
1775eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1776$as_echo "$ac_try_echo"; } >&5
1777 (eval "$ac_link") 2>conftest.err
1778 ac_status=$?
1779 if test -s conftest.err; then
1780 grep -v '^ *+' conftest.err >conftest.er1
1781 cat conftest.er1 >&5
1782 mv -f conftest.er1 conftest.err
1783 fi
1784 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1785 test $ac_status = 0; } && {
1786 test -z "$ac_c_werror_flag" ||
1787 test ! -s conftest.err
1788 } && test -s conftest$ac_exeext && {
1789 test "$cross_compiling" = yes ||
1790 $as_test_x conftest$ac_exeext
1791 }; then :
1792 ac_retval=0
1793else
1794 $as_echo "$as_me: failed program was:" >&5
1795sed 's/^/| /' conftest.$ac_ext >&5
1796
1797 ac_retval=1
1798fi
1799 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1800 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1801 # interfere with the next link command; also delete a directory that is
1802 # left behind by Apple's compiler. We do this before executing the actions.
1803 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001804 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001805 as_fn_set_status $ac_retval
1806
1807} # ac_fn_c_try_link
1808
1809# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1810# -------------------------------------------
1811# Tests whether TYPE exists after having included INCLUDES, setting cache
1812# variable VAR accordingly.
1813ac_fn_c_check_type ()
1814{
1815 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1817$as_echo_n "checking for $2... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001818if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001819 $as_echo_n "(cached) " >&6
1820else
1821 eval "$3=no"
1822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1823/* end confdefs.h. */
1824$4
1825int
1826main ()
1827{
1828if (sizeof ($2))
1829 return 0;
1830 ;
1831 return 0;
1832}
1833_ACEOF
1834if ac_fn_c_try_compile "$LINENO"; then :
1835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1836/* end confdefs.h. */
1837$4
1838int
1839main ()
1840{
1841if (sizeof (($2)))
1842 return 0;
1843 ;
1844 return 0;
1845}
1846_ACEOF
1847if ac_fn_c_try_compile "$LINENO"; then :
1848
1849else
1850 eval "$3=yes"
1851fi
1852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1853fi
1854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1855fi
1856eval ac_res=\$$3
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1858$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001859 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001860
1861} # ac_fn_c_check_type
1862
1863# ac_fn_c_find_uintX_t LINENO BITS VAR
1864# ------------------------------------
1865# Finds an unsigned integer type with width BITS, setting cache variable VAR
1866# accordingly.
1867ac_fn_c_find_uintX_t ()
1868{
1869 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1871$as_echo_n "checking for uint$2_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001872if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001873 $as_echo_n "(cached) " >&6
1874else
1875 eval "$3=no"
1876 # Order is important - never check a type that is potentially smaller
1877 # than half of the expected target width.
1878 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1879 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1881/* end confdefs.h. */
1882$ac_includes_default
1883int
1884main ()
1885{
1886static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1887test_array [0] = 0
1888
1889 ;
1890 return 0;
1891}
1892_ACEOF
1893if ac_fn_c_try_compile "$LINENO"; then :
1894 case $ac_type in #(
1895 uint$2_t) :
1896 eval "$3=yes" ;; #(
1897 *) :
1898 eval "$3=\$ac_type" ;;
1899esac
1900fi
1901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001902 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001903
1904else
1905 break
1906fi
1907 done
1908fi
1909eval ac_res=\$$3
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1911$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001912 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001913
1914} # ac_fn_c_find_uintX_t
1915
1916# ac_fn_c_find_intX_t LINENO BITS VAR
1917# -----------------------------------
1918# Finds a signed integer type with width BITS, setting cache variable VAR
1919# accordingly.
1920ac_fn_c_find_intX_t ()
1921{
1922 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1924$as_echo_n "checking for int$2_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001925if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001926 $as_echo_n "(cached) " >&6
1927else
1928 eval "$3=no"
1929 # Order is important - never check a type that is potentially smaller
1930 # than half of the expected target width.
1931 for ac_type in int$2_t 'int' 'long int' \
1932 'long long int' 'short int' 'signed char'; do
1933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1934/* end confdefs.h. */
1935$ac_includes_default
Barry Warsaw278266f2010-10-14 17:38:46 +00001936 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001937int
1938main ()
1939{
Barry Warsaw278266f2010-10-14 17:38:46 +00001940static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001941test_array [0] = 0
1942
1943 ;
1944 return 0;
1945}
1946_ACEOF
1947if ac_fn_c_try_compile "$LINENO"; then :
1948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1949/* end confdefs.h. */
1950$ac_includes_default
Barry Warsaw278266f2010-10-14 17:38:46 +00001951 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001952int
1953main ()
1954{
Barry Warsaw278266f2010-10-14 17:38:46 +00001955static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001956 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1957test_array [0] = 0
1958
1959 ;
1960 return 0;
1961}
1962_ACEOF
1963if ac_fn_c_try_compile "$LINENO"; then :
1964
1965else
1966 case $ac_type in #(
1967 int$2_t) :
1968 eval "$3=yes" ;; #(
1969 *) :
1970 eval "$3=\$ac_type" ;;
1971esac
1972fi
1973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001976 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001977
1978else
1979 break
1980fi
1981 done
1982fi
1983eval ac_res=\$$3
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1985$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001986 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001987
1988} # ac_fn_c_find_intX_t
1989
1990# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1991# --------------------------------------------
1992# Tries to find the compile-time value of EXPR in a program that includes
1993# INCLUDES, setting VAR accordingly. Returns whether the value could be
1994# computed
1995ac_fn_c_compute_int ()
1996{
1997 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1998 if test "$cross_compiling" = yes; then
1999 # Depending upon the size, compute the lo and hi bounds.
2000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2001/* end confdefs.h. */
2002$4
2003int
2004main ()
2005{
2006static int test_array [1 - 2 * !(($2) >= 0)];
2007test_array [0] = 0
2008
2009 ;
2010 return 0;
2011}
2012_ACEOF
2013if ac_fn_c_try_compile "$LINENO"; then :
2014 ac_lo=0 ac_mid=0
2015 while :; do
2016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017/* end confdefs.h. */
2018$4
2019int
2020main ()
2021{
2022static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2023test_array [0] = 0
2024
2025 ;
2026 return 0;
2027}
2028_ACEOF
2029if ac_fn_c_try_compile "$LINENO"; then :
2030 ac_hi=$ac_mid; break
2031else
2032 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2033 if test $ac_lo -le $ac_mid; then
2034 ac_lo= ac_hi=
2035 break
2036 fi
2037 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2038fi
2039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2040 done
2041else
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043/* end confdefs.h. */
2044$4
2045int
2046main ()
2047{
2048static int test_array [1 - 2 * !(($2) < 0)];
2049test_array [0] = 0
2050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 ac_hi=-1 ac_mid=-1
2057 while :; do
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2065test_array [0] = 0
2066
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_lo=$ac_mid; break
2073else
2074 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2075 if test $ac_mid -le $ac_hi; then
2076 ac_lo= ac_hi=
2077 break
2078 fi
2079 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2080fi
2081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2082 done
2083else
2084 ac_lo= ac_hi=
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089# Binary search between lo and hi bounds.
2090while test "x$ac_lo" != "x$ac_hi"; do
2091 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h. */
2094$4
2095int
2096main ()
2097{
2098static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2099test_array [0] = 0
2100
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_hi=$ac_mid
2107else
2108 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2109fi
2110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2111done
2112case $ac_lo in #((
2113?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2114'') ac_retval=1 ;;
2115esac
2116 else
2117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2118/* end confdefs.h. */
2119$4
2120static long int longval () { return $2; }
2121static unsigned long int ulongval () { return $2; }
2122#include <stdio.h>
2123#include <stdlib.h>
2124int
2125main ()
2126{
2127
2128 FILE *f = fopen ("conftest.val", "w");
2129 if (! f)
2130 return 1;
2131 if (($2) < 0)
2132 {
2133 long int i = longval ();
2134 if (i != ($2))
2135 return 1;
2136 fprintf (f, "%ld", i);
2137 }
2138 else
2139 {
2140 unsigned long int i = ulongval ();
2141 if (i != ($2))
2142 return 1;
2143 fprintf (f, "%lu", i);
2144 }
2145 /* Do not output a trailing newline, as this causes \r\n confusion
2146 on some platforms. */
2147 return ferror (f) || fclose (f) != 0;
2148
2149 ;
2150 return 0;
2151}
2152_ACEOF
2153if ac_fn_c_try_run "$LINENO"; then :
2154 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2155else
2156 ac_retval=1
2157fi
2158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2159 conftest.$ac_objext conftest.beam conftest.$ac_ext
2160rm -f conftest.val
2161
2162 fi
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002163 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002164 as_fn_set_status $ac_retval
2165
2166} # ac_fn_c_compute_int
2167
2168# ac_fn_c_check_func LINENO FUNC VAR
2169# ----------------------------------
2170# Tests whether FUNC exists, setting the cache variable VAR accordingly
2171ac_fn_c_check_func ()
2172{
2173 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2175$as_echo_n "checking for $2... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002176if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002177 $as_echo_n "(cached) " >&6
2178else
2179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2180/* end confdefs.h. */
2181/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2182 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2183#define $2 innocuous_$2
2184
2185/* System header to define __stub macros and hopefully few prototypes,
2186 which can conflict with char $2 (); below.
2187 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2188 <limits.h> exists even on freestanding compilers. */
2189
2190#ifdef __STDC__
2191# include <limits.h>
2192#else
2193# include <assert.h>
2194#endif
2195
2196#undef $2
2197
2198/* Override any GCC internal prototype to avoid an error.
2199 Use char because int might match the return type of a GCC
2200 builtin and then its argument prototype would still apply. */
2201#ifdef __cplusplus
2202extern "C"
2203#endif
2204char $2 ();
2205/* The GNU C library defines this for functions which it implements
2206 to always fail with ENOSYS. Some functions are actually named
2207 something starting with __ and the normal name is an alias. */
2208#if defined __stub_$2 || defined __stub___$2
2209choke me
2210#endif
2211
2212int
2213main ()
2214{
2215return $2 ();
2216 ;
2217 return 0;
2218}
2219_ACEOF
2220if ac_fn_c_try_link "$LINENO"; then :
2221 eval "$3=yes"
2222else
2223 eval "$3=no"
2224fi
2225rm -f core conftest.err conftest.$ac_objext \
2226 conftest$ac_exeext conftest.$ac_ext
2227fi
2228eval ac_res=\$$3
2229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2230$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002231 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002232
2233} # ac_fn_c_check_func
2234
2235# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2236# ----------------------------------------------------
2237# Tries to find if the field MEMBER exists in type AGGR, after including
2238# INCLUDES, setting cache variable VAR accordingly.
2239ac_fn_c_check_member ()
2240{
2241 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2243$as_echo_n "checking for $2.$3... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002244if eval "test \"\${$4+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002245 $as_echo_n "(cached) " >&6
2246else
2247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248/* end confdefs.h. */
2249$5
2250int
2251main ()
2252{
2253static $2 ac_aggr;
2254if (ac_aggr.$3)
2255return 0;
2256 ;
2257 return 0;
2258}
2259_ACEOF
2260if ac_fn_c_try_compile "$LINENO"; then :
2261 eval "$4=yes"
2262else
2263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264/* end confdefs.h. */
2265$5
2266int
2267main ()
2268{
2269static $2 ac_aggr;
2270if (sizeof ac_aggr.$3)
2271return 0;
2272 ;
2273 return 0;
2274}
2275_ACEOF
2276if ac_fn_c_try_compile "$LINENO"; then :
2277 eval "$4=yes"
2278else
2279 eval "$4=no"
2280fi
2281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284fi
2285eval ac_res=\$$4
2286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2287$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002288 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002289
2290} # ac_fn_c_check_member
2291
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002292# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2293# ---------------------------------------------
2294# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2295# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002296ac_fn_c_check_decl ()
2297{
2298 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002299 as_decl_name=`echo $2|sed 's/ *(.*//'`
2300 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2302$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002303if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002304 $as_echo_n "(cached) " >&6
2305else
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h. */
2308$4
2309int
2310main ()
2311{
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002312#ifndef $as_decl_name
2313#ifdef __cplusplus
2314 (void) $as_decl_use;
2315#else
2316 (void) $as_decl_name;
2317#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002318#endif
2319
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_compile "$LINENO"; then :
2325 eval "$3=yes"
2326else
2327 eval "$3=no"
2328fi
2329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330fi
2331eval ac_res=\$$3
2332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2333$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002334 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002335
2336} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002337cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002338This file contains any messages produced by compilers while
2339running configure, to aid debugging if configure makes a mistake.
2340
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002341It was created by python $as_me 3.2, which was
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002342generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002343
2344 $ $0 $@
2345
2346_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002347exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002348{
2349cat <<_ASUNAME
2350## --------- ##
2351## Platform. ##
2352## --------- ##
2353
2354hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2355uname -m = `(uname -m) 2>/dev/null || echo unknown`
2356uname -r = `(uname -r) 2>/dev/null || echo unknown`
2357uname -s = `(uname -s) 2>/dev/null || echo unknown`
2358uname -v = `(uname -v) 2>/dev/null || echo unknown`
2359
2360/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2361/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2362
2363/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2364/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2365/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002366/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002367/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2368/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2369/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2370
2371_ASUNAME
2372
2373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2374for as_dir in $PATH
2375do
2376 IFS=$as_save_IFS
2377 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002378 $as_echo "PATH: $as_dir"
2379 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002380IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002381
2382} >&5
2383
2384cat >&5 <<_ACEOF
2385
2386
2387## ----------- ##
2388## Core tests. ##
2389## ----------- ##
2390
2391_ACEOF
2392
2393
2394# Keep a trace of the command line.
2395# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002396# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002397# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002398# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002399ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002400ac_configure_args0=
2401ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002402ac_must_keep_next=false
2403for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002404do
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 for ac_arg
2406 do
2407 case $ac_arg in
2408 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2409 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2410 | -silent | --silent | --silen | --sile | --sil)
2411 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002412 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 esac
2415 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002418 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002420 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002422 case $ac_arg in
2423 *=* | --config-cache | -C | -disable-* | --disable-* \
2424 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2425 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2426 | -with-* | --with-* | -without-* | --without-* | --x)
2427 case "$ac_configure_args0 " in
2428 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2429 esac
2430 ;;
2431 -* ) ac_must_keep_next=true ;;
2432 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002434 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 ;;
2436 esac
2437 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002438done
Matthias Kloseb9621712010-04-24 17:59:49 +00002439{ ac_configure_args0=; unset ac_configure_args0;}
2440{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002441
2442# When interrupted or exit'd, cleanup temporary files, and complete
2443# config.log. We remove comments because anyway the quotes in there
2444# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445# WARNING: Use '\'' to represent an apostrophe within the trap.
2446# 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 +00002447trap 'exit_status=$?
2448 # Save into config.log some information that might help in debugging.
2449 {
2450 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002451
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002452 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002453## Cache variables. ##
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002454## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002455 echo
2456 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457(
2458 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2459 eval ac_val=\$$ac_var
2460 case $ac_val in #(
2461 *${as_nl}*)
2462 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2464$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 esac
2466 case $ac_var in #(
2467 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002468 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2469 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470 esac ;;
2471 esac
2472 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2475 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 "s/'\''/'\''\\\\'\'''\''/g;
2478 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2479 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002480 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002482 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 esac |
2484 sort
2485)
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002487
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002488 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002489## Output variables. ##
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002490## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 echo
2492 for ac_var in $ac_subst_vars
2493 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 eval ac_val=\$$ac_var
2495 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 done | sort
2500 echo
2501
2502 if test -n "$ac_subst_files"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002503 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504## File substitutions. ##
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002505## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 echo
2507 for ac_var in $ac_subst_files
2508 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 eval ac_val=\$$ac_var
2510 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 done | sort
2515 echo
2516 fi
2517
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 if test -s confdefs.h; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002519 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002520## confdefs.h. ##
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002521## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 echo
2525 fi
2526 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 $as_echo "$as_me: caught signal $ac_signal"
2528 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 rm -f core *.core core.conftest.* &&
2531 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002534for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002535 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002536done
2537ac_signal=0
2538
2539# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002541
Matthias Kloseb9621712010-04-24 17:59:49 +00002542$as_echo "/* confdefs.h */" > confdefs.h
2543
Martin v. Löwis11437992002-04-12 09:54:03 +00002544# Predefined preprocessor variables.
2545
2546cat >>confdefs.h <<_ACEOF
2547#define PACKAGE_NAME "$PACKAGE_NAME"
2548_ACEOF
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_VERSION "$PACKAGE_VERSION"
2556_ACEOF
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_STRING "$PACKAGE_STRING"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2564_ACEOF
2565
Matthias Kloseb9621712010-04-24 17:59:49 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_URL "$PACKAGE_URL"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570
2571# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002572# Prefer an explicitly selected file to automatically selected ones.
2573ac_site_file1=NONE
2574ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575if test -n "$CONFIG_SITE"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002576 # We do not want a PATH search for config.site.
2577 case $CONFIG_SITE in #((
2578 -*) ac_site_file1=./$CONFIG_SITE;;
2579 */*) ac_site_file1=$CONFIG_SITE;;
2580 *) ac_site_file1=./$CONFIG_SITE;;
2581 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 ac_site_file1=$prefix/share/config.site
2584 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585else
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 ac_site_file1=$ac_default_prefix/share/config.site
2587 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002589for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590do
Matthias Kloseb9621712010-04-24 17:59:49 +00002591 test "x$ac_site_file" = xNONE && continue
2592 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2593 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2594$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 sed 's/^/| /' "$ac_site_file" >&5
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002596 . "$ac_site_file" \
2597 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2598$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2599as_fn_error $? "failed to load site script $ac_site_file
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002600See \`config.log' for more details" "$LINENO" 5 ; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601 fi
2602done
2603
2604if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002605 # Some versions of bash will fail to source /dev/null (special files
2606 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2607 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2608 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2609$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2612 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 esac
2614 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002615else
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2617$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 >$cache_file
2619fi
2620
2621# Check that the precious variables saved in the cache have kept the same
2622# value.
2623ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2626 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2628 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 case $ac_old_set,$ac_new_set in
2630 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2632$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 +00002633 ac_cache_corrupted=: ;;
2634 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2636$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 ac_cache_corrupted=: ;;
2638 ,);;
2639 *)
2640 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002641 # differences in whitespace do not lead to failure.
2642 ac_old_val_w=`echo x $ac_old_val`
2643 ac_new_val_w=`echo x $ac_new_val`
2644 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2646$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2647 ac_cache_corrupted=:
2648 else
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2650$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2651 eval $ac_var=\$ac_old_val
2652 fi
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2654$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2656$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 fi;;
2658 esac
2659 # Pass precious variables to config.status.
2660 if test "$ac_new_set" = set; then
2661 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 *) ac_arg=$ac_var=$ac_new_val ;;
2664 esac
2665 case " $ac_configure_args " in
2666 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 esac
2669 fi
2670done
2671if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2675$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002676 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002678## -------------------- ##
2679## Main body of script. ##
2680## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002681
Guido van Rossum7f43da71994-08-01 12:15:30 +00002682ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2686ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687
Guido van Rossum627b2d71993-12-24 10:39:16 +00002688
Michael W. Hudson54241132001-12-07 15:38:26 +00002689
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002690ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002691
2692
Martin v. Löwis11437992002-04-12 09:54:03 +00002693
Benjamin Petersond23f8222009-04-05 19:13:16 +00002694if test "$prefix" != "/"; then
2695 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2696fi
2697
2698
Martin v. Löwis11437992002-04-12 09:54:03 +00002699
2700
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002701# We don't use PACKAGE_ variables, and they cause conflicts
2702# with other autoconf-based packages that include Python.h
2703grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2704rm confdefs.h
2705mv confdefs.h.new confdefs.h
2706
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002707
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002708VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002709
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002710# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002711
2712SOVERSION=1.0
2713
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002714# The later defininition of _XOPEN_SOURCE disables certain features
2715# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2716
Matthias Kloseb9621712010-04-24 17:59:49 +00002717$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002718
2719
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002720# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2721# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2722# them.
2723
Matthias Kloseb9621712010-04-24 17:59:49 +00002724$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002725
2726
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002727# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2728# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2729# them.
2730
Matthias Kloseb9621712010-04-24 17:59:49 +00002731$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002732
2733
Martin v. Löwisd6320502004-08-12 13:45:08 +00002734# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2735# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2736
Matthias Kloseb9621712010-04-24 17:59:49 +00002737$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002738
2739
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002740# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2741# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2742# them.
2743
Matthias Kloseb9621712010-04-24 17:59:49 +00002744$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002745
2746
2747
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002748define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002749
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002750# Arguments passed to configure.
2751
2752CONFIG_ARGS="$ac_configure_args"
2753
Matthias Kloseb9621712010-04-24 17:59:49 +00002754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2755$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002756# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002757if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002758 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002759 case $enableval in
2760 yes)
2761 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002762 if test ! -d "${enableval}"
2763 then
2764 enableval=/
2765 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002766 ;;
2767 esac
2768 case $enableval in
2769 no)
2770 UNIVERSALSDK=
2771 enable_universalsdk=
2772 ;;
2773 *)
2774 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002775 if test ! -d "${UNIVERSALSDK}"
2776 then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002777 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002778 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002779 ;;
2780 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002781
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002782
Thomas Wouters477c8d52006-05-27 19:21:47 +00002783else
2784
2785 UNIVERSALSDK=
2786 enable_universalsdk=
2787
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002788fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002789
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002790if test -n "${UNIVERSALSDK}"
2791then
Matthias Kloseb9621712010-04-24 17:59:49 +00002792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2793$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002794else
Matthias Kloseb9621712010-04-24 17:59:49 +00002795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2796$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002797fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002799
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002800
2801
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002802UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002803
Matthias Kloseb9621712010-04-24 17:59:49 +00002804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2805$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002806
2807# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002808if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002809 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2811$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002812 UNIVERSAL_ARCHS="$withval"
2813
2814else
2815
Matthias Kloseb9621712010-04-24 17:59:49 +00002816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2817$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002818
2819fi
2820
2821
2822
2823
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002824
2825# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002826if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002827 withval=$with_framework_name;
2828 PYTHONFRAMEWORK=${withval}
2829 PYTHONFRAMEWORKDIR=${withval}.framework
2830 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2831
2832else
2833
2834 PYTHONFRAMEWORK=Python
2835 PYTHONFRAMEWORKDIR=Python.framework
2836 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2837
2838fi
2839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002840# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002841if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002842 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002843 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002844 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002845 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002846 esac
2847 case $enableval in
2848 no)
2849 PYTHONFRAMEWORK=
2850 PYTHONFRAMEWORKDIR=no-framework
2851 PYTHONFRAMEWORKPREFIX=
2852 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002853 FRAMEWORKINSTALLFIRST=
2854 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002855 FRAMEWORKALTINSTALLFIRST=
2856 FRAMEWORKALTINSTALLLAST=
2857 if test "x${prefix}" = "xNONE"; then
2858 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2859 else
2860 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2861 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002862 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002863 ;;
2864 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002865 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002866 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002867 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002868 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002869 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2870 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002871 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002872
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002873 if test "x${prefix}" = "xNONE" ; then
2874 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002875
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002876 else
2877 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2878 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002879
2880 case "${enableval}" in
2881 /System*)
2882 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2883 if test "${prefix}" = "NONE" ; then
2884 # See below
2885 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2886 fi
2887 ;;
2888
2889 /Library*)
2890 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2891 ;;
2892
2893 */Library/Frameworks)
2894 MDIR="`dirname "${enableval}"`"
2895 MDIR="`dirname "${MDIR}"`"
2896 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2897
2898 if test "${prefix}" = "NONE"; then
2899 # User hasn't specified the
2900 # --prefix option, but wants to install
2901 # the framework in a non-default location,
2902 # ensure that the compatibility links get
2903 # installed relative to that prefix as well
2904 # instead of in /usr/local.
2905 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2906 fi
2907 ;;
2908
2909 *)
2910 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2911 ;;
2912 esac
2913
Jack Jansen127e56e2001-09-11 14:41:54 +00002914 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002915
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002916 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002917 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002918 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002920 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002921
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002922 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2923
2924 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2925
Jack Jansene578a632001-08-15 01:27:14 +00002926 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002927
Guido van Rossum563e7081996-09-10 18:20:48 +00002928else
Martin v. Löwis11437992002-04-12 09:54:03 +00002929
Jack Jansene578a632001-08-15 01:27:14 +00002930 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002931 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002932 PYTHONFRAMEWORKPREFIX=
2933 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002934 FRAMEWORKINSTALLFIRST=
2935 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002936 FRAMEWORKALTINSTALLFIRST=
2937 FRAMEWORKALTINSTALLLAST=
2938 if test "x${prefix}" = "xNONE" ; then
2939 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2940 else
2941 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2942 fi
Jack Jansene578a632001-08-15 01:27:14 +00002943 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002944
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002946fi
2947
Thomas Wouters477c8d52006-05-27 19:21:47 +00002948
2949
Michael W. Hudson54241132001-12-07 15:38:26 +00002950
2951
2952
2953
Jack Jansene578a632001-08-15 01:27:14 +00002954
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002955
2956
2957
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002958
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002959
Jack Jansene578a632001-08-15 01:27:14 +00002960##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002961## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002962## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002963##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002964# Set name for machine-dependent library files
2965
Matthias Kloseb9621712010-04-24 17:59:49 +00002966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2967$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002968if test -z "$MACHDEP"
2969then
Guido van Rossum563e7081996-09-10 18:20:48 +00002970 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002971 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002972 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002973 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002974 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002975 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002976 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002977 ac_md_system=`echo $ac_sys_system |
2978 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2979 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002980 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002981 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002982
Guido van Rossum07397971997-04-29 21:49:50 +00002983 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002984 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002985 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002986 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002987 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002988 esac
2989fi
Guido van Rossum91922671997-10-09 20:24:13 +00002990
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002991# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2992# disable features if it is defined, without any means to access these
2993# features as extensions. For these systems, we skip the definition of
2994# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2995# some feature, make sure there is no alternative way to access this
2996# feature. Also, when using wildcards, make sure you have verified the
2997# need for not defining _XOPEN_SOURCE on all systems matching the
2998# wildcard, and that the wildcard does not include future systems
2999# (which may remove their limitations).
3000case $ac_sys_system/$ac_sys_release in
3001 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3002 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003003 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003004 # In addition, Stefan Krah confirms that issue #1244610 exists through
3005 # OpenBSD 4.6, but is fixed in 4.7.
3006 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003007 define_xopen_source=no
3008 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3009 # also defined. This can be overridden by defining _BSD_SOURCE
3010 # As this has a different meaning on Linux, only define it on OpenBSD
3011
Matthias Kloseb9621712010-04-24 17:59:49 +00003012$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003013
3014 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003015 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003016 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3017 # also defined. This can be overridden by defining _BSD_SOURCE
3018 # As this has a different meaning on Linux, only define it on OpenBSD
3019
Matthias Kloseb9621712010-04-24 17:59:49 +00003020$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003021
3022 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003023 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3024 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3025 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003026 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 +00003027 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003028 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3029 # request to enable features supported by the standard as a request
3030 # to disable features not supported by the standard. The best way
3031 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3032 # entirely and define __EXTENSIONS__ instead.
3033 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003034 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003035 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3036 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003037 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003038 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003039 define_xopen_source=no;;
3040 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003041 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003042 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003043 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003044 # On FreeBSD 4, the math functions C89 does not cover are never defined
3045 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3046 FreeBSD/4.*)
3047 define_xopen_source=no;;
3048 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3049 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3050 # identifies itself as Darwin/7.*
3051 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3052 # disables platform specific features beyond repair.
3053 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3054 # has no effect, don't bother defining them
3055 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003056 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003057 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003058 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003059 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3060 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3061 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003062 AIX/4)
3063 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003064 AIX/5)
3065 if test `uname -r` -eq 1; then
3066 define_xopen_source=no
3067 fi
3068 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003069 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3070 # defining NI_NUMERICHOST.
3071 QNX/6.3.2)
3072 define_xopen_source=no
3073 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003074
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003075esac
3076
3077if test $define_xopen_source = yes
3078then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003079
Matthias Kloseb9621712010-04-24 17:59:49 +00003080$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003081
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003082
3083 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3084 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3085 # several APIs are not declared. Since this is also needed in some
3086 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003087
Matthias Kloseb9621712010-04-24 17:59:49 +00003088$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003089
3090
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003091
Matthias Kloseb9621712010-04-24 17:59:49 +00003092$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003093
3094
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003095fi
3096
Guido van Rossum91922671997-10-09 20:24:13 +00003097#
3098# SGI compilers allow the specification of the both the ABI and the
3099# ISA on the command line. Depending on the values of these switches,
3100# different and often incompatable code will be generated.
3101#
3102# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3103# thus supply support for various ABI/ISA combinations. The MACHDEP
3104# variable is also adjusted.
3105#
3106
3107if test ! -z "$SGI_ABI"
3108then
3109 CC="cc $SGI_ABI"
3110 LDFLAGS="$SGI_ABI $LDFLAGS"
3111 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3114$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003115
Jack Jansen6b08a402004-06-03 12:41:45 +00003116# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3117# it may influence the way we can build extensions, so distutils
3118# needs to check it
3119
Thomas Wouters477c8d52006-05-27 19:21:47 +00003120
Jack Jansen6b08a402004-06-03 12:41:45 +00003121CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003122EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003123
Matthias Kloseb9621712010-04-24 17:59:49 +00003124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3125$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003126ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3128$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003129
Guido van Rossum627b2d71993-12-24 10:39:16 +00003130# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003131
3132# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3133# for debug/optimization stuff. BASECFLAGS is for flags that are required
3134# just to get things to compile and link. Users are free to override OPT
3135# when running configure or make. The build should not break if they do.
3136# BASECFLAGS should generally not be messed with, however.
3137
3138# XXX shouldn't some/most/all of this code be merged with the stuff later
3139# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3141$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003143# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003144if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003145 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003146 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003147 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003148 without_gcc=yes;;
3149 yes) CC=gcc
3150 without_gcc=no;;
3151 *) CC=$withval
3152 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003153 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003154else
Martin v. Löwis11437992002-04-12 09:54:03 +00003155
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003156 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003157 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003158 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003159 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003160 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003161fi
3162
Matthias Kloseb9621712010-04-24 17:59:49 +00003163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3164$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003165
Guido van Rossum8b131c51995-03-09 14:10:13 +00003166# If the user switches compilers, we can't believe the cache
3167if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3168then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003169 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003170(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003171fi
3172
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003173# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3174# when the compiler supports them, but we don't always want -O2, and
3175# we set -g later.
3176if test -z "$CFLAGS"; then
3177 CFLAGS=
3178fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003179ac_ext=c
3180ac_cpp='$CPP $CPPFLAGS'
3181ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3182ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3183ac_compiler_gnu=$ac_cv_c_compiler_gnu
3184if test -n "$ac_tool_prefix"; then
3185 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3186set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3188$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003189if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003190 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003191else
3192 if test -n "$CC"; then
3193 ac_cv_prog_CC="$CC" # Let the user override the test.
3194else
Martin v. Löwis11437992002-04-12 09:54:03 +00003195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3196for as_dir in $PATH
3197do
3198 IFS=$as_save_IFS
3199 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003200 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201 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 +00003202 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003203 $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 +00003204 break 2
3205 fi
3206done
Matthias Kloseb9621712010-04-24 17:59:49 +00003207 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003208IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003209
Jack Jansendd19cf82001-12-06 22:36:17 +00003210fi
3211fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003212CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003213if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3215$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003216else
Matthias Kloseb9621712010-04-24 17:59:49 +00003217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3218$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003219fi
3220
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003221
Martin v. Löwis11437992002-04-12 09:54:03 +00003222fi
3223if test -z "$ac_cv_prog_CC"; then
3224 ac_ct_CC=$CC
3225 # Extract the first word of "gcc", so it can be a program name with args.
3226set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3228$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003229if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003230 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003231else
3232 if test -n "$ac_ct_CC"; then
3233 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3234else
3235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3236for as_dir in $PATH
3237do
3238 IFS=$as_save_IFS
3239 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003240 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241 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 +00003242 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003243 $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 +00003244 break 2
3245 fi
3246done
Matthias Kloseb9621712010-04-24 17:59:49 +00003247 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003248IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003249
3250fi
3251fi
3252ac_ct_CC=$ac_cv_prog_ac_ct_CC
3253if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3255$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003256else
Matthias Kloseb9621712010-04-24 17:59:49 +00003257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3258$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003259fi
3260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003261 if test "x$ac_ct_CC" = x; then
3262 CC=""
3263 else
3264 case $cross_compiling:$ac_tool_warned in
3265yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003266{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3267$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003268ac_tool_warned=yes ;;
3269esac
3270 CC=$ac_ct_CC
3271 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003272else
3273 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003274fi
3275
Jack Jansendd19cf82001-12-06 22:36:17 +00003276if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003277 if test -n "$ac_tool_prefix"; then
3278 # 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 +00003279set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3281$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003282if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003283 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003284else
3285 if test -n "$CC"; then
3286 ac_cv_prog_CC="$CC" # Let the user override the test.
3287else
Martin v. Löwis11437992002-04-12 09:54:03 +00003288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3289for as_dir in $PATH
3290do
3291 IFS=$as_save_IFS
3292 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003293 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003294 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 +00003295 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003296 $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 +00003297 break 2
3298 fi
3299done
Matthias Kloseb9621712010-04-24 17:59:49 +00003300 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003301IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003302
3303fi
3304fi
3305CC=$ac_cv_prog_CC
3306if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3308$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003309else
Matthias Kloseb9621712010-04-24 17:59:49 +00003310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3311$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003312fi
3313
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003314
Martin v. Löwis11437992002-04-12 09:54:03 +00003315 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003316fi
3317if test -z "$CC"; then
3318 # Extract the first word of "cc", so it can be a program name with args.
3319set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3321$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003322if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003323 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003324else
3325 if test -n "$CC"; then
3326 ac_cv_prog_CC="$CC" # Let the user override the test.
3327else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003328 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003329as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3330for as_dir in $PATH
3331do
3332 IFS=$as_save_IFS
3333 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003334 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003335 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 +00003336 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3337 ac_prog_rejected=yes
3338 continue
3339 fi
3340 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003341 $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 +00003342 break 2
3343 fi
3344done
Matthias Kloseb9621712010-04-24 17:59:49 +00003345 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003346IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003347
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003348if test $ac_prog_rejected = yes; then
3349 # We found a bogon in the path, so make sure we never use it.
3350 set dummy $ac_cv_prog_CC
3351 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003352 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003353 # We chose a different compiler from the bogus one.
3354 # However, it has the same basename, so the bogon will be chosen
3355 # first if we set CC to just the basename; use the full file name.
3356 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003357 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003358 fi
3359fi
3360fi
3361fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003362CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003363if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3365$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366else
Matthias Kloseb9621712010-04-24 17:59:49 +00003367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3368$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003369fi
3370
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003371
Martin v. Löwis11437992002-04-12 09:54:03 +00003372fi
3373if test -z "$CC"; then
3374 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003375 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003376 do
3377 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3378set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3380$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003381if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003382 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003383else
3384 if test -n "$CC"; then
3385 ac_cv_prog_CC="$CC" # Let the user override the test.
3386else
Martin v. Löwis11437992002-04-12 09:54:03 +00003387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3388for as_dir in $PATH
3389do
3390 IFS=$as_save_IFS
3391 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003392 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003393 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 +00003394 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003395 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003396 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003397 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003398done
Matthias Kloseb9621712010-04-24 17:59:49 +00003399 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003400IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003401
3402fi
3403fi
3404CC=$ac_cv_prog_CC
3405if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3407$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003408else
Matthias Kloseb9621712010-04-24 17:59:49 +00003409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3410$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003411fi
3412
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003413
Martin v. Löwis11437992002-04-12 09:54:03 +00003414 test -n "$CC" && break
3415 done
3416fi
3417if test -z "$CC"; then
3418 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003419 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003420do
3421 # Extract the first word of "$ac_prog", so it can be a program name with args.
3422set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3424$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003425if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003426 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003427else
3428 if test -n "$ac_ct_CC"; then
3429 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3430else
3431as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3432for as_dir in $PATH
3433do
3434 IFS=$as_save_IFS
3435 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003436 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003437 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 +00003438 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003439 $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 +00003440 break 2
3441 fi
3442done
Matthias Kloseb9621712010-04-24 17:59:49 +00003443 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003444IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003445
Martin v. Löwis11437992002-04-12 09:54:03 +00003446fi
3447fi
3448ac_ct_CC=$ac_cv_prog_ac_ct_CC
3449if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3451$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003452else
Matthias Kloseb9621712010-04-24 17:59:49 +00003453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3454$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003455fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457
Martin v. Löwis11437992002-04-12 09:54:03 +00003458 test -n "$ac_ct_CC" && break
3459done
Michael W. Hudson54241132001-12-07 15:38:26 +00003460
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461 if test "x$ac_ct_CC" = x; then
3462 CC=""
3463 else
3464 case $cross_compiling:$ac_tool_warned in
3465yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003466{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3467$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003468ac_tool_warned=yes ;;
3469esac
3470 CC=$ac_ct_CC
3471 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003472fi
3473
3474fi
3475
3476
Matthias Kloseb9621712010-04-24 17:59:49 +00003477test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3478$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003479as_fn_error $? "no acceptable C compiler found in \$PATH
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003480See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003481
3482# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003483$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3484set X $ac_compile
3485ac_compiler=$2
3486for ac_option in --version -v -V -qversion; do
3487 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003488case "(($ac_try" in
3489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3490 *) ac_try_echo=$ac_try;;
3491esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003492eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3493$as_echo "$ac_try_echo"; } >&5
3494 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003495 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003496 if test -s conftest.err; then
3497 sed '10a\
3498... rest of stderr output deleted ...
3499 10q' conftest.err >conftest.er1
3500 cat conftest.er1 >&5
3501 fi
3502 rm -f conftest.er1 conftest.err
3503 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3504 test $ac_status = 0; }
3505done
Martin v. Löwis11437992002-04-12 09:54:03 +00003506
Matthias Kloseb9621712010-04-24 17:59:49 +00003507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003508/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510int
3511main ()
3512{
3513
3514 ;
3515 return 0;
3516}
3517_ACEOF
3518ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003519ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003520# Try to create an executable without -o first, disregard a.out.
3521# It will help us diagnose broken compilers, and finding out an intuition
3522# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3524$as_echo_n "checking whether the C compiler works... " >&6; }
3525ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3526
3527# The possible output files:
3528ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530ac_rmfiles=
3531for ac_file in $ac_files
3532do
3533 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003534 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003535 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3536 esac
3537done
3538rm -f $ac_rmfiles
3539
Matthias Kloseb9621712010-04-24 17:59:49 +00003540if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003541case "(($ac_try" in
3542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3543 *) ac_try_echo=$ac_try;;
3544esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003545eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3546$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003547 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003549 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3550 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003551 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3552# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3553# in a Makefile. We should not override ac_cv_exeext if it was cached,
3554# so that the user can short-circuit this test for compilers unknown to
3555# Autoconf.
3556for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003557do
3558 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003559 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003560 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003561 ;;
3562 [ab].out )
3563 # We found the default executable, but exeext='' is most
3564 # certainly right.
3565 break;;
3566 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568 then :; else
3569 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3570 fi
3571 # We set ac_cv_exeext here because the later test for it is not
3572 # safe: cross compilers may not add the suffix if given an `-o'
3573 # argument, so we may need to know it at that point already.
3574 # Even if this section looks crufty: it has the advantage of
3575 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003576 break;;
3577 * )
3578 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 esac
3580done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003581test "$ac_cv_exeext" = no && ac_cv_exeext=
3582
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003583else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003584 ac_file=''
3585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003586if test -z "$ac_file"; then :
3587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3588$as_echo "no" >&6; }
3589$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003590sed 's/^/| /' conftest.$ac_ext >&5
3591
Matthias Kloseb9621712010-04-24 17:59:49 +00003592{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003594as_fn_error 77 "C compiler cannot create executables
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003595See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003596else
3597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3598$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3601$as_echo_n "checking for C compiler default output file name... " >&6; }
3602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3603$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003604ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003605
Matthias Kloseb9621712010-04-24 17:59:49 +00003606rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003607ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3609$as_echo_n "checking for suffix of executables... " >&6; }
3610if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611case "(($ac_try" in
3612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3613 *) ac_try_echo=$ac_try;;
3614esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003615eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3616$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003617 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3620 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003621 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3622# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3623# work properly (i.e., refer to `conftest.exe'), while it won't with
3624# `rm'.
3625for ac_file in conftest.exe conftest conftest.*; do
3626 test -f "$ac_file" || continue
3627 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003629 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3630 break;;
3631 * ) break;;
3632 esac
3633done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003634else
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3636$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003637as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003638See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003640rm -f conftest conftest$ac_cv_exeext
3641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3642$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003643
3644rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003645EXEEXT=$ac_cv_exeext
3646ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3648/* end confdefs.h. */
3649#include <stdio.h>
3650int
3651main ()
3652{
3653FILE *f = fopen ("conftest.out", "w");
3654 return ferror (f) || fclose (f) != 0;
3655
3656 ;
3657 return 0;
3658}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003660ac_clean_files="$ac_clean_files conftest.out"
3661# Check that the compiler produces executables we can run. If not, either
3662# the compiler is broken, or we cross compile.
3663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3664$as_echo_n "checking whether we are cross compiling... " >&6; }
3665if test "$cross_compiling" != yes; then
3666 { { ac_try="$ac_link"
3667case "(($ac_try" in
3668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3669 *) ac_try_echo=$ac_try;;
3670esac
3671eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3672$as_echo "$ac_try_echo"; } >&5
3673 (eval "$ac_link") 2>&5
3674 ac_status=$?
3675 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3676 test $ac_status = 0; }
3677 if { ac_try='./conftest$ac_cv_exeext'
3678 { { case "(($ac_try" in
3679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3680 *) ac_try_echo=$ac_try;;
3681esac
3682eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3683$as_echo "$ac_try_echo"; } >&5
3684 (eval "$ac_try") 2>&5
3685 ac_status=$?
3686 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3687 test $ac_status = 0; }; }; then
3688 cross_compiling=no
3689 else
3690 if test "$cross_compiling" = maybe; then
3691 cross_compiling=yes
3692 else
3693 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3694$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003695as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003696If you meant to cross compile, use \`--host'.
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003697See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 fi
3699 fi
3700fi
3701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3702$as_echo "$cross_compiling" >&6; }
3703
3704rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3705ac_clean_files=$ac_clean_files_save
3706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3707$as_echo_n "checking for suffix of object files... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003708if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 $as_echo_n "(cached) " >&6
3710else
3711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003712/* end confdefs.h. */
3713
3714int
3715main ()
3716{
3717
3718 ;
3719 return 0;
3720}
3721_ACEOF
3722rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003723if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724case "(($ac_try" in
3725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3726 *) ac_try_echo=$ac_try;;
3727esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003728eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3729$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003730 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3733 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003734 for ac_file in conftest.o conftest.obj conftest.*; do
3735 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003738 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3739 break;;
3740 esac
3741done
3742else
Matthias Kloseb9621712010-04-24 17:59:49 +00003743 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003744sed 's/^/| /' conftest.$ac_ext >&5
3745
Matthias Kloseb9621712010-04-24 17:59:49 +00003746{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3747$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003748as_fn_error $? "cannot compute suffix of object files: cannot compile
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003749See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003750fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003751rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3754$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003755OBJEXT=$ac_cv_objext
3756ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3758$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003759if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003761else
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003764
Martin v. Löwis11437992002-04-12 09:54:03 +00003765int
3766main ()
3767{
3768#ifndef __GNUC__
3769 choke me
3770#endif
3771
3772 ;
3773 return 0;
3774}
3775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003776if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003777 ac_compiler_gnu=yes
3778else
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003782ac_cv_c_compiler_gnu=$ac_compiler_gnu
3783
3784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3786$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3787if test $ac_compiler_gnu = yes; then
3788 GCC=yes
3789else
3790 GCC=
3791fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003792ac_test_CFLAGS=${CFLAGS+set}
3793ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3795$as_echo_n "checking whether $CC accepts -g... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003796if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003798else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799 ac_save_c_werror_flag=$ac_c_werror_flag
3800 ac_c_werror_flag=yes
3801 ac_cv_prog_cc_g=no
3802 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003805
Martin v. Löwis11437992002-04-12 09:54:03 +00003806int
3807main ()
3808{
3809
3810 ;
3811 return 0;
3812}
3813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003814if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003815 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003816else
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 CFLAGS=""
3818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003819/* end confdefs.h. */
3820
3821int
3822main ()
3823{
3824
3825 ;
3826 return 0;
3827}
3828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003829if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830
Matthias Kloseb9621712010-04-24 17:59:49 +00003831else
3832 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003833 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835/* end confdefs.h. */
3836
3837int
3838main ()
3839{
3840
3841 ;
3842 return 0;
3843}
3844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003845if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3853 ac_c_werror_flag=$ac_save_c_werror_flag
3854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3856$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003857if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003858 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003859elif test $ac_cv_prog_cc_g = yes; then
3860 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003861 CFLAGS="-g -O2"
3862 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003863 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003864 fi
3865else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003866 if test "$GCC" = yes; then
3867 CFLAGS="-O2"
3868 else
3869 CFLAGS=
3870 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3873$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003874if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003875 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003876else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003877 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003878ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003880/* end confdefs.h. */
3881#include <stdarg.h>
3882#include <stdio.h>
3883#include <sys/types.h>
3884#include <sys/stat.h>
3885/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3886struct buf { int x; };
3887FILE * (*rcsopen) (struct buf *, struct stat *, int);
3888static char *e (p, i)
3889 char **p;
3890 int i;
3891{
3892 return p[i];
3893}
3894static char *f (char * (*g) (char **, int), char **p, ...)
3895{
3896 char *s;
3897 va_list v;
3898 va_start (v,p);
3899 s = g (p, va_arg (v,int));
3900 va_end (v);
3901 return s;
3902}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003903
3904/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3905 function prototypes and stuff, but not '\xHH' hex character constants.
3906 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003908 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3909 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003911int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3914 inside strings and character constants. */
3915#define FOO(x) 'x'
3916int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3917
Skip Montanaro6dead952003-09-25 14:50:04 +00003918int test (int i, double x);
3919struct s1 {int (*f) (int a);};
3920struct s2 {int (*f) (double a);};
3921int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3922int argc;
3923char **argv;
3924int
3925main ()
3926{
3927return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3928 ;
3929 return 0;
3930}
3931_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003932for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3933 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003934do
3935 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003936 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939rm -f core conftest.err conftest.$ac_objext
3940 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003941done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003943CC=$ac_save_CC
3944
3945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946# AC_CACHE_VAL
3947case "x$ac_cv_prog_cc_c89" in
3948 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3950$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3953$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003954 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3957$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003958esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003959if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003960
Matthias Kloseb9621712010-04-24 17:59:49 +00003961fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003962
Martin v. Löwis11437992002-04-12 09:54:03 +00003963ac_ext=c
3964ac_cpp='$CPP $CPPFLAGS'
3965ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3966ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3967ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003968
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003969
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003970
3971
Matthias Kloseb9621712010-04-24 17:59:49 +00003972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3973$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003974
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003976if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003977 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003978
3979 case $withval in
3980 no) with_cxx_main=no
3981 MAINCC='$(CC)';;
3982 yes) with_cxx_main=yes
3983 MAINCC='$(CXX)';;
3984 *) with_cxx_main=yes
3985 MAINCC=$withval
3986 if test -z "$CXX"
3987 then
3988 CXX=$withval
3989 fi;;
3990 esac
3991else
3992
3993 with_cxx_main=no
3994 MAINCC='$(CC)'
3995
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003996fi
3997
Matthias Kloseb9621712010-04-24 17:59:49 +00003998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3999$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004000
4001preset_cxx="$CXX"
4002if test -z "$CXX"
4003then
4004 case "$CC" in
4005 gcc) # Extract the first word of "g++", so it can be a program name with args.
4006set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4008$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004009if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004010 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004011else
4012 case $CXX in
4013 [\\/]* | ?:[\\/]*)
4014 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4015 ;;
4016 *)
4017 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4018for as_dir in notfound
4019do
4020 IFS=$as_save_IFS
4021 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004022 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004023 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 +00004024 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004026 break 2
4027 fi
4028done
Matthias Kloseb9621712010-04-24 17:59:49 +00004029 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004030IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004031
4032 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4033 ;;
4034esac
4035fi
4036CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004037if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4039$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004040else
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4042$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004044
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004045 ;;
4046 cc) # Extract the first word of "c++", so it can be a program name with args.
4047set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4049$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004050if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004051 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004052else
4053 case $CXX in
4054 [\\/]* | ?:[\\/]*)
4055 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4056 ;;
4057 *)
4058 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4059for as_dir in notfound
4060do
4061 IFS=$as_save_IFS
4062 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004064 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 +00004065 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004066 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004067 break 2
4068 fi
4069done
Matthias Kloseb9621712010-04-24 17:59:49 +00004070 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004071IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004072
4073 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4074 ;;
4075esac
4076fi
4077CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004078if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4080$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004081else
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4083$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004085
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004086 ;;
4087 esac
4088 if test "$CXX" = "notfound"
4089 then
4090 CXX=""
4091 fi
4092fi
4093if test -z "$CXX"
4094then
4095 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4096do
4097 # Extract the first word of "$ac_prog", so it can be a program name with args.
4098set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4100$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004101if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004102 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004103else
4104 if test -n "$CXX"; then
4105 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4106else
4107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4108for as_dir in $PATH
4109do
4110 IFS=$as_save_IFS
4111 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004113 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 +00004114 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004116 break 2
4117 fi
4118done
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004120IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004121
4122fi
4123fi
4124CXX=$ac_cv_prog_CXX
4125if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4127$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004128else
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4130$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004131fi
4132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004133
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004134 test -n "$CXX" && break
4135done
4136test -n "$CXX" || CXX="notfound"
4137
4138 if test "$CXX" = "notfound"
4139 then
4140 CXX=""
4141 fi
4142fi
4143if test "$preset_cxx" != "$CXX"
4144then
Matthias Kloseb9621712010-04-24 17:59:49 +00004145 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004146
4147 By default, distutils will build C++ extension modules with \"$CXX\".
4148 If this is not intended, then set CXX on the configure command line.
4149 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004150$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004151
4152 By default, distutils will build C++ extension modules with \"$CXX\".
4153 If this is not intended, then set CXX on the configure command line.
4154 " >&2;}
4155fi
4156
4157
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004158# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004159
4160ac_ext=c
4161ac_cpp='$CPP $CPPFLAGS'
4162ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4163ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4164ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4166$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004167# On Suns, sometimes $CPP names a directory.
4168if test -n "$CPP" && test -d "$CPP"; then
4169 CPP=
4170fi
4171if test -z "$CPP"; then
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004172 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004174else
Martin v. Löwis11437992002-04-12 09:54:03 +00004175 # Double quotes because CPP needs to be expanded
4176 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4177 do
4178 ac_preproc_ok=false
4179for ac_c_preproc_warn_flag in '' yes
4180do
4181 # Use a header file that comes with gcc, so configuring glibc
4182 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004183 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4184 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004185 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004186 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004188/* end confdefs.h. */
4189#ifdef __STDC__
4190# include <limits.h>
4191#else
4192# include <assert.h>
4193#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004194 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004196if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004197
Matthias Kloseb9621712010-04-24 17:59:49 +00004198else
Martin v. Löwis11437992002-04-12 09:54:03 +00004199 # Broken: fails on valid input.
4200continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004201fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004202rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004204 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004205 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004208#include <ac_nonexistent.h>
4209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004210if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004211 # Broken: success on invalid input.
4212continue
4213else
Martin v. Löwis11437992002-04-12 09:54:03 +00004214 # Passes both tests.
4215ac_preproc_ok=:
4216break
4217fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004218rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004219
4220done
4221# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004222rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004223if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004224 break
4225fi
4226
4227 done
4228 ac_cv_prog_CPP=$CPP
4229
4230fi
4231 CPP=$ac_cv_prog_CPP
4232else
4233 ac_cv_prog_CPP=$CPP
4234fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4236$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004237ac_preproc_ok=false
4238for ac_c_preproc_warn_flag in '' yes
4239do
4240 # Use a header file that comes with gcc, so configuring glibc
4241 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004242 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4243 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004244 # On the NeXT, cc -E runs the code through the compiler's parser,
4245 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004247/* end confdefs.h. */
4248#ifdef __STDC__
4249# include <limits.h>
4250#else
4251# include <assert.h>
4252#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004253 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004255if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004256
Matthias Kloseb9621712010-04-24 17:59:49 +00004257else
Martin v. Löwis11437992002-04-12 09:54:03 +00004258 # Broken: fails on valid input.
4259continue
4260fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004261rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004262
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004267#include <ac_nonexistent.h>
4268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004269if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004270 # Broken: success on invalid input.
4271continue
4272else
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 # Passes both tests.
4274ac_preproc_ok=:
4275break
4276fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004277rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004278
4279done
4280# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004281rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004282if $ac_preproc_ok; then :
4283
Martin v. Löwis11437992002-04-12 09:54:03 +00004284else
Matthias Kloseb9621712010-04-24 17:59:49 +00004285 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4286$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004287as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004288See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004289fi
4290
4291ac_ext=c
4292ac_cpp='$CPP $CPPFLAGS'
4293ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4294ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4295ac_compiler_gnu=$ac_cv_c_compiler_gnu
4296
4297
Matthias Kloseb9621712010-04-24 17:59:49 +00004298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4299$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004300if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004302else
Matthias Kloseb9621712010-04-24 17:59:49 +00004303 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004305 # Loop through the user's path and test for each of PROGNAME-LIST
4306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4308do
4309 IFS=$as_save_IFS
4310 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004311 for ac_prog in grep ggrep; do
4312 for ac_exec_ext in '' $ac_executable_extensions; do
4313 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4314 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4315# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316 # Check for GNU $ac_path_GREP
4317case `"$ac_path_GREP" --version 2>&1` in
4318*GNU*)
4319 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4320*)
4321 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004322 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323 while :
4324 do
4325 cat "conftest.in" "conftest.in" >"conftest.tmp"
4326 mv "conftest.tmp" "conftest.in"
4327 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004328 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4330 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004331 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4333 # Best one so far, save it but keep looking for a better one
4334 ac_cv_path_GREP="$ac_path_GREP"
4335 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004336 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 # 10*(2^10) chars as input seems more than enough
4338 test $ac_count -gt 10 && break
4339 done
4340 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4341esac
4342
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 $ac_path_GREP_found && break 3
4344 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004348 if test -z "$ac_cv_path_GREP"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004349 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 +00004350 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351else
4352 ac_cv_path_GREP=$GREP
4353fi
4354
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4357$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358 GREP="$ac_cv_path_GREP"
4359
4360
Matthias Kloseb9621712010-04-24 17:59:49 +00004361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4362$as_echo_n "checking for egrep... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004363if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004364 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365else
4366 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4367 then ac_cv_path_EGREP="$GREP -E"
4368 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004369 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004371 # Loop through the user's path and test for each of PROGNAME-LIST
4372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4374do
4375 IFS=$as_save_IFS
4376 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 for ac_prog in egrep; do
4378 for ac_exec_ext in '' $ac_executable_extensions; do
4379 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4380 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4381# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004382 # Check for GNU $ac_path_EGREP
4383case `"$ac_path_EGREP" --version 2>&1` in
4384*GNU*)
4385 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4386*)
4387 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004388 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389 while :
4390 do
4391 cat "conftest.in" "conftest.in" >"conftest.tmp"
4392 mv "conftest.tmp" "conftest.in"
4393 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004394 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004395 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4396 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004397 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004398 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4399 # Best one so far, save it but keep looking for a better one
4400 ac_cv_path_EGREP="$ac_path_EGREP"
4401 ac_path_EGREP_max=$ac_count
4402 fi
4403 # 10*(2^10) chars as input seems more than enough
4404 test $ac_count -gt 10 && break
4405 done
4406 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4407esac
4408
Matthias Kloseb9621712010-04-24 17:59:49 +00004409 $ac_path_EGREP_found && break 3
4410 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004411 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004412 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004413IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004414 if test -z "$ac_cv_path_EGREP"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004415 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 +00004416 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004417else
4418 ac_cv_path_EGREP=$EGREP
4419fi
4420
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421 fi
4422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4424$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004425 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004426
4427
Matthias Kloseb9621712010-04-24 17:59:49 +00004428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4429$as_echo_n "checking for ANSI C header files... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004430if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004431 $as_echo_n "(cached) " >&6
4432else
4433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004434/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004435#include <stdlib.h>
4436#include <stdarg.h>
4437#include <string.h>
4438#include <float.h>
4439
4440int
4441main ()
4442{
4443
4444 ;
4445 return 0;
4446}
4447_ACEOF
4448if ac_fn_c_try_compile "$LINENO"; then :
4449 ac_cv_header_stdc=yes
4450else
4451 ac_cv_header_stdc=no
4452fi
4453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4454
4455if test $ac_cv_header_stdc = yes; then
4456 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4458/* end confdefs.h. */
4459#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004460
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004461_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004462if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004463 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004464
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004465else
Matthias Kloseb9621712010-04-24 17:59:49 +00004466 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004467fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004468rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004469
Matthias Kloseb9621712010-04-24 17:59:49 +00004470fi
4471
4472if test $ac_cv_header_stdc = yes; then
4473 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4475/* end confdefs.h. */
4476#include <stdlib.h>
4477
4478_ACEOF
4479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4480 $EGREP "free" >/dev/null 2>&1; then :
4481
4482else
4483 ac_cv_header_stdc=no
4484fi
4485rm -f conftest*
4486
4487fi
4488
4489if test $ac_cv_header_stdc = yes; then
4490 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4491 if test "$cross_compiling" = yes; then :
4492 :
4493else
4494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4495/* end confdefs.h. */
4496#include <ctype.h>
4497#include <stdlib.h>
4498#if ((' ' & 0x0FF) == 0x020)
4499# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4500# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4501#else
4502# define ISLOWER(c) \
4503 (('a' <= (c) && (c) <= 'i') \
4504 || ('j' <= (c) && (c) <= 'r') \
4505 || ('s' <= (c) && (c) <= 'z'))
4506# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4507#endif
4508
4509#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4510int
4511main ()
4512{
4513 int i;
4514 for (i = 0; i < 256; i++)
4515 if (XOR (islower (i), ISLOWER (i))
4516 || toupper (i) != TOUPPER (i))
4517 return 2;
4518 return 0;
4519}
4520_ACEOF
4521if ac_fn_c_try_run "$LINENO"; then :
4522
4523else
4524 ac_cv_header_stdc=no
4525fi
4526rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4527 conftest.$ac_objext conftest.beam conftest.$ac_ext
4528fi
4529
4530fi
4531fi
4532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4533$as_echo "$ac_cv_header_stdc" >&6; }
4534if test $ac_cv_header_stdc = yes; then
4535
4536$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4537
4538fi
4539
4540# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4541for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4542 inttypes.h stdint.h unistd.h
4543do :
4544 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4545ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4546"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004547if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004548 cat >>confdefs.h <<_ACEOF
4549#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4550_ACEOF
4551
4552fi
4553
4554done
4555
4556
4557
4558 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004559if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004560 MINIX=yes
4561else
4562 MINIX=
4563fi
4564
4565
4566 if test "$MINIX" = yes; then
4567
4568$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4569
4570
4571$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4572
4573
4574$as_echo "#define _MINIX 1" >>confdefs.h
4575
4576 fi
4577
4578
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4580$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004581if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004582 $as_echo_n "(cached) " >&6
4583else
4584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4585/* end confdefs.h. */
4586
4587# define __EXTENSIONS__ 1
4588 $ac_includes_default
4589int
4590main ()
4591{
4592
4593 ;
4594 return 0;
4595}
4596_ACEOF
4597if ac_fn_c_try_compile "$LINENO"; then :
4598 ac_cv_safe_to_define___extensions__=yes
4599else
4600 ac_cv_safe_to_define___extensions__=no
4601fi
4602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4603fi
4604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4605$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4606 test $ac_cv_safe_to_define___extensions__ = yes &&
4607 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4608
4609 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4610
4611 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4612
4613 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4614
4615 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4616
4617
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004618
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004619# Check for unsupported systems
4620case $ac_sys_system/$ac_sys_release in
4621atheos*|Linux*/1*)
4622 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4623 echo See README for details.
4624 exit 1;;
4625esac
4626
4627
Matthias Kloseb9621712010-04-24 17:59:49 +00004628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4629$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004630
4631# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004632if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004633 withval=$with_suffix;
4634 case $withval in
4635 no) EXEEXT=;;
4636 yes) EXEEXT=.exe;;
4637 *) EXEEXT=$withval;;
4638 esac
4639fi
4640
Matthias Kloseb9621712010-04-24 17:59:49 +00004641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4642$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004643
4644# Test whether we're running on a non-case-sensitive system, in which
4645# case we give a warning if no ext is given
4646
Matthias Kloseb9621712010-04-24 17:59:49 +00004647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4648$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004649if test ! -d CaseSensitiveTestDir; then
4650mkdir CaseSensitiveTestDir
4651fi
4652
4653if test -d casesensitivetestdir
4654then
Matthias Kloseb9621712010-04-24 17:59:49 +00004655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4656$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004657 BUILDEXEEXT=.exe
4658else
Matthias Kloseb9621712010-04-24 17:59:49 +00004659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4660$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004661 BUILDEXEEXT=$EXEEXT
4662fi
4663rmdir CaseSensitiveTestDir
4664
4665case $MACHDEP in
4666bsdos*)
4667 case $CC in
4668 gcc) CC="$CC -D_HAVE_BSDI";;
4669 esac;;
4670esac
4671
4672case $ac_sys_system in
4673hp*|HP*)
4674 case $CC in
4675 cc|*/cc) CC="$CC -Ae";;
4676 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004677esac
4678
4679
4680
Matthias Kloseb9621712010-04-24 17:59:49 +00004681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4682$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004683if test -z "$LIBRARY"
4684then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004685 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4688$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004689
4690# LDLIBRARY is the name of the library to link against (as opposed to the
4691# name of the library into which to insert object files). BLDLIBRARY is also
4692# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4693# is blank as the main program is not linked directly against LDLIBRARY.
4694# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4695# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4696# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4697# DLLLIBRARY is the shared (i.e., DLL) library.
4698#
4699# RUNSHARED is used to run shared python without installed libraries
4700#
4701# INSTSONAME is the name of the shared library that will be use to install
4702# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004703#
4704# LDVERSION is the shared library version number, normally the Python version
4705# with the ABI build flags appended.
4706
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004707
4708
4709
4710
4711
4712
4713LDLIBRARY="$LIBRARY"
4714BLDLIBRARY='$(LDLIBRARY)'
4715INSTSONAME='$(LDLIBRARY)'
4716DLLLIBRARY=''
4717LDLIBRARYDIR=''
4718RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004719LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004720
4721# LINKCC is the command that links the python executable -- default is $(CC).
4722# If CXX is set, and if it is needed to link a main function that was
4723# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4724# python might then depend on the C++ runtime
4725# This is altered for AIX in order to build the export list before
4726# linking.
4727
Matthias Kloseb9621712010-04-24 17:59:49 +00004728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4729$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004730if test -z "$LINKCC"
4731then
4732 LINKCC='$(PURIFY) $(MAINCC)'
4733 case $ac_sys_system in
4734 AIX*)
4735 exp_extra="\"\""
4736 if test $ac_sys_release -ge 5 -o \
4737 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4738 exp_extra="."
4739 fi
4740 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004741 QNX*)
4742 # qcc must be used because the other compilers do not
4743 # support -N.
4744 LINKCC=qcc;;
4745 esac
4746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4748$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004749
4750# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4751# make sure we default having it set to "no": this is used by
4752# distutils.unixccompiler to know if it should add --enable-new-dtags
4753# to linker command lines, and failing to detect GNU ld simply results
4754# in the same bahaviour as before.
4755
Matthias Kloseb9621712010-04-24 17:59:49 +00004756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4757$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758ac_prog=ld
4759if test "$GCC" = yes; then
4760 ac_prog=`$CC -print-prog-name=ld`
4761fi
4762case `"$ac_prog" -V 2>&1 < /dev/null` in
4763 *GNU*)
4764 GNULD=yes;;
4765 *)
4766 GNULD=no;;
4767esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4769$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004770
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4772$as_echo_n "checking for inline... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004773if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004774 $as_echo_n "(cached) " >&6
4775else
4776 ac_cv_c_inline=no
4777for ac_kw in inline __inline__ __inline; do
4778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4779/* end confdefs.h. */
4780#ifndef __cplusplus
4781typedef int foo_t;
4782static $ac_kw foo_t static_foo () {return 0; }
4783$ac_kw foo_t foo () {return 0; }
4784#endif
4785
4786_ACEOF
4787if ac_fn_c_try_compile "$LINENO"; then :
4788 ac_cv_c_inline=$ac_kw
4789fi
4790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4791 test "$ac_cv_c_inline" != no && break
4792done
4793
4794fi
4795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4796$as_echo "$ac_cv_c_inline" >&6; }
4797
4798case $ac_cv_c_inline in
4799 inline | yes) ;;
4800 *)
4801 case $ac_cv_c_inline in
4802 no) ac_val=;;
4803 *) ac_val=$ac_cv_c_inline;;
4804 esac
4805 cat >>confdefs.h <<_ACEOF
4806#ifndef __cplusplus
4807#define inline $ac_val
4808#endif
4809_ACEOF
4810 ;;
4811esac
4812
4813if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004814
4815$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004816
4817
4818fi
4819
4820
Matthias Kloseb9621712010-04-24 17:59:49 +00004821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4822$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004823# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004824if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004825 enableval=$enable_shared;
4826fi
4827
4828
4829if test -z "$enable_shared"
4830then
4831 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004832 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004833 enable_shared="yes";;
4834 *)
4835 enable_shared="no";;
4836 esac
4837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4839$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840
Matthias Kloseb9621712010-04-24 17:59:49 +00004841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4842$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004844if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845 enableval=$enable_profiling; ac_save_cc="$CC"
4846 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004847 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848 ac_enable_profiling="no"
4849else
Matthias Kloseb9621712010-04-24 17:59:49 +00004850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004851/* end confdefs.h. */
4852int main() { return 0; }
4853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004854if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855 ac_enable_profiling="yes"
4856else
Matthias Kloseb9621712010-04-24 17:59:49 +00004857 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4860 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004861fi
4862
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004863 CC="$ac_save_cc"
4864fi
4865
Matthias Kloseb9621712010-04-24 17:59:49 +00004866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4867$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004868
4869case "$ac_enable_profiling" in
4870 "yes")
4871 BASECFLAGS="-pg $BASECFLAGS"
4872 LDFLAGS="-pg $LDFLAGS"
4873 ;;
4874esac
4875
Matthias Kloseb9621712010-04-24 17:59:49 +00004876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4877$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004878
4879# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4880# library that we build, but we do not want to link against it (we
4881# will find it with a -framework option). For this reason there is an
4882# extra variable BLDLIBRARY against which Python and the extension
4883# modules are linked, BLDLIBRARY. This is normally the same as
4884# LDLIBRARY, but empty for MacOSX framework builds.
4885if test "$enable_framework"
4886then
4887 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4888 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4889 BLDLIBRARY=''
4890else
4891 BLDLIBRARY='$(LDLIBRARY)'
4892fi
4893
4894# Other platforms follow
4895if test $enable_shared = "yes"; then
4896
Matthias Kloseb9621712010-04-24 17:59:49 +00004897$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004898
4899 case $ac_sys_system in
4900 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004901 LDLIBRARY='libpython$(LDVERSION).dll.a'
4902 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004903 ;;
4904 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004905 LDLIBRARY='libpython$(LDVERSION).so'
4906 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004907 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4908 INSTSONAME="$LDLIBRARY".$SOVERSION
4909 ;;
4910 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004911 LDLIBRARY='libpython$(LDVERSION).so'
4912 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004913 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4914 case $ac_sys_system in
4915 FreeBSD*)
4916 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4917 ;;
4918 esac
4919 INSTSONAME="$LDLIBRARY".$SOVERSION
4920 ;;
4921 hp*|HP*)
4922 case `uname -m` in
4923 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004924 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925 ;;
4926 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004927 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 ;;
4929 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004930 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004931 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4932 ;;
4933 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004934 LDLIBRARY='libpython$(LDVERSION).so'
4935 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004936 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4937 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004939 LDLIBRARY='libpython$(LDVERSION).dylib'
4940 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004941 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4942 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004943 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004944 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004945 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4946 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947
4948 esac
4949else # shared is disabled
4950 case $ac_sys_system in
4951 CYGWIN*)
4952 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004953 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004954 ;;
4955 esac
4956fi
4957
Matthias Kloseb9621712010-04-24 17:59:49 +00004958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4959$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004960
4961if test -n "$ac_tool_prefix"; then
4962 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4963set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4965$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004966if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004967 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968else
4969 if test -n "$RANLIB"; then
4970 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4971else
4972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4973for as_dir in $PATH
4974do
4975 IFS=$as_save_IFS
4976 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004977 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4979 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981 break 2
4982 fi
4983done
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004985IFS=$as_save_IFS
4986
4987fi
4988fi
4989RANLIB=$ac_cv_prog_RANLIB
4990if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4992$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993else
Matthias Kloseb9621712010-04-24 17:59:49 +00004994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996fi
4997
4998
4999fi
5000if test -z "$ac_cv_prog_RANLIB"; then
5001 ac_ct_RANLIB=$RANLIB
5002 # Extract the first word of "ranlib", so it can be a program name with args.
5003set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5005$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005006if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005007 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008else
5009 if test -n "$ac_ct_RANLIB"; then
5010 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5011else
5012as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013for as_dir in $PATH
5014do
5015 IFS=$as_save_IFS
5016 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005017 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5019 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005021 break 2
5022 fi
5023done
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005025IFS=$as_save_IFS
5026
5027fi
5028fi
5029ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5030if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5032$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033else
Matthias Kloseb9621712010-04-24 17:59:49 +00005034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005036fi
5037
5038 if test "x$ac_ct_RANLIB" = x; then
5039 RANLIB=":"
5040 else
5041 case $cross_compiling:$ac_tool_warned in
5042yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005043{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5044$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005045ac_tool_warned=yes ;;
5046esac
5047 RANLIB=$ac_ct_RANLIB
5048 fi
5049else
5050 RANLIB="$ac_cv_prog_RANLIB"
5051fi
5052
5053
5054for ac_prog in ar aal
5055do
5056 # Extract the first word of "$ac_prog", so it can be a program name with args.
5057set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5059$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005060if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062else
5063 if test -n "$AR"; then
5064 ac_cv_prog_AR="$AR" # Let the user override the test.
5065else
5066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5067for as_dir in $PATH
5068do
5069 IFS=$as_save_IFS
5070 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5073 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005075 break 2
5076 fi
5077done
Matthias Kloseb9621712010-04-24 17:59:49 +00005078 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005079IFS=$as_save_IFS
5080
5081fi
5082fi
5083AR=$ac_cv_prog_AR
5084if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5086$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087else
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5089$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090fi
5091
5092
5093 test -n "$AR" && break
5094done
5095test -n "$AR" || AR="ar"
5096
5097
5098# tweak ARFLAGS only if the user didn't set it on the command line
5099
5100if test -z "$ARFLAGS"
5101then
5102 ARFLAGS="rc"
5103fi
5104
5105
5106# Extract the first word of "svnversion", so it can be a program name with args.
5107set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5109$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005110if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005112else
5113 if test -n "$SVNVERSION"; then
5114 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5115else
5116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5117for as_dir in $PATH
5118do
5119 IFS=$as_save_IFS
5120 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005122 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5123 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005124 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005125 break 2
5126 fi
5127done
Matthias Kloseb9621712010-04-24 17:59:49 +00005128 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005129IFS=$as_save_IFS
5130
5131 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5132fi
5133fi
5134SVNVERSION=$ac_cv_prog_SVNVERSION
5135if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5137$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138else
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5140$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005141fi
5142
5143
5144if test $SVNVERSION = found
5145then
5146 SVNVERSION="svnversion \$(srcdir)"
5147else
5148 SVNVERSION="echo Unversioned directory"
5149fi
5150
5151case $MACHDEP in
5152bsdos*|hp*|HP*)
5153 # install -d does not work on BSDI or HP-UX
5154 if test -z "$INSTALL"
5155 then
5156 INSTALL="${srcdir}/install-sh -c"
5157 fi
5158esac
5159ac_aux_dir=
5160for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005161 if test -f "$ac_dir/install-sh"; then
5162 ac_aux_dir=$ac_dir
5163 ac_install_sh="$ac_aux_dir/install-sh -c"
5164 break
5165 elif test -f "$ac_dir/install.sh"; then
5166 ac_aux_dir=$ac_dir
5167 ac_install_sh="$ac_aux_dir/install.sh -c"
5168 break
5169 elif test -f "$ac_dir/shtool"; then
5170 ac_aux_dir=$ac_dir
5171 ac_install_sh="$ac_aux_dir/shtool install -c"
5172 break
5173 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005174done
5175if test -z "$ac_aux_dir"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005176 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005177fi
5178
5179# These three variables are undocumented and unsupported,
5180# and are intended to be withdrawn in a future Autoconf release.
5181# They can cause serious problems if a builder's source tree is in a directory
5182# whose full name contains unusual characters.
5183ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5184ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5185ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5186
5187
5188# Find a good install program. We prefer a C program (faster),
5189# so one script is as good as another. But avoid the broken or
5190# incompatible versions:
5191# SysV /etc/install, /usr/sbin/install
5192# SunOS /usr/etc/install
5193# IRIX /sbin/install
5194# AIX /bin/install
5195# AmigaOS /C/install, which installs bootblocks on floppy discs
5196# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5197# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5198# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5199# OS/2's system install, which has a completely different semantic
5200# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005201# Reject install programs that cannot install multiple files.
5202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5203$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005204if test -z "$INSTALL"; then
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005205if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005206 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005207else
5208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5209for as_dir in $PATH
5210do
5211 IFS=$as_save_IFS
5212 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005213 # Account for people who put trailing slashes in PATH elements.
5214case $as_dir/ in #((
5215 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005216 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005217 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005218 /usr/ucb/* ) ;;
5219 *)
5220 # OSF1 and SCO ODT 3.0 have their own names for install.
5221 # Don't use installbsd from OSF since it installs stuff as root
5222 # by default.
5223 for ac_prog in ginstall scoinst install; do
5224 for ac_exec_ext in '' $ac_executable_extensions; do
5225 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5226 if test $ac_prog = install &&
5227 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5228 # AIX install. It has an incompatible calling convention.
5229 :
5230 elif test $ac_prog = install &&
5231 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5232 # program-specific install script used by HP pwplus--don't use.
5233 :
5234 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005235 rm -rf conftest.one conftest.two conftest.dir
5236 echo one > conftest.one
5237 echo two > conftest.two
5238 mkdir conftest.dir
5239 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5240 test -s conftest.one && test -s conftest.two &&
5241 test -s conftest.dir/conftest.one &&
5242 test -s conftest.dir/conftest.two
5243 then
5244 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5245 break 3
5246 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005247 fi
5248 fi
5249 done
5250 done
5251 ;;
5252esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005253
5254 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005255IFS=$as_save_IFS
5256
Matthias Kloseb9621712010-04-24 17:59:49 +00005257rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005258
5259fi
5260 if test "${ac_cv_path_install+set}" = set; then
5261 INSTALL=$ac_cv_path_install
5262 else
5263 # As a last resort, use the slow shell script. Don't cache a
5264 # value for INSTALL within a source directory, because that will
5265 # break other packages using the cache if that directory is
5266 # removed, or if the value is a relative name.
5267 INSTALL=$ac_install_sh
5268 fi
5269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5271$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005272
5273# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5274# It thinks the first close brace ends the variable substitution.
5275test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5276
5277test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5278
5279test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5280
5281
5282# Not every filesystem supports hard links
5283
5284if test -z "$LN" ; then
5285 case $ac_sys_system in
5286 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005287 *) LN=ln;;
5288 esac
5289fi
5290
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005291# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005292
5293ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005294
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005295# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5297$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005298
5299# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005300if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005301 withval=$with_pydebug;
5302if test "$withval" != no
5303then
5304
Matthias Kloseb9621712010-04-24 17:59:49 +00005305$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005306
Matthias Kloseb9621712010-04-24 17:59:49 +00005307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5308$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005310 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005311else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5312$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005313fi
5314else
Matthias Kloseb9621712010-04-24 17:59:49 +00005315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5316$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005317fi
5318
5319
5320# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5321# merged with this chunk of code?
5322
5323# Optimizer/debugger flags
5324# ------------------------
5325# (The following bit of code is complicated enough - please keep things
5326# indented properly. Just pretend you're editing Python code. ;-)
5327
5328# There are two parallel sets of case statements below, one that checks to
5329# see if OPT was set and one that does BASECFLAGS setting based upon
5330# compiler and platform. BASECFLAGS tweaks need to be made even if the
5331# user set OPT.
5332
5333# tweak OPT based on compiler and platform, only if the user didn't set
5334# it on the command line
5335
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005336if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337then
5338 case $GCC in
5339 yes)
5340 if test "$CC" != 'g++' ; then
5341 STRICT_PROTO="-Wstrict-prototypes"
5342 fi
5343 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5344 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5345 WRAP="-fwrapv"
5346 fi
5347 case $ac_cv_prog_cc_g in
5348 yes)
5349 if test "$Py_DEBUG" = 'true' ; then
5350 # Optimization messes up debuggers, so turn it off for
5351 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005352 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005353 else
5354 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5355 fi
5356 ;;
5357 *)
5358 OPT="-O3 -Wall $STRICT_PROTO"
5359 ;;
5360 esac
5361 case $ac_sys_system in
5362 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5363 ;;
5364 esac
5365 ;;
5366
5367 *)
5368 OPT="-O"
5369 ;;
5370 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005371fi
5372
5373
5374
5375# The -arch flags for universal builds on OSX
5376UNIVERSAL_ARCH_FLAGS=
5377
5378
5379# tweak BASECFLAGS based on compiler and platform
5380case $GCC in
5381yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005382 # Python doesn't violate C99 aliasing rules, but older versions of
5383 # GCC produce warnings for legal Python code. Enable
5384 # -fno-strict-aliasing on versions of GCC that support but produce
5385 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5387$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005388 ac_save_cc="$CC"
5389 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005390 save_CFLAGS="$CFLAGS"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005391 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005392 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005393else
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005395/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005396
Matthias Kloseb159a552010-04-25 21:00:44 +00005397
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005398int
5399main ()
5400{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005401
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005402 ;
5403 return 0;
5404}
Matthias Kloseb159a552010-04-25 21:00:44 +00005405
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005407if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005408
5409 CC="$ac_save_cc -fstrict-aliasing"
5410 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005412/* end confdefs.h. */
5413
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005414 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005415int
5416main ()
5417{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005418double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005419 ;
5420 return 0;
5421}
Matthias Kloseb159a552010-04-25 21:00:44 +00005422
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005424if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005425
5426 ac_cv_no_strict_aliasing=no
5427
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005428else
Matthias Kloseb159a552010-04-25 21:00:44 +00005429
5430 ac_cv_no_strict_aliasing=yes
5431
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005432fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005434
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005435else
Matthias Kloseb159a552010-04-25 21:00:44 +00005436
5437 ac_cv_no_strict_aliasing=no
5438
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005441fi
5442
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005443 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005444 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5446$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005447 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005448 then
5449 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5450 fi
5451
5452 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5453 # support. Without this, treatment of subnormals doesn't follow
5454 # the standard.
5455 case $ac_sys_machine in
5456 alpha*)
5457 BASECFLAGS="$BASECFLAGS -mieee"
5458 ;;
5459 esac
5460
5461 case $ac_sys_system in
5462 SCO_SV*)
5463 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5464 ;;
5465 # is there any other compiler on Darwin besides gcc?
5466 Darwin*)
5467 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5468 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005469 if test "${CC}" = gcc
5470 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5472$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005473 case "${UNIVERSALSDK}" in
5474 */MacOSX10.4u.sdk)
5475 # Build using 10.4 SDK, force usage of gcc when the
5476 # compiler is gcc, otherwise the user will get very
5477 # confusing error messages when building on OSX 10.6
5478 CC=gcc-4.0
5479 CPP=cpp-4.0
5480 ;;
5481 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5483$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005484 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485
5486
5487 if test "${enable_universalsdk}"; then
5488 UNIVERSAL_ARCH_FLAGS=""
5489 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5490 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5491 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005492 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5494 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005495 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005496 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497
5498 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5499 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005500 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005501 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005502
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005503 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5504 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005505 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005506 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005507
5508 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5509 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005510 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005511 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005512
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513 else
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005514 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 +00005515
5516 fi
5517
5518
Ronald Oussoren666028b2010-04-18 19:07:43 +00005519 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5520 if test "${UNIVERSALSDK}" != "/"
5521 then
5522 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5523 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005524 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005525 fi
5526 fi
5527
5528 # Calculate the right deployment target for this build.
5529 #
5530 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5531 if test ${cur_target} '>' 10.2; then
5532 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005533 if test ${enable_universalsdk}; then
5534 if test "${UNIVERSAL_ARCHS}" = "all"; then
5535 # Ensure that the default platform for a
5536 # 4-way universal build is OSX 10.5,
5537 # that's the first OS release where
5538 # 4-way builds make sense.
5539 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005540
5541 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5542 cur_target='10.5'
5543
5544 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5545 cur_target='10.5'
5546
5547 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5548 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005549 fi
5550 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005551 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005552 # On Intel macs default to a deployment
5553 # target of 10.4, that's the first OSX
5554 # release with Intel support.
5555 cur_target="10.4"
5556 fi
5557 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005558 fi
5559 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5560
5561 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5562 # environment with a value that is the same as what we'll use
5563 # in the Makefile to ensure that we'll get the same compiler
5564 # environment during configure and build time.
5565 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5566 export MACOSX_DEPLOYMENT_TARGET
5567 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5568
5569 ;;
5570 OSF*)
5571 BASECFLAGS="$BASECFLAGS -mieee"
5572 ;;
5573 esac
5574 ;;
5575
5576*)
5577 case $ac_sys_system in
5578 OpenUNIX*|UnixWare*)
5579 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5580 ;;
5581 OSF*)
5582 BASECFLAGS="$BASECFLAGS -ieee -std"
5583 ;;
5584 SCO_SV*)
5585 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5586 ;;
5587 esac
5588 ;;
5589esac
5590
5591if test "$Py_DEBUG" = 'true'; then
5592 :
5593else
5594 OPT="-DNDEBUG $OPT"
5595fi
5596
5597if test "$ac_arch_flags"
5598then
5599 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5600fi
5601
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602# Check whether GCC supports PyArg_ParseTuple format
5603if test "$GCC" = "yes"
5604then
Matthias Kloseb9621712010-04-24 17:59:49 +00005605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5606$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607 save_CFLAGS=$CFLAGS
5608 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610/* end confdefs.h. */
5611
5612 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613int
5614main ()
5615{
5616
5617 ;
5618 return 0;
5619}
Matthias Kloseb159a552010-04-25 21:00:44 +00005620
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005622if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005623
Matthias Kloseb159a552010-04-25 21:00:44 +00005624
Matthias Kloseb9621712010-04-24 17:59:49 +00005625$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005626
Matthias Kloseb159a552010-04-25 21:00:44 +00005627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005628$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005629
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630else
Matthias Kloseb159a552010-04-25 21:00:44 +00005631
5632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005633$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005634
5635fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5637 CFLAGS=$save_CFLAGS
5638fi
5639
5640# On some compilers, pthreads are available without further options
5641# (e.g. MacOS X). On some of these systems, the compiler will not
5642# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5643# So we have to see first whether pthreads are available without
5644# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5646$as_echo_n "checking whether pthreads are available without options... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005647if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005648 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649else
Matthias Kloseb9621712010-04-24 17:59:49 +00005650 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651 ac_cv_pthread_is_default=no
5652else
Matthias Kloseb9621712010-04-24 17:59:49 +00005653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654/* end confdefs.h. */
5655
5656#include <pthread.h>
5657
5658void* routine(void* p){return NULL;}
5659
5660int main(){
5661 pthread_t p;
5662 if(pthread_create(&p,NULL,routine,NULL)!=0)
5663 return 1;
5664 (void)pthread_detach(p);
5665 return 0;
5666}
5667
5668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005669if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670
5671 ac_cv_pthread_is_default=yes
5672 ac_cv_kthread=no
5673 ac_cv_pthread=no
5674
5675else
Matthias Kloseb9621712010-04-24 17:59:49 +00005676 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5679 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680fi
5681
5682
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683fi
5684
Matthias Kloseb9621712010-04-24 17:59:49 +00005685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5686$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687
5688
5689if test $ac_cv_pthread_is_default = yes
5690then
5691 ac_cv_kpthread=no
5692else
5693# -Kpthread, if available, provides the right #defines
5694# and linker options to make pthread_create available
5695# Some compilers won't report that they do not support -Kpthread,
5696# so we need to run a program to see whether it really made the
5697# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5699$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005700if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005701 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702else
5703 ac_save_cc="$CC"
5704CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005705if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706 ac_cv_kpthread=no
5707else
Matthias Kloseb9621712010-04-24 17:59:49 +00005708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709/* end confdefs.h. */
5710
5711#include <pthread.h>
5712
5713void* routine(void* p){return NULL;}
5714
5715int main(){
5716 pthread_t p;
5717 if(pthread_create(&p,NULL,routine,NULL)!=0)
5718 return 1;
5719 (void)pthread_detach(p);
5720 return 0;
5721}
5722
5723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005724if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725 ac_cv_kpthread=yes
5726else
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005729rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5730 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731fi
5732
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733CC="$ac_save_cc"
5734fi
5735
Matthias Kloseb9621712010-04-24 17:59:49 +00005736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5737$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738fi
5739
5740if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5741then
5742# -Kthread, if available, provides the right #defines
5743# and linker options to make pthread_create available
5744# Some compilers won't report that they do not support -Kthread,
5745# so we need to run a program to see whether it really made the
5746# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5748$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005749if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005750 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751else
5752 ac_save_cc="$CC"
5753CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005754if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755 ac_cv_kthread=no
5756else
Matthias Kloseb9621712010-04-24 17:59:49 +00005757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758/* end confdefs.h. */
5759
5760#include <pthread.h>
5761
5762void* routine(void* p){return NULL;}
5763
5764int main(){
5765 pthread_t p;
5766 if(pthread_create(&p,NULL,routine,NULL)!=0)
5767 return 1;
5768 (void)pthread_detach(p);
5769 return 0;
5770}
5771
5772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005773if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774 ac_cv_kthread=yes
5775else
Matthias Kloseb9621712010-04-24 17:59:49 +00005776 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5779 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780fi
5781
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782CC="$ac_save_cc"
5783fi
5784
Matthias Kloseb9621712010-04-24 17:59:49 +00005785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5786$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787fi
5788
5789if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5790then
5791# -pthread, if available, provides the right #defines
5792# and linker options to make pthread_create available
5793# Some compilers won't report that they do not support -pthread,
5794# so we need to run a program to see whether it really made the
5795# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5797$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005798if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005799 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800else
5801 ac_save_cc="$CC"
5802CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005803if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804 ac_cv_pthread=no
5805else
Matthias Kloseb9621712010-04-24 17:59:49 +00005806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807/* end confdefs.h. */
5808
5809#include <pthread.h>
5810
5811void* routine(void* p){return NULL;}
5812
5813int main(){
5814 pthread_t p;
5815 if(pthread_create(&p,NULL,routine,NULL)!=0)
5816 return 1;
5817 (void)pthread_detach(p);
5818 return 0;
5819}
5820
5821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005822if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823 ac_cv_pthread=yes
5824else
Matthias Kloseb9621712010-04-24 17:59:49 +00005825 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5828 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829fi
5830
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831CC="$ac_save_cc"
5832fi
5833
Matthias Kloseb9621712010-04-24 17:59:49 +00005834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5835$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836fi
5837
5838# If we have set a CC compiler flag for thread support then
5839# check if it works for CXX, too.
5840ac_cv_cxx_thread=no
5841if test ! -z "$CXX"
5842then
Matthias Kloseb9621712010-04-24 17:59:49 +00005843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5844$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845ac_save_cxx="$CXX"
5846
5847if test "$ac_cv_kpthread" = "yes"
5848then
5849 CXX="$CXX -Kpthread"
5850 ac_cv_cxx_thread=yes
5851elif test "$ac_cv_kthread" = "yes"
5852then
5853 CXX="$CXX -Kthread"
5854 ac_cv_cxx_thread=yes
5855elif test "$ac_cv_pthread" = "yes"
5856then
5857 CXX="$CXX -pthread"
5858 ac_cv_cxx_thread=yes
5859fi
5860
5861if test $ac_cv_cxx_thread = yes
5862then
5863 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5864 $CXX -c conftest.$ac_ext 2>&5
5865 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5866 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5867 then
5868 ac_cv_cxx_thread=yes
5869 else
5870 ac_cv_cxx_thread=no
5871 fi
5872 rm -fr conftest*
5873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5875$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876fi
5877CXX="$ac_save_cxx"
5878
5879
5880# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5882$as_echo_n "checking for ANSI C header files... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005883if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005884 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885else
Matthias Kloseb9621712010-04-24 17:59:49 +00005886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887/* end confdefs.h. */
5888#include <stdlib.h>
5889#include <stdarg.h>
5890#include <string.h>
5891#include <float.h>
5892
5893int
5894main ()
5895{
5896
5897 ;
5898 return 0;
5899}
5900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005901if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902 ac_cv_header_stdc=yes
5903else
Matthias Kloseb9621712010-04-24 17:59:49 +00005904 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5907
5908if test $ac_cv_header_stdc = yes; then
5909 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911/* end confdefs.h. */
5912#include <string.h>
5913
5914_ACEOF
5915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005916 $EGREP "memchr" >/dev/null 2>&1; then :
5917
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918else
5919 ac_cv_header_stdc=no
5920fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005921rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922
5923fi
5924
5925if test $ac_cv_header_stdc = yes; then
5926 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928/* end confdefs.h. */
5929#include <stdlib.h>
5930
5931_ACEOF
5932if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005933 $EGREP "free" >/dev/null 2>&1; then :
5934
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935else
5936 ac_cv_header_stdc=no
5937fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005938rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939
5940fi
5941
5942if test $ac_cv_header_stdc = yes; then
5943 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005944 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 :
5946else
Matthias Kloseb9621712010-04-24 17:59:49 +00005947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948/* end confdefs.h. */
5949#include <ctype.h>
5950#include <stdlib.h>
5951#if ((' ' & 0x0FF) == 0x020)
5952# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5953# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5954#else
5955# define ISLOWER(c) \
5956 (('a' <= (c) && (c) <= 'i') \
5957 || ('j' <= (c) && (c) <= 'r') \
5958 || ('s' <= (c) && (c) <= 'z'))
5959# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5960#endif
5961
5962#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5963int
5964main ()
5965{
5966 int i;
5967 for (i = 0; i < 256; i++)
5968 if (XOR (islower (i), ISLOWER (i))
5969 || toupper (i) != TOUPPER (i))
5970 return 2;
5971 return 0;
5972}
5973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005974if ac_fn_c_try_run "$LINENO"; then :
5975
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976else
Matthias Kloseb9621712010-04-24 17:59:49 +00005977 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5980 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981fi
5982
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983fi
5984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5986$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987if test $ac_cv_header_stdc = yes; then
5988
Matthias Kloseb9621712010-04-24 17:59:49 +00005989$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990
5991fi
5992
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005993for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5994fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005995ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005996shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005997unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005998sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5999sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006000sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006001sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006002sys/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 +00006003sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006004bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006005do :
6006 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6007ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006008if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006009 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006010#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006011_ACEOF
6012
6013fi
6014
Guido van Rossum627b2d71993-12-24 10:39:16 +00006015done
6016
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006017ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006018for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006019 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6021$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006022if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006023 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006024else
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006026/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006027#include <sys/types.h>
6028#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006029
Martin v. Löwis11437992002-04-12 09:54:03 +00006030int
6031main ()
6032{
6033if ((DIR *) 0)
6034return 0;
6035 ;
6036 return 0;
6037}
6038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006039if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006040 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006041else
Matthias Kloseb9621712010-04-24 17:59:49 +00006042 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006046eval ac_res=\$$as_ac_Header
6047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6048$as_echo "$ac_res" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006049if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006050 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006051#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006052_ACEOF
6053
6054ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006055fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006056
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006057done
6058# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6059if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6061$as_echo_n "checking for library containing opendir... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006062if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006063 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006064else
Martin v. Löwis11437992002-04-12 09:54:03 +00006065 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006068
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006069/* Override any GCC internal prototype to avoid an error.
6070 Use char because int might match the return type of a GCC
6071 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006072#ifdef __cplusplus
6073extern "C"
6074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006075char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006076int
6077main ()
6078{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006079return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006080 ;
6081 return 0;
6082}
6083_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006084for ac_lib in '' dir; do
6085 if test -z "$ac_lib"; then
6086 ac_res="none required"
6087 else
6088 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006089 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006090 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006092 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006093fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006094rm -f core conftest.err conftest.$ac_objext \
6095 conftest$ac_exeext
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006096 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006097 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006099done
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006100if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006101
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006102else
6103 ac_cv_search_opendir=no
6104fi
6105rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006106LIBS=$ac_func_search_save_LIBS
6107fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6109$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006110ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006111if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006112 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006113
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006114fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006115
Michael W. Hudson54241132001-12-07 15:38:26 +00006116else
Matthias Kloseb9621712010-04-24 17:59:49 +00006117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6118$as_echo_n "checking for library containing opendir... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006119if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006120 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006121else
6122 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006126/* Override any GCC internal prototype to avoid an error.
6127 Use char because int might match the return type of a GCC
6128 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006129#ifdef __cplusplus
6130extern "C"
6131#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006132char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006133int
6134main ()
6135{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006136return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006137 ;
6138 return 0;
6139}
6140_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006141for ac_lib in '' x; do
6142 if test -z "$ac_lib"; then
6143 ac_res="none required"
6144 else
6145 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006146 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006147 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006148 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006150fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006151rm -f core conftest.err conftest.$ac_objext \
6152 conftest$ac_exeext
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006153 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006154 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006156done
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006157if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006158
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006159else
6160 ac_cv_search_opendir=no
6161fi
6162rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006163LIBS=$ac_func_search_save_LIBS
6164fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6166$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006167ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006168if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006169 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006170
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006171fi
6172
6173fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006174
Matthias Kloseb9621712010-04-24 17:59:49 +00006175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6176$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006177if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006178 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006179else
Matthias Kloseb9621712010-04-24 17:59:49 +00006180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006181/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006183int
6184main ()
6185{
6186return makedev(0, 0);
6187 ;
6188 return 0;
6189}
6190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006191if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006192 ac_cv_header_sys_types_h_makedev=yes
6193else
Matthias Kloseb9621712010-04-24 17:59:49 +00006194 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006196rm -f core conftest.err conftest.$ac_objext \
6197 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198
6199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6201$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006202
6203if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006204ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006205if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006206
Matthias Kloseb9621712010-04-24 17:59:49 +00006207$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006208
6209fi
6210
6211
6212
6213 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006214 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006215if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006216
Matthias Kloseb9621712010-04-24 17:59:49 +00006217$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006218
6219fi
6220
6221
6222 fi
6223fi
6224
Michael W. Hudson54241132001-12-07 15:38:26 +00006225
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006226# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006227for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006228do :
6229 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006230#ifdef HAVE_CURSES_H
6231#include <curses.h>
6232#endif
6233
Matthias Kloseb9621712010-04-24 17:59:49 +00006234"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006235if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006236 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006237#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006238_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006239
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006240fi
6241
6242done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006243
6244
Martin v. Löwis11017b12006-01-14 18:12:57 +00006245# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006246for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006247do :
6248 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 +00006249#ifdef HAVE_ASM_TYPES_H
6250#include <asm/types.h>
6251#endif
6252#ifdef HAVE_SYS_SOCKET_H
6253#include <sys/socket.h>
6254#endif
6255
Matthias Kloseb9621712010-04-24 17:59:49 +00006256"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006257if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006258 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006259#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006260_ACEOF
6261
6262fi
6263
6264done
6265
6266
Guido van Rossum627b2d71993-12-24 10:39:16 +00006267# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006268was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6270$as_echo_n "checking for clock_t in time.h... " >&6; }
6271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006272/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006273#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006274
6275_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006276if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006277 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006278 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006279else
Martin v. Löwis11437992002-04-12 09:54:03 +00006280
6281
Matthias Kloseb9621712010-04-24 17:59:49 +00006282$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006283
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006284
Guido van Rossum627b2d71993-12-24 10:39:16 +00006285fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006286rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006287
Matthias Kloseb9621712010-04-24 17:59:49 +00006288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6289$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006290
Neal Norwitz11690112002-07-30 01:08:28 +00006291# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6293$as_echo_n "checking for makedev... " >&6; }
6294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006295/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006296
Jesus Cea740f53a2010-04-28 11:35:30 +00006297#if defined(MAJOR_IN_MKDEV)
6298#include <sys/mkdev.h>
6299#elif defined(MAJOR_IN_SYSMACROS)
6300#include <sys/sysmacros.h>
6301#else
6302#include <sys/types.h>
6303#endif
6304
Neal Norwitz11690112002-07-30 01:08:28 +00006305int
6306main ()
6307{
Jesus Cea740f53a2010-04-28 11:35:30 +00006308
6309 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006310 ;
6311 return 0;
6312}
Matthias Kloseb159a552010-04-25 21:00:44 +00006313
Neal Norwitz11690112002-07-30 01:08:28 +00006314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006315if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006316 ac_cv_has_makedev=yes
6317else
Matthias Kloseb9621712010-04-24 17:59:49 +00006318 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006320rm -f core conftest.err conftest.$ac_objext \
6321 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006322if test "$ac_cv_has_makedev" = "no"; then
6323 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006325/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006326
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006327#define _OSF_SOURCE 1
6328#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006329
Neal Norwitz11690112002-07-30 01:08:28 +00006330int
6331main ()
6332{
6333 makedev(0, 0)
6334 ;
6335 return 0;
6336}
6337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006338if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006339 ac_cv_has_makedev=yes
6340else
Matthias Kloseb9621712010-04-24 17:59:49 +00006341 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006342fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006343rm -f core conftest.err conftest.$ac_objext \
6344 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006345 if test "$ac_cv_has_makedev" = "yes"; then
6346
Matthias Kloseb9621712010-04-24 17:59:49 +00006347$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006348
6349 fi
6350fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6352$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006353if test "$ac_cv_has_makedev" = "yes"; then
6354
Matthias Kloseb9621712010-04-24 17:59:49 +00006355$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006356
6357fi
6358
Martin v. Löwis399a6892002-10-04 10:22:02 +00006359# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6360# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6361# defined, but the compiler does not support pragma redefine_extname,
6362# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6363# structures (such as rlimit64) without declaring them. As a
6364# work-around, disable LFS on such configurations
6365
6366use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6368$as_echo_n "checking Solaris LFS bug... " >&6; }
6369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006370/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006371
6372#define _LARGEFILE_SOURCE 1
6373#define _FILE_OFFSET_BITS 64
6374#include <sys/resource.h>
6375
Martin v. Löwis399a6892002-10-04 10:22:02 +00006376int
6377main ()
6378{
6379struct rlimit foo;
6380 ;
6381 return 0;
6382}
6383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006384if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006385 sol_lfs_bug=no
6386else
Matthias Kloseb9621712010-04-24 17:59:49 +00006387 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6391$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006392if test "$sol_lfs_bug" = "yes"; then
6393 use_lfs=no
6394fi
6395
6396if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006397# Two defines needed to enable largefile support on various platforms
6398# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006399
Matthias Kloseb9621712010-04-24 17:59:49 +00006400$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006401
6402
Matthias Kloseb9621712010-04-24 17:59:49 +00006403$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006404
Martin v. Löwis399a6892002-10-04 10:22:02 +00006405fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006406
Guido van Rossum84e7b241996-08-19 21:59:00 +00006407# Add some code to confdefs.h so that the test for off_t works on SCO
6408cat >> confdefs.h <<\EOF
6409#if defined(SCO_DS)
6410#undef _OFF_T
6411#endif
6412EOF
6413
Guido van Rossumef2255b2000-03-10 22:30:29 +00006414# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006415ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006416if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006417
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006418else
Martin v. Löwis11437992002-04-12 09:54:03 +00006419
6420cat >>confdefs.h <<_ACEOF
6421#define mode_t int
6422_ACEOF
6423
6424fi
6425
Matthias Kloseb9621712010-04-24 17:59:49 +00006426ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006427if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006428
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006429else
Martin v. Löwis11437992002-04-12 09:54:03 +00006430
6431cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006432#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006433_ACEOF
6434
6435fi
6436
Matthias Kloseb9621712010-04-24 17:59:49 +00006437ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006438if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006439
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006440else
Martin v. Löwis11437992002-04-12 09:54:03 +00006441
6442cat >>confdefs.h <<_ACEOF
6443#define pid_t int
6444_ACEOF
6445
6446fi
6447
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006448
Martin v. Löwis11437992002-04-12 09:54:03 +00006449cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006450#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006451_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006452
Matthias Kloseb9621712010-04-24 17:59:49 +00006453ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006454if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006455
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006456else
Martin v. Löwis11437992002-04-12 09:54:03 +00006457
6458cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006459#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006460_ACEOF
6461
6462fi
6463
Matthias Kloseb9621712010-04-24 17:59:49 +00006464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6465$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006466if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006467 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006468else
Matthias Kloseb9621712010-04-24 17:59:49 +00006469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006470/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006471#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006472
6473_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006474if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006475 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006476 ac_cv_type_uid_t=yes
6477else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006478 ac_cv_type_uid_t=no
6479fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006480rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006481
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6484$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006485if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006486
Matthias Kloseb9621712010-04-24 17:59:49 +00006487$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006488
6489
Matthias Kloseb9621712010-04-24 17:59:49 +00006490$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006491
6492fi
6493
Matthias Kloseb9621712010-04-24 17:59:49 +00006494ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6495case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006496 no|yes) ;; #(
6497 *)
6498
Matthias Kloseb9621712010-04-24 17:59:49 +00006499$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006500
6501
6502cat >>confdefs.h <<_ACEOF
6503#define uint32_t $ac_cv_c_uint32_t
6504_ACEOF
6505;;
6506 esac
6507
Matthias Kloseb9621712010-04-24 17:59:49 +00006508ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6509case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006510 no|yes) ;; #(
6511 *)
6512
Matthias Kloseb9621712010-04-24 17:59:49 +00006513$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006514
6515
6516cat >>confdefs.h <<_ACEOF
6517#define uint64_t $ac_cv_c_uint64_t
6518_ACEOF
6519;;
6520 esac
6521
Matthias Kloseb9621712010-04-24 17:59:49 +00006522ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6523case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006524 no|yes) ;; #(
6525 *)
6526
6527cat >>confdefs.h <<_ACEOF
6528#define int32_t $ac_cv_c_int32_t
6529_ACEOF
6530;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006531esac
6532
Matthias Kloseb9621712010-04-24 17:59:49 +00006533ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6534case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006535 no|yes) ;; #(
6536 *)
6537
6538cat >>confdefs.h <<_ACEOF
6539#define int64_t $ac_cv_c_int64_t
6540_ACEOF
6541;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006542esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006543
Matthias Kloseb9621712010-04-24 17:59:49 +00006544ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006545if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006546
Matthias Kloseb9621712010-04-24 17:59:49 +00006547$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006548
6549fi
6550
Jack Jansendd19cf82001-12-06 22:36:17 +00006551
Michael W. Hudson54241132001-12-07 15:38:26 +00006552# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006553# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006554# The cast to long int works around a bug in the HP C Compiler
6555# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6556# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6557# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6559$as_echo_n "checking size of int... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006560if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006561 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006562else
Matthias Kloseb9621712010-04-24 17:59:49 +00006563 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 +00006564
Martin v. Löwis11437992002-04-12 09:54:03 +00006565else
Matthias Kloseb9621712010-04-24 17:59:49 +00006566 if test "$ac_cv_type_int" = yes; then
6567 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6568$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006569as_fn_error 77 "cannot compute sizeof (int)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006570See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006571 else
6572 ac_cv_sizeof_int=0
6573 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006575
Martin v. Löwis11437992002-04-12 09:54:03 +00006576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6578$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006579
6580
6581
Martin v. Löwis11437992002-04-12 09:54:03 +00006582cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006583#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006584_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006585
6586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006587# The cast to long int works around a bug in the HP C Compiler
6588# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6589# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6590# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6592$as_echo_n "checking size of long... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006593if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006594 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006595else
Matthias Kloseb9621712010-04-24 17:59:49 +00006596 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 +00006597
Martin v. Löwis11437992002-04-12 09:54:03 +00006598else
Matthias Kloseb9621712010-04-24 17:59:49 +00006599 if test "$ac_cv_type_long" = yes; then
6600 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006602as_fn_error 77 "cannot compute sizeof (long)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006603See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006604 else
6605 ac_cv_sizeof_long=0
6606 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006608
Martin v. Löwis11437992002-04-12 09:54:03 +00006609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6611$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006612
6613
6614
Martin v. Löwis11437992002-04-12 09:54:03 +00006615cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006616#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006617_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006618
6619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006620# The cast to long int works around a bug in the HP C Compiler
6621# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6622# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6623# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6625$as_echo_n "checking size of void *... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006626if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006627 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006628else
Matthias Kloseb9621712010-04-24 17:59:49 +00006629 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 +00006630
Martin v. Löwis11437992002-04-12 09:54:03 +00006631else
Matthias Kloseb9621712010-04-24 17:59:49 +00006632 if test "$ac_cv_type_void_p" = yes; then
6633 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6634$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006635as_fn_error 77 "cannot compute sizeof (void *)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006636See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006637 else
6638 ac_cv_sizeof_void_p=0
6639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006641
Martin v. Löwis11437992002-04-12 09:54:03 +00006642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6644$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006645
6646
6647
Martin v. Löwis11437992002-04-12 09:54:03 +00006648cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006649#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006650_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006651
6652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006653# The cast to long int works around a bug in the HP C Compiler
6654# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6655# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6656# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6658$as_echo_n "checking size of short... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006659if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006660 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006661else
Matthias Kloseb9621712010-04-24 17:59:49 +00006662 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 +00006663
Martin v. Löwis11437992002-04-12 09:54:03 +00006664else
Matthias Kloseb9621712010-04-24 17:59:49 +00006665 if test "$ac_cv_type_short" = yes; then
6666 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006668as_fn_error 77 "cannot compute sizeof (short)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006669See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006670 else
6671 ac_cv_sizeof_short=0
6672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006674
Martin v. Löwis11437992002-04-12 09:54:03 +00006675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6677$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006678
6679
6680
Martin v. Löwis11437992002-04-12 09:54:03 +00006681cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006682#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006683_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006684
6685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006686# The cast to long int works around a bug in the HP C Compiler
6687# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6688# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6689# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6691$as_echo_n "checking size of float... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006692if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006693 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006694else
Matthias Kloseb9621712010-04-24 17:59:49 +00006695 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 +00006696
Martin v. Löwis11437992002-04-12 09:54:03 +00006697else
Matthias Kloseb9621712010-04-24 17:59:49 +00006698 if test "$ac_cv_type_float" = yes; then
6699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6700$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006701as_fn_error 77 "cannot compute sizeof (float)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006702See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006703 else
6704 ac_cv_sizeof_float=0
6705 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006707
Martin v. Löwis11437992002-04-12 09:54:03 +00006708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6710$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006711
6712
6713
Martin v. Löwis11437992002-04-12 09:54:03 +00006714cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006715#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006716_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006717
6718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006719# The cast to long int works around a bug in the HP C Compiler
6720# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6721# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6722# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6724$as_echo_n "checking size of double... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006725if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006726 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006727else
Matthias Kloseb9621712010-04-24 17:59:49 +00006728 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 +00006729
Martin v. Löwis11437992002-04-12 09:54:03 +00006730else
Matthias Kloseb9621712010-04-24 17:59:49 +00006731 if test "$ac_cv_type_double" = yes; then
6732 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006734as_fn_error 77 "cannot compute sizeof (double)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006735See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006736 else
6737 ac_cv_sizeof_double=0
6738 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006740
Martin v. Löwis11437992002-04-12 09:54:03 +00006741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6743$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006744
6745
6746
Martin v. Löwis11437992002-04-12 09:54:03 +00006747cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006748#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006749_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006750
6751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006752# The cast to long int works around a bug in the HP C Compiler
6753# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6754# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6755# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6757$as_echo_n "checking size of fpos_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006758if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006759 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006760else
Matthias Kloseb9621712010-04-24 17:59:49 +00006761 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 +00006762
Martin v. Löwis11437992002-04-12 09:54:03 +00006763else
Matthias Kloseb9621712010-04-24 17:59:49 +00006764 if test "$ac_cv_type_fpos_t" = yes; then
6765 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006767as_fn_error 77 "cannot compute sizeof (fpos_t)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006768See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006769 else
6770 ac_cv_sizeof_fpos_t=0
6771 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006773
Martin v. Löwis11437992002-04-12 09:54:03 +00006774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6776$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006777
6778
6779
Martin v. Löwis11437992002-04-12 09:54:03 +00006780cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006781#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006782_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006783
Michael W. Hudson54241132001-12-07 15:38:26 +00006784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006785# The cast to long int works around a bug in the HP C Compiler
6786# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6787# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6788# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6790$as_echo_n "checking size of size_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006791if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006792 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006793else
Matthias Kloseb9621712010-04-24 17:59:49 +00006794 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 +00006795
Martin v. Löwis18e16552006-02-15 17:27:45 +00006796else
Matthias Kloseb9621712010-04-24 17:59:49 +00006797 if test "$ac_cv_type_size_t" = yes; then
6798 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6799$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006800as_fn_error 77 "cannot compute sizeof (size_t)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006801See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006802 else
6803 ac_cv_sizeof_size_t=0
6804 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006806
Martin v. Löwis18e16552006-02-15 17:27:45 +00006807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6809$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006810
6811
6812
Martin v. Löwis18e16552006-02-15 17:27:45 +00006813cat >>confdefs.h <<_ACEOF
6814#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6815_ACEOF
6816
6817
Christian Heimes400adb02008-02-01 08:12:03 +00006818# The cast to long int works around a bug in the HP C Compiler
6819# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6820# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6821# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6823$as_echo_n "checking size of pid_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006824if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006826else
Matthias Kloseb9621712010-04-24 17:59:49 +00006827 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 +00006828
Christian Heimes400adb02008-02-01 08:12:03 +00006829else
Matthias Kloseb9621712010-04-24 17:59:49 +00006830 if test "$ac_cv_type_pid_t" = yes; then
6831 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006833as_fn_error 77 "cannot compute sizeof (pid_t)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006834See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes400adb02008-02-01 08:12:03 +00006835 else
6836 ac_cv_sizeof_pid_t=0
6837 fi
6838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006839
Christian Heimes400adb02008-02-01 08:12:03 +00006840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6842$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006843
6844
6845
6846cat >>confdefs.h <<_ACEOF
6847#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6848_ACEOF
6849
6850
Michael W. Hudson54241132001-12-07 15:38:26 +00006851
Matthias Kloseb9621712010-04-24 17:59:49 +00006852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6853$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006854have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006856/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006857
Martin v. Löwis11437992002-04-12 09:54:03 +00006858int
6859main ()
6860{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006861long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006862 ;
6863 return 0;
6864}
6865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006866if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006867
6868
Matthias Kloseb9621712010-04-24 17:59:49 +00006869$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006870
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006871 have_long_long=yes
6872
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6876$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006877if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006878# The cast to long int works around a bug in the HP C Compiler
6879# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6880# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6881# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6883$as_echo_n "checking size of long long... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006884if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006885 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006886else
Matthias Kloseb9621712010-04-24 17:59:49 +00006887 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 +00006888
Martin v. Löwis11437992002-04-12 09:54:03 +00006889else
Matthias Kloseb9621712010-04-24 17:59:49 +00006890 if test "$ac_cv_type_long_long" = yes; then
6891 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006893as_fn_error 77 "cannot compute sizeof (long long)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006894See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006895 else
6896 ac_cv_sizeof_long_long=0
6897 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006899
Martin v. Löwis11437992002-04-12 09:54:03 +00006900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6902$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006903
6904
6905
Martin v. Löwis11437992002-04-12 09:54:03 +00006906cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006907#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006908_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006909
Michael W. Hudson54241132001-12-07 15:38:26 +00006910
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006911fi
6912
Matthias Kloseb9621712010-04-24 17:59:49 +00006913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6914$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006915have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006917/* end confdefs.h. */
6918
6919int
6920main ()
6921{
6922long double x; x = (long double)0;
6923 ;
6924 return 0;
6925}
6926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006927if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006928
6929
Matthias Kloseb9621712010-04-24 17:59:49 +00006930$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006931
6932 have_long_double=yes
6933
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006934fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6937$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006938if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006939# The cast to long int works around a bug in the HP C Compiler
6940# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6941# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6942# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6944$as_echo_n "checking size of long double... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006945if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006946 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006947else
Matthias Kloseb9621712010-04-24 17:59:49 +00006948 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 +00006949
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006950else
Matthias Kloseb9621712010-04-24 17:59:49 +00006951 if test "$ac_cv_type_long_double" = yes; then
6952 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006954as_fn_error 77 "cannot compute sizeof (long double)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006955See \`config.log' for more details" "$LINENO" 5 ; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006956 else
6957 ac_cv_sizeof_long_double=0
6958 fi
6959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006960
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6963$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006964
6965
6966
6967cat >>confdefs.h <<_ACEOF
6968#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6969_ACEOF
6970
6971
6972fi
6973
6974
Matthias Kloseb9621712010-04-24 17:59:49 +00006975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6976$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006977have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006979/* end confdefs.h. */
6980
6981int
6982main ()
6983{
6984_Bool x; x = (_Bool)0;
6985 ;
6986 return 0;
6987}
6988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006989if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00006990
6991
Matthias Kloseb9621712010-04-24 17:59:49 +00006992$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00006993
6994 have_c99_bool=yes
6995
Thomas Woutersb2137042007-02-01 18:02:27 +00006996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
6999$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007000if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007001# The cast to long int works around a bug in the HP C Compiler
7002# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7003# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7004# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7006$as_echo_n "checking size of _Bool... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007007if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007008 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007009else
Matthias Kloseb9621712010-04-24 17:59:49 +00007010 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 +00007011
Thomas Woutersb2137042007-02-01 18:02:27 +00007012else
Matthias Kloseb9621712010-04-24 17:59:49 +00007013 if test "$ac_cv_type__Bool" = yes; then
7014 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7015$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007016as_fn_error 77 "cannot compute sizeof (_Bool)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007017See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007018 else
7019 ac_cv_sizeof__Bool=0
7020 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007022
Thomas Woutersb2137042007-02-01 18:02:27 +00007023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7025$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007026
7027
7028
Thomas Woutersb2137042007-02-01 18:02:27 +00007029cat >>confdefs.h <<_ACEOF
7030#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7031_ACEOF
7032
7033
7034fi
7035
Matthias Kloseb9621712010-04-24 17:59:49 +00007036ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007037 #include <stdint.h>
7038 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007039 #ifdef HAVE_INTTYPES_H
7040 #include <inttypes.h>
7041 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007042"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007043if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007044
7045cat >>confdefs.h <<_ACEOF
7046#define HAVE_UINTPTR_T 1
7047_ACEOF
7048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007049# The cast to long int works around a bug in the HP C Compiler
7050# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7051# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7052# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7054$as_echo_n "checking size of uintptr_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007055if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007056 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007057else
Matthias Kloseb9621712010-04-24 17:59:49 +00007058 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 +00007059
Martin v. Löwis11437992002-04-12 09:54:03 +00007060else
Matthias Kloseb9621712010-04-24 17:59:49 +00007061 if test "$ac_cv_type_uintptr_t" = yes; then
7062 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7063$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007064as_fn_error 77 "cannot compute sizeof (uintptr_t)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007065See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007066 else
7067 ac_cv_sizeof_uintptr_t=0
7068 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007070
Martin v. Löwis11437992002-04-12 09:54:03 +00007071fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7073$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007074
7075
7076
Martin v. Löwis11437992002-04-12 09:54:03 +00007077cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007078#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007079_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007080
Michael W. Hudson54241132001-12-07 15:38:26 +00007081
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007082fi
7083
Thomas Wouters89f507f2006-12-13 04:49:30 +00007084
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007085# The cast to long int works around a bug in the HP C Compiler
7086# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7087# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7088# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7090$as_echo_n "checking size of off_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007091if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007092 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007093else
Matthias Kloseb9621712010-04-24 17:59:49 +00007094 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007095#ifdef HAVE_SYS_TYPES_H
7096#include <sys/types.h>
7097#endif
7098
Matthias Kloseb9621712010-04-24 17:59:49 +00007099"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007100
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007101else
Matthias Kloseb9621712010-04-24 17:59:49 +00007102 if test "$ac_cv_type_off_t" = yes; then
7103 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7104$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007105as_fn_error 77 "cannot compute sizeof (off_t)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007106See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007107 else
7108 ac_cv_sizeof_off_t=0
7109 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007110fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007111
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7114$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007115
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007116
7117
Martin v. Löwis11437992002-04-12 09:54:03 +00007118cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007119#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007120_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007121
Michael W. Hudson54241132001-12-07 15:38:26 +00007122
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007123
Matthias Kloseb9621712010-04-24 17:59:49 +00007124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7125$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007126if test "$have_long_long" = yes
7127then
7128if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007129 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007130
Matthias Kloseb9621712010-04-24 17:59:49 +00007131$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007132
Matthias Kloseb9621712010-04-24 17:59:49 +00007133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7134$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007135else
Matthias Kloseb9621712010-04-24 17:59:49 +00007136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7137$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007138fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007139else
Matthias Kloseb9621712010-04-24 17:59:49 +00007140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7141$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007142fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007143
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007144# The cast to long int works around a bug in the HP C Compiler
7145# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7146# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7147# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7149$as_echo_n "checking size of time_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007150if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007151 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007152else
Matthias Kloseb9621712010-04-24 17:59:49 +00007153 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007154#ifdef HAVE_SYS_TYPES_H
7155#include <sys/types.h>
7156#endif
7157#ifdef HAVE_TIME_H
7158#include <time.h>
7159#endif
7160
Matthias Kloseb9621712010-04-24 17:59:49 +00007161"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007162
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007163else
Matthias Kloseb9621712010-04-24 17:59:49 +00007164 if test "$ac_cv_type_time_t" = yes; then
7165 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7166$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007167as_fn_error 77 "cannot compute sizeof (time_t)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007168See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007169 else
7170 ac_cv_sizeof_time_t=0
7171 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007173
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7176$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007177
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007178
7179
Martin v. Löwis11437992002-04-12 09:54:03 +00007180cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007181#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007182_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007183
Michael W. Hudson54241132001-12-07 15:38:26 +00007184
7185
Trent Mick635f6fb2000-08-23 21:33:05 +00007186# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007187ac_save_cc="$CC"
7188if test "$ac_cv_kpthread" = "yes"
7189then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007190elif test "$ac_cv_kthread" = "yes"
7191then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007192elif test "$ac_cv_pthread" = "yes"
7193then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007194fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007195
Matthias Kloseb9621712010-04-24 17:59:49 +00007196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7197$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007198have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007200/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007201
7202 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007203int
7204main ()
7205{
Guido van Rossum12580492000-09-24 16:47:19 +00007206pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007207 ;
7208 return 0;
7209}
Matthias Kloseb159a552010-04-25 21:00:44 +00007210
Martin v. Löwis11437992002-04-12 09:54:03 +00007211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007212if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007213 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7217$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007218if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007219 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007220# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7221# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7222# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7224$as_echo_n "checking size of pthread_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007225if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007226 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007227else
Matthias Kloseb9621712010-04-24 17:59:49 +00007228 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007229#ifdef HAVE_PTHREAD_H
7230#include <pthread.h>
7231#endif
7232
Matthias Kloseb9621712010-04-24 17:59:49 +00007233"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007234
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007235else
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 if test "$ac_cv_type_pthread_t" = yes; then
7237 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007239as_fn_error 77 "cannot compute sizeof (pthread_t)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007240See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007241 else
7242 ac_cv_sizeof_pthread_t=0
7243 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007245
Trent Mick635f6fb2000-08-23 21:33:05 +00007246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7248$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007249
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007250
7251
Martin v. Löwis11437992002-04-12 09:54:03 +00007252cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007253#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007254_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007255
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007256
Trent Mick635f6fb2000-08-23 21:33:05 +00007257fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007258CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007259
Michael W. Hudson54241132001-12-07 15:38:26 +00007260
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007261case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007262 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007263 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7264 ;;
7265 Darwin/*)
7266 OTHER_LIBTOOL_OPT=""
7267 ;;
7268esac
7269
7270
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007271ARCH_RUN_32BIT=""
7272
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007273case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007274 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007275 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7276 if test "${enable_universalsdk}"; then
7277 :
7278 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007279 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007280 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007281 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007282 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007283 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007284 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007285 if test ${gcc_version} '<' 4.0
7286 then
7287 LIBTOOL_CRUFT="-lcc_dynamic"
7288 else
7289 LIBTOOL_CRUFT=""
7290 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007291 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007292 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007293else
Matthias Kloseb9621712010-04-24 17:59:49 +00007294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007295/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007296
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007297 #include <unistd.h>
7298 int main(int argc, char*argv[])
7299 {
7300 if (sizeof(long) == 4) {
7301 return 0;
7302 } else {
7303 return 1;
7304 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007305 }
7306
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007308if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007309 ac_osx_32bit=yes
7310else
Matthias Kloseb9621712010-04-24 17:59:49 +00007311 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7314 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007315fi
7316
7317
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007318 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007319 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007320 i386)
7321 MACOSX_DEFAULT_ARCH="i386"
7322 ;;
7323 ppc)
7324 MACOSX_DEFAULT_ARCH="ppc"
7325 ;;
7326 *)
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007327 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007328 ;;
7329 esac
7330 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007331 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007332 i386)
7333 MACOSX_DEFAULT_ARCH="x86_64"
7334 ;;
7335 ppc)
7336 MACOSX_DEFAULT_ARCH="ppc64"
7337 ;;
7338 *)
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007339 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007340 ;;
7341 esac
7342
7343 #ARCH_RUN_32BIT="true"
7344 fi
7345
7346 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007347 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007348 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007349esac
7350
Matthias Kloseb9621712010-04-24 17:59:49 +00007351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7352$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007353if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007354then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007355 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007356 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007357 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007358
Matthias Kloseb9621712010-04-24 17:59:49 +00007359$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007360
Matthias Kloseb9621712010-04-24 17:59:49 +00007361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7362$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007363 if test $enable_shared = "yes"
7364 then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007365 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 +00007366 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007367else
Matthias Kloseb9621712010-04-24 17:59:49 +00007368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7369$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007370fi
7371
Matthias Kloseb9621712010-04-24 17:59:49 +00007372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7373$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007374case $ac_sys_system/$ac_sys_release in
7375 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007376
Matthias Kloseb9621712010-04-24 17:59:49 +00007377$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007378
Matthias Kloseb9621712010-04-24 17:59:49 +00007379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7380$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007381 ;;
7382 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7384$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007385 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007386esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007387
Guido van Rossum0a516c91994-09-12 10:58:40 +00007388# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007389
Michael W. Hudson54241132001-12-07 15:38:26 +00007390
7391
7392
7393
Benjamin Peterson99f03762010-04-11 22:15:28 +00007394
Thomas Wouters477c8d52006-05-27 19:21:47 +00007395
Georg Brandlb1441c72009-01-03 22:33:39 +00007396
Thomas Wouters477c8d52006-05-27 19:21:47 +00007397cat >>confdefs.h <<_ACEOF
7398#define SHLIB_EXT "$SO"
7399_ACEOF
7400
Guido van Rossum0a516c91994-09-12 10:58:40 +00007401# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007402# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007403# (Shared libraries in this instance are shared modules to be loaded into
7404# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7406$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007407if test -z "$LDSHARED"
7408then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007409 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007410 AIX*)
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00007411 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp -L\$(srcdir)"
Guido van Rossumce608b02001-09-28 15:59:38 +00007412 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007413 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007414 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007415 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007416 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007417 if test "$GCC" = "yes" ; then
7418 LDSHARED='$(CC) -shared'
7419 LDCXXSHARED='$(CXX) -shared'
7420 else
7421 LDSHARED='$(CC) -G'
7422 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007423 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007424 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007425 if test "$GCC" = "yes" ; then
7426 LDSHARED='$(CC) -shared'
7427 LDCXXSHARED='$(CXX) -shared'
7428 else
7429 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007430 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007431 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007432 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007433 LDSHARED='$(CC) -bundle'
7434 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007435 if test "$enable_framework" ; then
7436 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007437 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7438 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007439 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007440 else
7441 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007442 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007443 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007444 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007445 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007446 LDSHARED='$(CC) -bundle'
7447 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007448 if test "$enable_framework" ; then
7449 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007450 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7451 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007452 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007453 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007454 # No framework, use the Python app as bundle-loader
7455 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007456 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007457 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007458 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007459 Darwin/*)
7460 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7461 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007462
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007463 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007464 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007465 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007466 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007467 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007468 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7469 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007470 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007471 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007472 LDSHARED='$(CC) -bundle'
7473 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007474 if test "$enable_framework" ; then
7475 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007476 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7477 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007478 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007479 else
7480 # No framework, use the Python app as bundle-loader
7481 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7482 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007483 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007484 fi
7485 fi
7486 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007487 Linux*|GNU*|QNX*)
7488 LDSHARED='$(CC) -shared'
7489 LDCXXSHARED='$(CXX) -shared';;
7490 BSD/OS*/4*)
7491 LDSHARED="gcc -shared"
7492 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007493 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007494 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007495 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007496 LDSHARED='$(CC) -shared'
7497 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007498 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007499 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007500 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007501 OpenBSD*)
7502 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7503 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007504 LDSHARED='$(CC) -shared $(CCSHARED)'
7505 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007506 else
7507 case `uname -r` in
7508 [01].* | 2.[0-7] | 2.[0-7].*)
7509 LDSHARED="ld -Bshareable ${LDFLAGS}"
7510 ;;
7511 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007512 LDSHARED='$(CC) -shared $(CCSHARED)'
7513 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007514 ;;
7515 esac
7516 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007517 NetBSD*|DragonFly*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007518 LDSHARED="cc -shared"
7519 LDCXXSHARED="c++ -shared";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007520 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007521 if test "$GCC" = "yes" ; then
7522 LDSHARED='$(CC) -shared'
7523 LDCXXSHARED='$(CXX) -shared'
7524 else
7525 LDSHARED='$(CC) -G'
7526 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007527 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007528 SCO_SV*)
7529 LDSHARED='$(CC) -Wl,-G,-Bexport'
7530 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7531 CYGWIN*)
7532 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7533 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007534 *) LDSHARED="ld";;
7535 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007536fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7538$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007539LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007540BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007541# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007542# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7544$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007545if test -z "$CCSHARED"
7546then
Guido van Rossum07397971997-04-29 21:49:50 +00007547 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007548 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007549 then CCSHARED="-fPIC";
7550 elif test `uname -p` = sparc;
7551 then CCSHARED="-xcode=pic32";
7552 else CCSHARED="-Kpic";
7553 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007554 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007555 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007556 else CCSHARED="+z";
7557 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007558 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007559 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007560 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007561 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007562 if test "$GCC" = "yes"
7563 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007564 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007565 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007566 SCO_SV*)
7567 if test "$GCC" = "yes"
7568 then CCSHARED="-fPIC"
7569 else CCSHARED="-Kpic -belf"
7570 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007571 IRIX*/6*) case $CC in
7572 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007573 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007574 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007575 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7578$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007579# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007580# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7582$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007583if test -z "$LINKFORSHARED"
7584then
Guido van Rossum07397971997-04-29 21:49:50 +00007585 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007586 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007587 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007588 LINKFORSHARED="-Wl,-E -Wl,+s";;
7589# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007590 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007591 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007592 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007593 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007594 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007595 if test "$enable_framework"
7596 then
Jack Jansenda49e192005-01-07 13:08:22 +00007597 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007598 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007599 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007600 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007601 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007602 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007603 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007604 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7605 then
7606 LINKFORSHARED="-Wl,--export-dynamic"
7607 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007608 SunOS/5*) case $CC in
7609 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007610 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007611 then
7612 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007613 fi;;
7614 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007615 CYGWIN*)
7616 if test $enable_shared = "no"
7617 then
7618 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7619 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007620 QNX*)
7621 # -Wl,-E causes the symbols to be added to the dynamic
7622 # symbol table so that they can be found when a module
7623 # is loaded. -N 2048K causes the stack size to be set
7624 # to 2048 kilobytes so that the stack doesn't overflow
7625 # when running test_compile.py.
7626 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007627 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7630$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007631
Michael W. Hudson54241132001-12-07 15:38:26 +00007632
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007633
Matthias Kloseb9621712010-04-24 17:59:49 +00007634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7635$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007636if test ! "$LIBRARY" = "$LDLIBRARY"
7637then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007638 case $ac_sys_system in
7639 CYGWIN*)
7640 # Cygwin needs CCSHARED when building extension DLLs
7641 # but not when building the interpreter DLL.
7642 CFLAGSFORSHARED='';;
7643 *)
7644 CFLAGSFORSHARED='$(CCSHARED)'
7645 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7648$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007649
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007650# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7651# library (with --enable-shared).
7652# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007653# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7654# if it is not required, since it creates a dependency of the shared library
7655# to LIBS. This, in turn, means that applications linking the shared libpython
7656# don't need to link LIBS explicitly. The default should be only changed
7657# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007658
Matthias Kloseb9621712010-04-24 17:59:49 +00007659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7660$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007661case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007662 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007663 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007664esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7666$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007667
7668
Guido van Rossum627b2d71993-12-24 10:39:16 +00007669# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7671$as_echo_n "checking for dlopen in -ldl... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007672if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007673 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007674else
Martin v. Löwis11437992002-04-12 09:54:03 +00007675 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007676LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007680/* Override any GCC internal prototype to avoid an error.
7681 Use char because int might match the return type of a GCC
7682 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007683#ifdef __cplusplus
7684extern "C"
7685#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007686char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007687int
7688main ()
7689{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007690return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007691 ;
7692 return 0;
7693}
7694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007695if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007696 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007697else
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007700rm -f core conftest.err conftest.$ac_objext \
7701 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007702LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7705$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007706if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007707 cat >>confdefs.h <<_ACEOF
7708#define HAVE_LIBDL 1
7709_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007710
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007711 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007712
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007713fi
7714 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7716$as_echo_n "checking for shl_load in -ldld... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007717if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007718 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007719else
Martin v. Löwis11437992002-04-12 09:54:03 +00007720 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007721LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007725/* Override any GCC internal prototype to avoid an error.
7726 Use char because int might match the return type of a GCC
7727 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007728#ifdef __cplusplus
7729extern "C"
7730#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007731char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007732int
7733main ()
7734{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007735return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007736 ;
7737 return 0;
7738}
7739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007740if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007741 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007742else
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007745rm -f core conftest.err conftest.$ac_objext \
7746 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007747LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7750$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007751if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007752 cat >>confdefs.h <<_ACEOF
7753#define HAVE_LIBDLD 1
7754_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007755
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007756 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007757
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007758fi
7759 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007760
Georg Brandlb1441c72009-01-03 22:33:39 +00007761# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007762if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7764$as_echo_n "checking for library containing sem_init... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007765if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007766 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007767else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007768 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007771
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007772/* Override any GCC internal prototype to avoid an error.
7773 Use char because int might match the return type of a GCC
7774 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007775#ifdef __cplusplus
7776extern "C"
7777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007778char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007779int
7780main ()
7781{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007782return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007783 ;
7784 return 0;
7785}
7786_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007787for ac_lib in '' pthread rt posix4; do
7788 if test -z "$ac_lib"; then
7789 ac_res="none required"
7790 else
7791 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007792 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007794 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007797rm -f core conftest.err conftest.$ac_objext \
7798 conftest$ac_exeext
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007799 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802done
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007803if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805else
7806 ac_cv_search_sem_init=no
7807fi
7808rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007809LIBS=$ac_func_search_save_LIBS
7810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7812$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007814if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007815 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007816
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007817fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007818 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007819 # posix4 on Solaris 2.6
7820 # pthread (first!) on Linux
7821fi
7822
Martin v. Löwis19d17342003-06-14 21:03:05 +00007823# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7825$as_echo_n "checking for textdomain in -lintl... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007826if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007827 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007828else
7829 ac_check_lib_save_LIBS=$LIBS
7830LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007832/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834/* Override any GCC internal prototype to avoid an error.
7835 Use char because int might match the return type of a GCC
7836 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007837#ifdef __cplusplus
7838extern "C"
7839#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007840char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007841int
7842main ()
7843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007845 ;
7846 return 0;
7847}
7848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007849if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007850 ac_cv_lib_intl_textdomain=yes
7851else
Matthias Kloseb9621712010-04-24 17:59:49 +00007852 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007854rm -f core conftest.err conftest.$ac_objext \
7855 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007856LIBS=$ac_check_lib_save_LIBS
7857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7859$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007860if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007861
Matthias Kloseb9621712010-04-24 17:59:49 +00007862$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007863
Brett Cannonc6d936e2009-06-07 20:09:53 +00007864 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007865fi
7866
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007867
7868# checks for system dependent C++ extensions support
7869case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7871$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007873/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007874
7875 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007876int
7877main ()
7878{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007879loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007880 ;
7881 return 0;
7882}
Matthias Kloseb159a552010-04-25 21:00:44 +00007883
Martin v. Löwis11437992002-04-12 09:54:03 +00007884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007885if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007886
Matthias Kloseb159a552010-04-25 21:00:44 +00007887
Matthias Kloseb9621712010-04-24 17:59:49 +00007888$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007889
Matthias Kloseb159a552010-04-25 21:00:44 +00007890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007891$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007892
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007893else
Matthias Kloseb159a552010-04-25 21:00:44 +00007894
7895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007896$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007897
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007899rm -f core conftest.err conftest.$ac_objext \
7900 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007901 *) ;;
7902esac
7903
Guido van Rossum70c7f481998-03-26 18:44:10 +00007904# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7906$as_echo_n "checking for t_open in -lnsl... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007907if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007908 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007909else
Martin v. Löwis11437992002-04-12 09:54:03 +00007910 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007911LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007915/* Override any GCC internal prototype to avoid an error.
7916 Use char because int might match the return type of a GCC
7917 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007918#ifdef __cplusplus
7919extern "C"
7920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007921char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007922int
7923main ()
7924{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007925return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007926 ;
7927 return 0;
7928}
7929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007930if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007931 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007932else
Matthias Kloseb9621712010-04-24 17:59:49 +00007933 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007935rm -f core conftest.err conftest.$ac_objext \
7936 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007937LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7940$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007941if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007942 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007943fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007944 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7946$as_echo_n "checking for socket in -lsocket... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007947if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007948 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007949else
Martin v. Löwis11437992002-04-12 09:54:03 +00007950 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007951LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007954
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007955/* Override any GCC internal prototype to avoid an error.
7956 Use char because int might match the return type of a GCC
7957 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007958#ifdef __cplusplus
7959extern "C"
7960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007961char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007962int
7963main ()
7964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007965return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007966 ;
7967 return 0;
7968}
7969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007970if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007971 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007972else
Matthias Kloseb9621712010-04-24 17:59:49 +00007973 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007975rm -f core conftest.err conftest.$ac_objext \
7976 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007977LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
7980$as_echo "$ac_cv_lib_socket_socket" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007981if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00007982 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00007983fi
7984 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00007985
Matthias Kloseb9621712010-04-24 17:59:49 +00007986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
7987$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00007990if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00007992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
7993$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00007994LIBS="$withval $LIBS"
7995
7996else
Matthias Kloseb9621712010-04-24 17:59:49 +00007997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7998$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999fi
8000
Guido van Rossum7f43da71994-08-01 12:15:30 +00008001
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008002if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008003 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8004set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8006$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008007if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008008 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008009else
8010 case $PKG_CONFIG in
8011 [\\/]* | ?:[\\/]*)
8012 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8013 ;;
8014 *)
8015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8016for as_dir in $PATH
8017do
8018 IFS=$as_save_IFS
8019 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008020 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008021 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8022 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008024 break 2
8025 fi
8026done
Matthias Kloseb9621712010-04-24 17:59:49 +00008027 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008028IFS=$as_save_IFS
8029
8030 ;;
8031esac
8032fi
8033PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8034if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8036$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008037else
Matthias Kloseb9621712010-04-24 17:59:49 +00008038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8039$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008040fi
8041
8042
8043fi
8044if test -z "$ac_cv_path_PKG_CONFIG"; then
8045 ac_pt_PKG_CONFIG=$PKG_CONFIG
8046 # Extract the first word of "pkg-config", so it can be a program name with args.
8047set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8049$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008050if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008052else
8053 case $ac_pt_PKG_CONFIG in
8054 [\\/]* | ?:[\\/]*)
8055 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8056 ;;
8057 *)
8058 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8059for as_dir in $PATH
8060do
8061 IFS=$as_save_IFS
8062 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008063 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008064 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8065 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008066 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008067 break 2
8068 fi
8069done
Matthias Kloseb9621712010-04-24 17:59:49 +00008070 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008071IFS=$as_save_IFS
8072
8073 ;;
8074esac
8075fi
8076ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8077if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8079$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008080else
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8082$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008083fi
8084
8085 if test "x$ac_pt_PKG_CONFIG" = x; then
8086 PKG_CONFIG=""
8087 else
8088 case $cross_compiling:$ac_tool_warned in
8089yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008090{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8091$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008092ac_tool_warned=yes ;;
8093esac
8094 PKG_CONFIG=$ac_pt_PKG_CONFIG
8095 fi
8096else
8097 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8098fi
8099
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008100
8101# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8103$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008104
8105# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008106if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008107 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008108else
8109 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008110fi
8111
8112
Matthias Kloseb9621712010-04-24 17:59:49 +00008113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8114$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008115
8116# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8118$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008119
8120# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008121if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008122 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008123else
8124 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008125fi
8126
8127
8128if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008129 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8130else
8131 LIBFFI_INCLUDEDIR=""
8132fi
8133
8134
Matthias Kloseb9621712010-04-24 17:59:49 +00008135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8136$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008137
Benjamin Peterson076ed002010-10-31 17:11:02 +00008138# Check for support for loadable sqlite extensions
8139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8140$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8141# Check whether --enable-loadable-sqlite-extensions was given.
8142if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8143 enableval=$enable_loadable_sqlite_extensions;
8144else
8145 enable_loadable_sqlite_extensions="no"
8146fi
8147
8148
8149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8150$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8151
Matthias Klose55708cc2009-04-30 08:06:49 +00008152# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8154$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008155
8156# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008157if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008158 withval=$with_dbmliborder;
8159if test x$with_dbmliborder = xyes
8160then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008161as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008162else
8163 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8164 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8165 then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008166 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008167 fi
8168 done
8169fi
8170fi
8171
Matthias Kloseb9621712010-04-24 17:59:49 +00008172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8173$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008174
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008175# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008176
8177
Matthias Kloseb9621712010-04-24 17:59:49 +00008178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8179$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008180
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008181# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008182if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008183 withval=$with_signal_module;
8184fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008185
8186
8187if test -z "$with_signal_module"
8188then with_signal_module="yes"
8189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8191$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008192
8193if test "${with_signal_module}" = "yes"; then
8194 USE_SIGNAL_MODULE=""
8195 SIGNAL_OBJS=""
8196else
8197 USE_SIGNAL_MODULE="#"
8198 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8199fi
8200
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008201# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008202
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008203USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008204
Matthias Kloseb9621712010-04-24 17:59:49 +00008205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8206$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008207
Guido van Rossumec2f0731997-01-22 20:54:01 +00008208
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008210if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008211 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8213$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008214LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008215if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008216 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008217fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008218else
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8220$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008221fi
8222
Martin v. Löwis11437992002-04-12 09:54:03 +00008223
8224# Templates for things AC_DEFINEd more than once.
8225# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008226
8227
Martin v. Löwis11437992002-04-12 09:54:03 +00008228
8229
Matthias Kloseb9621712010-04-24 17:59:49 +00008230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8231$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008233# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008234if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235 withval=$with_threads;
8236fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008237
8238
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008239# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008241# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008242if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008243 withval=$with_thread; with_threads=$with_thread
8244fi
8245
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008246
8247if test -z "$with_threads"
8248then with_threads="yes"
8249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8251$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008252
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008253
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008254if test "$with_threads" = "no"
8255then
8256 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008257elif test "$ac_cv_pthread_is_default" = yes
8258then
Matthias Kloseb9621712010-04-24 17:59:49 +00008259 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008260
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008261 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008262 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008263
8264 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008265 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008266elif test "$ac_cv_kpthread" = "yes"
8267then
8268 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008269 if test "$ac_cv_cxx_thread" = "yes"; then
8270 CXX="$CXX -Kpthread"
8271 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008272 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008273
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008274 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008275 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008276elif test "$ac_cv_kthread" = "yes"
8277then
8278 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008279 if test "$ac_cv_cxx_thread" = "yes"; then
8280 CXX="$CXX -Kthread"
8281 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008282 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008283
8284 posix_threads=yes
8285 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008286elif test "$ac_cv_pthread" = "yes"
8287then
8288 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008289 if test "$ac_cv_cxx_thread" = "yes"; then
8290 CXX="$CXX -pthread"
8291 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008292 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008293
8294 posix_threads=yes
8295 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008296else
8297 if test ! -z "$with_threads" -a -d "$with_threads"
8298 then LDFLAGS="$LDFLAGS -L$with_threads"
8299 fi
8300 if test ! -z "$withval" -a -d "$withval"
8301 then LDFLAGS="$LDFLAGS -L$withval"
8302 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008303
8304 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008305 # define _POSIX_THREADS in unistd.h. Some apparently don't
8306 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8308$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008310/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008311
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008312#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008313#ifdef _POSIX_THREADS
8314yes
8315#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008316
8317_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008318if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008319 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008320 unistd_defines_pthreads=yes
8321else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008322 unistd_defines_pthreads=no
8323fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008324rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008325
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8327$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008328
Matthias Kloseb9621712010-04-24 17:59:49 +00008329 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008330
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008332if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008333 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008334
Matthias Kloseb9621712010-04-24 17:59:49 +00008335 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008336
Martin v. Löwis11437992002-04-12 09:54:03 +00008337
Matthias Kloseb9621712010-04-24 17:59:49 +00008338$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008339
8340 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008341 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008342else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008343
Matthias Kloseb9621712010-04-24 17:59:49 +00008344 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008345if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008346 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008347
Matthias Kloseb9621712010-04-24 17:59:49 +00008348 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008349
Martin v. Löwis11437992002-04-12 09:54:03 +00008350
Matthias Kloseb9621712010-04-24 17:59:49 +00008351$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008352
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008353 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008354else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008355
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008356 # Just looking for pthread_create in libpthread is not enough:
8357 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8358 # So we really have to include pthread.h, and then link.
8359 _libs=$LIBS
8360 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8362$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008364/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008365#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008366
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008367void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008368int
8369main ()
8370{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008371
8372pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008373 ;
8374 return 0;
8375}
8376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008377if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008378
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8380$as_echo "yes" >&6; }
8381 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008382
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008383 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008384 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008385else
Martin v. Löwis11437992002-04-12 09:54:03 +00008386
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008387 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008389if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008390 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008391
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008392 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008393 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008394else
Guido van Rossumad678af1998-10-02 14:42:15 +00008395
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8397$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008398if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008399 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008400else
Martin v. Löwis11437992002-04-12 09:54:03 +00008401 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008402LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008405
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008406/* Override any GCC internal prototype to avoid an error.
8407 Use char because int might match the return type of a GCC
8408 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008409#ifdef __cplusplus
8410extern "C"
8411#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008412char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008413int
8414main ()
8415{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008416return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008417 ;
8418 return 0;
8419}
8420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008421if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008422 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008423else
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008426rm -f core conftest.err conftest.$ac_objext \
8427 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008428LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8431$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008432if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008433 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008434
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008435 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008436 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008437 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008438else
Greg Steinadf63d62000-07-05 10:38:09 +00008439
Matthias Kloseb9621712010-04-24 17:59:49 +00008440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8441$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008442if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008443 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008444else
Martin v. Löwis11437992002-04-12 09:54:03 +00008445 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008446LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008450/* Override any GCC internal prototype to avoid an error.
8451 Use char because int might match the return type of a GCC
8452 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008453#ifdef __cplusplus
8454extern "C"
8455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008456char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008457int
8458main ()
8459{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008461 ;
8462 return 0;
8463}
8464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008465if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008466 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008467else
Matthias Kloseb9621712010-04-24 17:59:49 +00008468 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008470rm -f core conftest.err conftest.$ac_objext \
8471 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008472LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8475$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008476if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008478
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008479 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008480 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008481 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008482else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008483
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8485$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008486if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008488else
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008490LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494/* Override any GCC internal prototype to avoid an error.
8495 Use char because int might match the return type of a GCC
8496 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008497#ifdef __cplusplus
8498extern "C"
8499#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008500char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008501int
8502main ()
8503{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008504return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 ;
8506 return 0;
8507}
8508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008509if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008510 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008511else
Matthias Kloseb9621712010-04-24 17:59:49 +00008512 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008514rm -f core conftest.err conftest.$ac_objext \
8515 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008516LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8519$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008520if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008522
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008523 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008524 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008525 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008526else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008527
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8529$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008530if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008531 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008532else
Martin v. Löwis11437992002-04-12 09:54:03 +00008533 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008534LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008537
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538/* Override any GCC internal prototype to avoid an error.
8539 Use char because int might match the return type of a GCC
8540 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008541#ifdef __cplusplus
8542extern "C"
8543#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008544char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008545int
8546main ()
8547{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008549 ;
8550 return 0;
8551}
8552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008553if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008555else
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008558rm -f core conftest.err conftest.$ac_objext \
8559 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008560LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8563$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008564if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008566
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008567 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008568 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008569 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008570else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008571
Martin v. Löwis130fb172001-07-19 11:00:41 +00008572 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008573fi
8574
Guido van Rossum627b2d71993-12-24 10:39:16 +00008575
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008576fi
8577
Guido van Rossum0be3e491997-05-22 20:33:33 +00008578fi
8579
Guido van Rossum49545951997-12-02 19:28:29 +00008580fi
8581
Guido van Rossumb93a8621998-05-07 13:27:32 +00008582fi
8583
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008585rm -f core conftest.err conftest.$ac_objext \
8586 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008587fi
8588
Martin v. Löwis11437992002-04-12 09:54:03 +00008589
8590fi
8591
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008592
Michael W. Hudson54241132001-12-07 15:38:26 +00008593
Matthias Kloseb9621712010-04-24 17:59:49 +00008594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8595$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008596if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008597 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008598else
Martin v. Löwis11437992002-04-12 09:54:03 +00008599 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008600LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604/* Override any GCC internal prototype to avoid an error.
8605 Use char because int might match the return type of a GCC
8606 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008607#ifdef __cplusplus
8608extern "C"
8609#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008610char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008611int
8612main ()
8613{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 ;
8616 return 0;
8617}
8618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008619if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008620 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008621else
Matthias Kloseb9621712010-04-24 17:59:49 +00008622 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008624rm -f core conftest.err conftest.$ac_objext \
8625 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008626LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8629$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008630if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008632
Martin v. Löwis130fb172001-07-19 11:00:41 +00008633 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008634 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008635 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008636fi
8637
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008638
Neal Norwitza978ab02002-11-02 16:58:05 +00008639 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8641$as_echo_n "checking for thr_create in -lthread... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008642if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008644else
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008646LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650/* Override any GCC internal prototype to avoid an error.
8651 Use char because int might match the return type of a GCC
8652 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008653#ifdef __cplusplus
8654extern "C"
8655#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008656char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008657int
8658main ()
8659{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 ;
8662 return 0;
8663}
8664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008665if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008666 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008667else
Matthias Kloseb9621712010-04-24 17:59:49 +00008668 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008670rm -f core conftest.err conftest.$ac_objext \
8671 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008672LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8675$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008676if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008678
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008679 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008680 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008681 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008682fi
8683
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008684 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008685
Martin v. Löwis130fb172001-07-19 11:00:41 +00008686 if test "$USE_THREAD_MODULE" != "#"
8687 then
8688 # If the above checks didn't disable threads, (at least) OSF1
8689 # needs this '-threads' argument during linking.
8690 case $ac_sys_system in
8691 OSF1) LDLAST=-threads;;
8692 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008693 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008694fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008695
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008696if test "$posix_threads" = "yes"; then
8697 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008698
Matthias Kloseb9621712010-04-24 17:59:49 +00008699$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008700
8701 fi
8702
8703 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8704 case $ac_sys_system/$ac_sys_release in
8705 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008706$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008707
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008708 ;;
8709 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008710$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008711
8712 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008713 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008714$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008715
8716 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008717 AIX/6)
8718$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8719
8720 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008721 esac
8722
Matthias Kloseb9621712010-04-24 17:59:49 +00008723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8724$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008725 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008727else
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008729 ac_cv_pthread_system_supported=no
8730else
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008732/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008733#include <pthread.h>
8734 void *foo(void *parm) {
8735 return NULL;
8736 }
8737 main() {
8738 pthread_attr_t attr;
8739 pthread_t id;
8740 if (pthread_attr_init(&attr)) exit(-1);
8741 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8742 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8743 exit(0);
8744 }
8745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008746if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008747 ac_cv_pthread_system_supported=yes
8748else
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8752 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008753fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008755
Guido van Rossum627b2d71993-12-24 10:39:16 +00008756fi
8757
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8759$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008760 if test "$ac_cv_pthread_system_supported" = "yes"; then
8761
Matthias Kloseb9621712010-04-24 17:59:49 +00008762$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008763
8764 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008765 for ac_func in pthread_sigmask
8766do :
8767 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008768if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008769 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008770#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008771_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008772 case $ac_sys_system in
8773 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008774
Matthias Kloseb9621712010-04-24 17:59:49 +00008775$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008776
8777 ;;
8778 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008779fi
8780done
8781
8782fi
8783
8784
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008785# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008786
Matthias Kloseb9621712010-04-24 17:59:49 +00008787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8788$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008789# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008790if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008791 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008792 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8794$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008795 ipv6=no
8796 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008797 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8798$as_echo "yes" >&6; }
8799 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008800
8801 ipv6=yes
8802 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008803 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008804else
Martin v. Löwis11437992002-04-12 09:54:03 +00008805
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 if test "$cross_compiling" = yes; 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: no" >&5
8809$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008810 ipv6=no
8811
8812else
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008814/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008815 /* AF_INET6 available check */
8816#include <sys/types.h>
8817#include <sys/socket.h>
8818main()
8819{
8820 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8821 exit(1);
8822 else
8823 exit(0);
8824}
8825
Martin v. Löwis11437992002-04-12 09:54:03 +00008826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008827if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008828
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8830$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008831 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008832
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008833else
Matthias Kloseb159a552010-04-25 21:00:44 +00008834
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8836$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008837 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008838
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8841 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008842fi
8843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008844
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008845if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8847$as_echo_n "checking if RFC2553 API is available... " >&6; }
8848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008849/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008850
8851 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008852#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008853int
8854main ()
8855{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008856struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008857 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 ;
8859 return 0;
8860}
Matthias Kloseb159a552010-04-25 21:00:44 +00008861
Martin v. Löwis11437992002-04-12 09:54:03 +00008862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008863if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008864
8865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008866$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008867 ipv6=yes
8868
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008869else
Matthias Kloseb159a552010-04-25 21:00:44 +00008870
8871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008872$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008873 ipv6=no
8874
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008877fi
8878
8879if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008880 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008881
8882fi
8883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008884fi
8885
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008886
8887ipv6type=unknown
8888ipv6lib=none
8889ipv6trylibc=no
8890
8891if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8893$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008894 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8895 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008896 case $i in
8897 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008899/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008901#include <netinet/in.h>
8902#ifdef IPV6_INRIA_VERSION
8903yes
8904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008905_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008908 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008909fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008910rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008911
8912 ;;
8913 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008915/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008916
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008917#include <netinet/in.h>
8918#ifdef __KAME__
8919yes
8920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008921_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008923 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008924 ipv6type=$i;
8925 ipv6lib=inet6
8926 ipv6libdir=/usr/local/v6/lib
8927 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008928fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008929rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008930
8931 ;;
8932 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008934/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008935
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008936#include <features.h>
8937#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8938yes
8939#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008940_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008941if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008942 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008943 ipv6type=$i;
8944 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008945fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008946rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008947
8948 ;;
8949 linux-inet6)
8950 if test -d /usr/inet6; then
8951 ipv6type=$i
8952 ipv6lib=inet6
8953 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008954 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008955 fi
8956 ;;
8957 solaris)
8958 if test -f /etc/netconfig; then
8959 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
8960 ipv6type=$i
8961 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008962 fi
8963 fi
8964 ;;
8965 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008967/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008968
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008969#include <sys/param.h>
8970#ifdef _TOSHIBA_INET6
8971yes
8972#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008973_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008974if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008976 ipv6type=$i;
8977 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008978 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008979fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008980rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008981
8982 ;;
8983 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008985/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008986
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008987#include </usr/local/v6/include/sys/v6config.h>
8988#ifdef __V6D__
8989yes
8990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008991_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008992if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008994 ipv6type=$i;
8995 ipv6lib=v6;
8996 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00008997 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008998fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008999rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009000
9001 ;;
9002 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009004/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009005
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009006#include <sys/param.h>
9007#ifdef _ZETA_MINAMI_INET6
9008yes
9009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009010_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009011if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009013 ipv6type=$i;
9014 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009015 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009016fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009017rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009018
9019 ;;
9020 esac
9021 if test "$ipv6type" != "unknown"; then
9022 break
9023 fi
9024 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9026$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009027fi
9028
9029if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9030 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9031 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9032 echo "using lib$ipv6lib"
9033 else
9034 if test $ipv6trylibc = "yes"; then
9035 echo "using libc"
9036 else
9037 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9038 echo "You need to fetch lib$ipv6lib.a from appropriate"
9039 echo 'ipv6 kit and compile beforehand.'
9040 exit 1
9041 fi
9042 fi
9043fi
9044
Matthias Kloseb9621712010-04-24 17:59:49 +00009045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9046$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009048/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009049
9050 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009051int
9052main ()
9053{
9054FSIORefNum fRef = 0
9055 ;
9056 return 0;
9057}
Matthias Kloseb159a552010-04-25 21:00:44 +00009058
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009060if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009061
Matthias Kloseb159a552010-04-25 21:00:44 +00009062
Matthias Kloseb9621712010-04-24 17:59:49 +00009063$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009064
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9066$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009067
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009068else
Matthias Kloseb159a552010-04-25 21:00:44 +00009069
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9071$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009072
9073fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9075
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009076# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9078$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009079
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009080# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009081if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009082 withval=$with_doc_strings;
9083fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009084
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009085
9086if test -z "$with_doc_strings"
9087then with_doc_strings="yes"
9088fi
9089if test "$with_doc_strings" != "no"
9090then
9091
Matthias Kloseb9621712010-04-24 17:59:49 +00009092$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009093
9094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9096$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009097
Antoine Pitrou042b1282010-08-13 21:15:58 +00009098# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9100$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009101
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009102# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009103if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009104 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009105if test "$withval" != no
9106then
9107
Matthias Kloseb9621712010-04-24 17:59:49 +00009108$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009109
Matthias Kloseb9621712010-04-24 17:59:49 +00009110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9111$as_echo "yes" >&6; }
9112else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9113$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009114fi
9115else
Matthias Kloseb9621712010-04-24 17:59:49 +00009116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9117$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009118fi
9119
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009120
9121# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9123$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009125# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009126if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009127 withval=$with_pymalloc;
9128fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009129
Neil Schemenauera35c6882001-02-27 04:45:05 +00009130
Neil Schemenauer16c22972002-03-22 15:34:49 +00009131if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009132then
9133 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009134 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009135fi
9136if test "$with_pymalloc" != "no"
9137then
Martin v. Löwis11437992002-04-12 09:54:03 +00009138
Matthias Kloseb9621712010-04-24 17:59:49 +00009139$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009140
9141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9143$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009144
Benjamin Peterson05159c42009-12-03 03:01:27 +00009145# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9147$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009148
9149# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009150if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009151 withval=$with_valgrind;
9152else
9153 with_valgrind=no
9154fi
9155
Matthias Kloseb9621712010-04-24 17:59:49 +00009156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9157$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009158if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009159 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009160if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009161
Matthias Kloseb9621712010-04-24 17:59:49 +00009162$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009163
9164else
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009165 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009166
9167fi
9168
9169
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009170 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009171fi
9172
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009173# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009174
Guido van Rossum98935bf2001-09-05 19:13:16 +00009175DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009176
Guido van Rossume97ee181999-12-20 21:27:22 +00009177# the dlopen() function means we might want to use dynload_shlib.o. some
9178# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009179for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009180do :
9181 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009182if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009183 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009184#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009185_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009186
Guido van Rossume97ee181999-12-20 21:27:22 +00009187fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009188done
Guido van Rossume97ee181999-12-20 21:27:22 +00009189
Michael W. Hudson54241132001-12-07 15:38:26 +00009190
Guido van Rossume97ee181999-12-20 21:27:22 +00009191# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9192# loading of modules.
9193
Matthias Kloseb9621712010-04-24 17:59:49 +00009194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9195$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009196if test -z "$DYNLOADFILE"
9197then
9198 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009199 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9200 if test "$ac_cv_func_dlopen" = yes
9201 then DYNLOADFILE="dynload_shlib.o"
9202 else DYNLOADFILE="dynload_aix.o"
9203 fi
9204 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009205 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009206 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9207 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009208 *)
9209 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9210 # out any dynamic loading
9211 if test "$ac_cv_func_dlopen" = yes
9212 then DYNLOADFILE="dynload_shlib.o"
9213 else DYNLOADFILE="dynload_stub.o"
9214 fi
9215 ;;
9216 esac
9217fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9219$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009220if test "$DYNLOADFILE" != "dynload_stub.o"
9221then
Martin v. Löwis11437992002-04-12 09:54:03 +00009222
Matthias Kloseb9621712010-04-24 17:59:49 +00009223$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009224
9225fi
9226
Neil Schemenauer4e425612001-06-19 15:44:15 +00009227# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9228
Michael W. Hudson54241132001-12-07 15:38:26 +00009229
Matthias Kloseb9621712010-04-24 17:59:49 +00009230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9231$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009232if test -z "$MACHDEP_OBJS"
9233then
Jack Jansene578a632001-08-15 01:27:14 +00009234 MACHDEP_OBJS=$extra_machdep_objs
9235else
9236 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9239$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009240
Guido van Rossum627b2d71993-12-24 10:39:16 +00009241# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009242for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009243 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009244 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009245 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009246 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009247 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009248 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009249 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9250 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009251 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009252 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009253 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009254 truncate uname unsetenv utimes waitpid wait3 wait4 \
9255 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009256do :
9257 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9258ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009259if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009260 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009261#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009262_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009263
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009264fi
9265done
9266
Michael W. Hudson54241132001-12-07 15:38:26 +00009267
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009268# For some functions, having a definition is not sufficient, since
9269# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9271$as_echo_n "checking for chroot... " >&6; }
9272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009273/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009274#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009275int
9276main ()
9277{
9278void *x=chroot
9279 ;
9280 return 0;
9281}
9282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009283if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009284
Matthias Kloseb9621712010-04-24 17:59:49 +00009285$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009286
Matthias Kloseb159a552010-04-25 21:00:44 +00009287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009288$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009289else
Matthias Kloseb9621712010-04-24 17:59:49 +00009290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9291$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009292
9293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9296$as_echo_n "checking for link... " >&6; }
9297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009298/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009299#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009300int
9301main ()
9302{
9303void *x=link
9304 ;
9305 return 0;
9306}
9307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009308if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009309
Matthias Kloseb9621712010-04-24 17:59:49 +00009310$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009311
Matthias Kloseb159a552010-04-25 21:00:44 +00009312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009313$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009314else
Matthias Kloseb9621712010-04-24 17:59:49 +00009315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9316$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009317
9318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9321$as_echo_n "checking for symlink... " >&6; }
9322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009323/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009324#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009325int
9326main ()
9327{
9328void *x=symlink
9329 ;
9330 return 0;
9331}
9332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009333if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009334
Matthias Kloseb9621712010-04-24 17:59:49 +00009335$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009336
Matthias Kloseb159a552010-04-25 21:00:44 +00009337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009338$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009339else
Matthias Kloseb9621712010-04-24 17:59:49 +00009340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9341$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009342
9343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9346$as_echo_n "checking for fchdir... " >&6; }
9347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009348/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009349#include <unistd.h>
9350int
9351main ()
9352{
9353void *x=fchdir
9354 ;
9355 return 0;
9356}
9357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009358if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009359
Matthias Kloseb9621712010-04-24 17:59:49 +00009360$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009361
Matthias Kloseb159a552010-04-25 21:00:44 +00009362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009363$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009364else
Matthias Kloseb9621712010-04-24 17:59:49 +00009365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9366$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009367
9368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9371$as_echo_n "checking for fsync... " >&6; }
9372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009373/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009374#include <unistd.h>
9375int
9376main ()
9377{
9378void *x=fsync
9379 ;
9380 return 0;
9381}
9382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009384
Matthias Kloseb9621712010-04-24 17:59:49 +00009385$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009386
Matthias Kloseb159a552010-04-25 21:00:44 +00009387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009388$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009389else
Matthias Kloseb9621712010-04-24 17:59:49 +00009390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9391$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009392
9393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9396$as_echo_n "checking for fdatasync... " >&6; }
9397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009398/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009399#include <unistd.h>
9400int
9401main ()
9402{
9403void *x=fdatasync
9404 ;
9405 return 0;
9406}
9407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009409
Matthias Kloseb9621712010-04-24 17:59:49 +00009410$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009411
Matthias Kloseb159a552010-04-25 21:00:44 +00009412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009413$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009414else
Matthias Kloseb9621712010-04-24 17:59:49 +00009415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9416$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009417
9418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9421$as_echo_n "checking for epoll... " >&6; }
9422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009423/* end confdefs.h. */
9424#include <sys/epoll.h>
9425int
9426main ()
9427{
9428void *x=epoll_create
9429 ;
9430 return 0;
9431}
9432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009433if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009434
Matthias Kloseb9621712010-04-24 17:59:49 +00009435$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009436
Matthias Kloseb159a552010-04-25 21:00:44 +00009437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009438$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009439else
Matthias Kloseb9621712010-04-24 17:59:49 +00009440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9441$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009442
9443fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9446$as_echo_n "checking for kqueue... " >&6; }
9447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009448/* end confdefs.h. */
9449
9450#include <sys/types.h>
9451#include <sys/event.h>
9452
9453int
9454main ()
9455{
9456int x=kqueue()
9457 ;
9458 return 0;
9459}
9460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009461if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009462
Matthias Kloseb9621712010-04-24 17:59:49 +00009463$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009464
Matthias Kloseb159a552010-04-25 21:00:44 +00009465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009466$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009467else
Matthias Kloseb9621712010-04-24 17:59:49 +00009468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9469$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009470
9471fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009473# On some systems (eg. FreeBSD 5), we would find a definition of the
9474# functions ctermid_r, setgroups in the library, but no prototype
9475# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9476# address to avoid compiler warnings and potential miscompilations
9477# because of the missing prototypes.
9478
Matthias Kloseb9621712010-04-24 17:59:49 +00009479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9480$as_echo_n "checking for ctermid_r... " >&6; }
9481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009482/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009483
Martin v. Löwisd5843682002-11-21 20:41:28 +00009484#include <stdio.h>
9485
Martin v. Löwisd5843682002-11-21 20:41:28 +00009486int
9487main ()
9488{
9489void* p = ctermid_r
9490 ;
9491 return 0;
9492}
9493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009494if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009495
Matthias Kloseb9621712010-04-24 17:59:49 +00009496$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009497
Matthias Kloseb159a552010-04-25 21:00:44 +00009498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009499$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009500else
Matthias Kloseb9621712010-04-24 17:59:49 +00009501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9502$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009503
9504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9506
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9508$as_echo_n "checking for flock declaration... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009509if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009510 $as_echo_n "(cached) " >&6
9511else
9512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009513/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009514#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009515int
9516main ()
9517{
9518void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009519
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009520 ;
9521 return 0;
9522}
9523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009524if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009525 ac_cv_flock_decl=yes
9526else
9527 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009528
9529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009531
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009532fi
9533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9534$as_echo "$ac_cv_flock_decl" >&6; }
9535if test "x${ac_cv_flock_decl}" = xyes; then
9536 for ac_func in flock
9537do :
9538 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009539if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009540 cat >>confdefs.h <<_ACEOF
9541#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009542_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009543
Antoine Pitroua3000072010-09-07 14:52:42 +00009544else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009546$as_echo_n "checking for flock in -lbsd... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009547if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009548 $as_echo_n "(cached) " >&6
9549else
9550 ac_check_lib_save_LIBS=$LIBS
9551LIBS="-lbsd $LIBS"
9552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9553/* end confdefs.h. */
9554
9555/* Override any GCC internal prototype to avoid an error.
9556 Use char because int might match the return type of a GCC
9557 builtin and then its argument prototype would still apply. */
9558#ifdef __cplusplus
9559extern "C"
9560#endif
9561char flock ();
9562int
9563main ()
9564{
9565return flock ();
9566 ;
9567 return 0;
9568}
9569_ACEOF
9570if ac_fn_c_try_link "$LINENO"; then :
9571 ac_cv_lib_bsd_flock=yes
9572else
9573 ac_cv_lib_bsd_flock=no
9574fi
9575rm -f core conftest.err conftest.$ac_objext \
9576 conftest$ac_exeext conftest.$ac_ext
9577LIBS=$ac_check_lib_save_LIBS
9578fi
9579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9580$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009581if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009582 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009583
9584
9585$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9586
9587
9588fi
9589
9590
9591fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009592done
9593
Antoine Pitroua3000072010-09-07 14:52:42 +00009594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009595
Matthias Kloseb9621712010-04-24 17:59:49 +00009596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9597$as_echo_n "checking for getpagesize... " >&6; }
9598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009599/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009600
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009601#include <unistd.h>
9602
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009603int
9604main ()
9605{
9606void* p = getpagesize
9607 ;
9608 return 0;
9609}
9610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009611if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009612
Matthias Kloseb9621712010-04-24 17:59:49 +00009613$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009614
Matthias Kloseb159a552010-04-25 21:00:44 +00009615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009616$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009617else
Matthias Kloseb9621712010-04-24 17:59:49 +00009618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9619$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009620
9621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009623
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009624for ac_prog in true
9625do
9626 # Extract the first word of "$ac_prog", so it can be a program name with args.
9627set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9629$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009630if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009631 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009632else
9633 if test -n "$TRUE"; then
9634 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9635else
9636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9637for as_dir in $PATH
9638do
9639 IFS=$as_save_IFS
9640 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009641 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009642 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 +00009643 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009644 $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 +00009645 break 2
9646 fi
9647done
Matthias Kloseb9621712010-04-24 17:59:49 +00009648 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009649IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009650
9651fi
9652fi
9653TRUE=$ac_cv_prog_TRUE
9654if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9656$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009657else
Matthias Kloseb9621712010-04-24 17:59:49 +00009658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9659$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009660fi
9661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009662
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009663 test -n "$TRUE" && break
9664done
9665test -n "$TRUE" || TRUE="/bin/true"
9666
9667
Matthias Kloseb9621712010-04-24 17:59:49 +00009668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9669$as_echo_n "checking for inet_aton in -lc... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009670if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009671 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009672else
9673 ac_check_lib_save_LIBS=$LIBS
9674LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009676/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009678/* Override any GCC internal prototype to avoid an error.
9679 Use char because int might match the return type of a GCC
9680 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009681#ifdef __cplusplus
9682extern "C"
9683#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009684char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009685int
9686main ()
9687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009688return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009689 ;
9690 return 0;
9691}
9692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009693if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009694 ac_cv_lib_c_inet_aton=yes
9695else
Matthias Kloseb9621712010-04-24 17:59:49 +00009696 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009698rm -f core conftest.err conftest.$ac_objext \
9699 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009700LIBS=$ac_check_lib_save_LIBS
9701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9703$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009704if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009705 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009706else
Matthias Kloseb9621712010-04-24 17:59:49 +00009707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9708$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009709if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009710 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009711else
9712 ac_check_lib_save_LIBS=$LIBS
9713LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009715/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009717/* Override any GCC internal prototype to avoid an error.
9718 Use char because int might match the return type of a GCC
9719 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009720#ifdef __cplusplus
9721extern "C"
9722#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009723char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009724int
9725main ()
9726{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009728 ;
9729 return 0;
9730}
9731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009732if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009733 ac_cv_lib_resolv_inet_aton=yes
9734else
Matthias Kloseb9621712010-04-24 17:59:49 +00009735 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009737rm -f core conftest.err conftest.$ac_objext \
9738 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009739LIBS=$ac_check_lib_save_LIBS
9740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9742$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009743if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009744 cat >>confdefs.h <<_ACEOF
9745#define HAVE_LIBRESOLV 1
9746_ACEOF
9747
9748 LIBS="-lresolv $LIBS"
9749
9750fi
9751
9752
9753fi
9754
9755
Christian Heimesd0764e22007-12-04 15:00:33 +00009756# On Tru64, chflags seems to be present, but calling it will
9757# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9759$as_echo_n "checking for chflags... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009760if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009761 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009762else
Matthias Kloseb9621712010-04-24 17:59:49 +00009763 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009764 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009765else
Matthias Kloseb9621712010-04-24 17:59:49 +00009766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009767/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009768[
Christian Heimesd0764e22007-12-04 15:00:33 +00009769#include <sys/stat.h>
9770#include <unistd.h>
9771int main(int argc, char*argv[])
9772{
9773 if(chflags(argv[0], 0) != 0)
9774 return 1;
9775 return 0;
9776}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009777]
Christian Heimesd0764e22007-12-04 15:00:33 +00009778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009779if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009780 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009781else
Matthias Kloseb9621712010-04-24 17:59:49 +00009782 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9785 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009786fi
9787
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009788
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9791$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009792if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009793 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009794if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009795 ac_cv_have_chflags="yes"
9796else
9797 ac_cv_have_chflags="no"
9798fi
9799
9800fi
9801if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009802
Matthias Kloseb9621712010-04-24 17:59:49 +00009803$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009804
9805fi
9806
Matthias Kloseb9621712010-04-24 17:59:49 +00009807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9808$as_echo_n "checking for lchflags... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009809if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009810 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009811else
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009813 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009814else
Matthias Kloseb9621712010-04-24 17:59:49 +00009815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009816/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009817[
Christian Heimesd0764e22007-12-04 15:00:33 +00009818#include <sys/stat.h>
9819#include <unistd.h>
9820int main(int argc, char*argv[])
9821{
9822 if(lchflags(argv[0], 0) != 0)
9823 return 1;
9824 return 0;
9825}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009826]
Christian Heimesd0764e22007-12-04 15:00:33 +00009827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009828if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009829 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009830else
Matthias Kloseb9621712010-04-24 17:59:49 +00009831 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009833rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9834 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009835fi
9836
9837
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9840$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009841if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009842 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009843if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009844 ac_cv_have_lchflags="yes"
9845else
9846 ac_cv_have_lchflags="no"
9847fi
9848
9849fi
9850if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009851
Matthias Kloseb9621712010-04-24 17:59:49 +00009852$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009853
9854fi
9855
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009856case $ac_sys_system/$ac_sys_release in
9857Darwin/*)
9858 _CUR_CFLAGS="${CFLAGS}"
9859 _CUR_LDFLAGS="${LDFLAGS}"
9860 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9861 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9862 ;;
9863esac
9864
Matthias Kloseb9621712010-04-24 17:59:49 +00009865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9866$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009867if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009868 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009869else
9870 ac_check_lib_save_LIBS=$LIBS
9871LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009873/* end confdefs.h. */
9874
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009875/* Override any GCC internal prototype to avoid an error.
9876 Use char because int might match the return type of a GCC
9877 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009878#ifdef __cplusplus
9879extern "C"
9880#endif
9881char inflateCopy ();
9882int
9883main ()
9884{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009886 ;
9887 return 0;
9888}
9889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009890if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009891 ac_cv_lib_z_inflateCopy=yes
9892else
Matthias Kloseb9621712010-04-24 17:59:49 +00009893 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009895rm -f core conftest.err conftest.$ac_objext \
9896 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009897LIBS=$ac_check_lib_save_LIBS
9898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9900$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009901if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009902
Matthias Kloseb9621712010-04-24 17:59:49 +00009903$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009904
9905fi
9906
9907
9908case $ac_sys_system/$ac_sys_release in
9909Darwin/*)
9910 CFLAGS="${_CUR_CFLAGS}"
9911 LDFLAGS="${_CUR_LDFLAGS}"
9912 ;;
9913esac
9914
Matthias Kloseb9621712010-04-24 17:59:49 +00009915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9916$as_echo_n "checking for hstrerror... " >&6; }
9917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009918/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009919
Martin v. Löwise9416172003-05-03 10:12:45 +00009920#include <netdb.h>
9921
Martin v. Löwise9416172003-05-03 10:12:45 +00009922int
9923main ()
9924{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009925void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009926 ;
9927 return 0;
9928}
9929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009930if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009931
Matthias Kloseb9621712010-04-24 17:59:49 +00009932$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009933
Matthias Kloseb159a552010-04-25 21:00:44 +00009934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009935$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009936else
Matthias Kloseb9621712010-04-24 17:59:49 +00009937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9938$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009939
9940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009941rm -f core conftest.err conftest.$ac_objext \
9942 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009943
Matthias Kloseb9621712010-04-24 17:59:49 +00009944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9945$as_echo_n "checking for inet_aton... " >&6; }
9946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009947/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009948
Martin v. Löwis86d66262006-02-17 08:40:11 +00009949#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009950#include <sys/socket.h>
9951#include <netinet/in.h>
9952#include <arpa/inet.h>
9953
Martin v. Löwise9416172003-05-03 10:12:45 +00009954int
9955main ()
9956{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009957void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009958 ;
9959 return 0;
9960}
9961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009962if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009963
Matthias Kloseb9621712010-04-24 17:59:49 +00009964$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009965
Matthias Kloseb159a552010-04-25 21:00:44 +00009966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009967$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009968else
Matthias Kloseb9621712010-04-24 17:59:49 +00009969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9970$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009971
9972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009973rm -f core conftest.err conftest.$ac_objext \
9974 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975
Matthias Kloseb9621712010-04-24 17:59:49 +00009976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9977$as_echo_n "checking for inet_pton... " >&6; }
9978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009979/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009980
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009981#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009982#include <sys/socket.h>
9983#include <netinet/in.h>
9984#include <arpa/inet.h>
9985
Martin v. Löwise9416172003-05-03 10:12:45 +00009986int
9987main ()
9988{
9989void* p = inet_pton
9990 ;
9991 return 0;
9992}
9993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009994if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009995
Matthias Kloseb9621712010-04-24 17:59:49 +00009996$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009997
Matthias Kloseb159a552010-04-25 21:00:44 +00009998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009999$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010000else
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10002$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010003
10004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010006
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010007# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10009$as_echo_n "checking for setgroups... " >&6; }
10010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010011/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010012
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010013#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010014#ifdef HAVE_GRP_H
10015#include <grp.h>
10016#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010017
Martin v. Löwisd5843682002-11-21 20:41:28 +000010018int
10019main ()
10020{
10021void* p = setgroups
10022 ;
10023 return 0;
10024}
10025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010026if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010027
Matthias Kloseb9621712010-04-24 17:59:49 +000010028$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010029
Matthias Kloseb159a552010-04-25 21:00:44 +000010030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010031$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010032else
Matthias Kloseb9621712010-04-24 17:59:49 +000010033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10034$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010035
10036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010038
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010039# check for openpty and forkpty
10040
10041for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010042do :
10043 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010044if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010045 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010046#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010047_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010048
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010049else
Matthias Kloseb9621712010-04-24 17:59:49 +000010050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10051$as_echo_n "checking for openpty in -lutil... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010052if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010053 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010054else
Martin v. Löwis11437992002-04-12 09:54:03 +000010055 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010056LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010060/* Override any GCC internal prototype to avoid an error.
10061 Use char because int might match the return type of a GCC
10062 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010063#ifdef __cplusplus
10064extern "C"
10065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010066char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010067int
10068main ()
10069{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010071 ;
10072 return 0;
10073}
10074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010075if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010077else
Matthias Kloseb9621712010-04-24 17:59:49 +000010078 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010080rm -f core conftest.err conftest.$ac_objext \
10081 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010082LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10085$as_echo "$ac_cv_lib_util_openpty" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010086if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010087 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010088 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010089else
Matthias Kloseb9621712010-04-24 17:59:49 +000010090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10091$as_echo_n "checking for openpty in -lbsd... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010092if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010093 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010094else
10095 ac_check_lib_save_LIBS=$LIBS
10096LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010098/* end confdefs.h. */
10099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100/* Override any GCC internal prototype to avoid an error.
10101 Use char because int might match the return type of a GCC
10102 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010103#ifdef __cplusplus
10104extern "C"
10105#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010106char openpty ();
10107int
10108main ()
10109{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010110return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010111 ;
10112 return 0;
10113}
10114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010115if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010116 ac_cv_lib_bsd_openpty=yes
10117else
Matthias Kloseb9621712010-04-24 17:59:49 +000010118 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010119fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010120rm -f core conftest.err conftest.$ac_objext \
10121 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010122LIBS=$ac_check_lib_save_LIBS
10123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10125$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010126if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010127 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010128 LIBS="$LIBS -lbsd"
10129fi
10130
10131
10132fi
10133
Fred Drake8cef4cf2000-06-28 16:40:38 +000010134
10135fi
10136done
10137
10138for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010139do :
10140 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010141if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010142 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010143#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010144_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010145
Fred Drake8cef4cf2000-06-28 16:40:38 +000010146else
Matthias Kloseb9621712010-04-24 17:59:49 +000010147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10148$as_echo_n "checking for forkpty in -lutil... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010149if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010150 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010151else
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010153LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010157/* Override any GCC internal prototype to avoid an error.
10158 Use char because int might match the return type of a GCC
10159 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010160#ifdef __cplusplus
10161extern "C"
10162#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010163char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010164int
10165main ()
10166{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010168 ;
10169 return 0;
10170}
10171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010172if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010173 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010174else
Matthias Kloseb9621712010-04-24 17:59:49 +000010175 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010177rm -f core conftest.err conftest.$ac_objext \
10178 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010179LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10182$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010183if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010184 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010185 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010186else
Matthias Kloseb9621712010-04-24 17:59:49 +000010187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10188$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010189if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010191else
10192 ac_check_lib_save_LIBS=$LIBS
10193LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010195/* end confdefs.h. */
10196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010197/* Override any GCC internal prototype to avoid an error.
10198 Use char because int might match the return type of a GCC
10199 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010200#ifdef __cplusplus
10201extern "C"
10202#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010203char forkpty ();
10204int
10205main ()
10206{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010207return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010208 ;
10209 return 0;
10210}
10211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010212if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010213 ac_cv_lib_bsd_forkpty=yes
10214else
Matthias Kloseb9621712010-04-24 17:59:49 +000010215 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010217rm -f core conftest.err conftest.$ac_objext \
10218 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010219LIBS=$ac_check_lib_save_LIBS
10220fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10222$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010223if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010224 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010225 LIBS="$LIBS -lbsd"
10226fi
10227
10228
10229fi
10230
Fred Drake8cef4cf2000-06-28 16:40:38 +000010231
10232fi
10233done
10234
Jack Jansendd19cf82001-12-06 22:36:17 +000010235
Christian Heimesb186d002008-03-18 15:15:01 +000010236# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010237for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010238do :
10239 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010240if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010241 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010242#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010243_ACEOF
10244
10245fi
10246done
10247
10248
Michael W. Hudson54241132001-12-07 15:38:26 +000010249# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010250for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010251do :
10252 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10253ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010254if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010255 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010256#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010257_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010258
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010259fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010260done
10261
Michael W. Hudson54241132001-12-07 15:38:26 +000010262
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010263ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010264if test "x$ac_cv_func_dup2" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010265 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010266
Martin v. Löwis1142de32002-03-29 16:28:31 +000010267else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010268 case " $LIBOBJS " in
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010269 *" dup2.$ac_objext "* ) ;;
10270 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010271 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010272esac
10273
Martin v. Löwis1142de32002-03-29 16:28:31 +000010274fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010275
10276ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010277if test "x$ac_cv_func_getcwd" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010278 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10279
10280else
10281 case " $LIBOBJS " in
10282 *" getcwd.$ac_objext "* ) ;;
10283 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10284 ;;
10285esac
10286
10287fi
10288
10289ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010290if test "x$ac_cv_func_strdup" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010291 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10292
10293else
10294 case " $LIBOBJS " in
10295 *" strdup.$ac_objext "* ) ;;
10296 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10297 ;;
10298esac
10299
10300fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010301
10302
10303for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010304do :
10305 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010306if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010308#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010311/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010312#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010313int
10314main ()
10315{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010316getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 ;
10318 return 0;
10319}
10320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010321if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010322
Matthias Kloseb9621712010-04-24 17:59:49 +000010323$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010324
Guido van Rossum627b2d71993-12-24 10:39:16 +000010325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010327
Guido van Rossum627b2d71993-12-24 10:39:16 +000010328fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010329done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010330
Jack Jansen150753c2003-03-29 22:07:47 +000010331for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010332do :
10333 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010334if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010335 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010336#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010339/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010340#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010341int
10342main ()
10343{
10344setpgrp(0,0);
10345 ;
10346 return 0;
10347}
10348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010349if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010350
Matthias Kloseb9621712010-04-24 17:59:49 +000010351$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010352
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010355
10356fi
10357done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010358
Thomas Wouters3a584202000-08-05 23:28:51 +000010359for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010360do :
10361 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010362if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010364#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010367/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010368#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010369int
10370main ()
10371{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010372gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010373 ;
10374 return 0;
10375}
10376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010377if ac_fn_c_try_compile "$LINENO"; then :
10378
Guido van Rossum627b2d71993-12-24 10:39:16 +000010379else
Skip Montanaro6dead952003-09-25 14:50:04 +000010380
Matthias Kloseb9621712010-04-24 17:59:49 +000010381$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010382
Martin v. Löwis11437992002-04-12 09:54:03 +000010383
Guido van Rossum627b2d71993-12-24 10:39:16 +000010384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010386
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010387fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010388done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010389
Michael W. Hudson54241132001-12-07 15:38:26 +000010390
Matthias Kloseb9621712010-04-24 17:59:49 +000010391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10392$as_echo_n "checking for major... " >&6; }
10393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010394/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010395
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010396#if defined(MAJOR_IN_MKDEV)
10397#include <sys/mkdev.h>
10398#elif defined(MAJOR_IN_SYSMACROS)
10399#include <sys/sysmacros.h>
10400#else
10401#include <sys/types.h>
10402#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010403
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010404int
10405main ()
10406{
10407
10408 makedev(major(0),minor(0));
10409
10410 ;
10411 return 0;
10412}
10413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010414if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010415
10416
Matthias Kloseb9621712010-04-24 17:59:49 +000010417$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010418
Matthias Kloseb9621712010-04-24 17:59:49 +000010419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10420$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010421
10422else
Skip Montanaro6dead952003-09-25 14:50:04 +000010423
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10425$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010426
10427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010428rm -f core conftest.err conftest.$ac_objext \
10429 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010430
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010431# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010432# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10434$as_echo_n "checking for getaddrinfo... " >&6; }
10435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010436/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010437
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010438#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010439#include <sys/socket.h>
10440#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010441#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010442
Martin v. Löwis11437992002-04-12 09:54:03 +000010443int
10444main ()
10445{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010446getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 ;
10448 return 0;
10449}
10450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010451if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010452 have_getaddrinfo=yes
10453else
Matthias Kloseb9621712010-04-24 17:59:49 +000010454 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010455fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010456rm -f core conftest.err conftest.$ac_objext \
10457 conftest$ac_exeext conftest.$ac_ext
10458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10459$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010460if test $have_getaddrinfo = yes
10461then
Matthias Kloseb9621712010-04-24 17:59:49 +000010462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10463$as_echo_n "checking getaddrinfo bug... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010464 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010466else
Matthias Kloseb9621712010-04-24 17:59:49 +000010467 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010468 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010469else
Matthias Kloseb9621712010-04-24 17:59:49 +000010470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010471/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010472
10473#include <sys/types.h>
10474#include <netdb.h>
10475#include <string.h>
10476#include <sys/socket.h>
10477#include <netinet/in.h>
10478
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010479int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010480{
10481 int passive, gaierr, inet4 = 0, inet6 = 0;
10482 struct addrinfo hints, *ai, *aitop;
10483 char straddr[INET6_ADDRSTRLEN], strport[16];
10484
10485 for (passive = 0; passive <= 1; passive++) {
10486 memset(&hints, 0, sizeof(hints));
10487 hints.ai_family = AF_UNSPEC;
10488 hints.ai_flags = passive ? AI_PASSIVE : 0;
10489 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010490 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010491 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10492 (void)gai_strerror(gaierr);
10493 goto bad;
10494 }
10495 for (ai = aitop; ai; ai = ai->ai_next) {
10496 if (ai->ai_addr == NULL ||
10497 ai->ai_addrlen == 0 ||
10498 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10499 straddr, sizeof(straddr), strport, sizeof(strport),
10500 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10501 goto bad;
10502 }
10503 switch (ai->ai_family) {
10504 case AF_INET:
10505 if (strcmp(strport, "54321") != 0) {
10506 goto bad;
10507 }
10508 if (passive) {
10509 if (strcmp(straddr, "0.0.0.0") != 0) {
10510 goto bad;
10511 }
10512 } else {
10513 if (strcmp(straddr, "127.0.0.1") != 0) {
10514 goto bad;
10515 }
10516 }
10517 inet4++;
10518 break;
10519 case AF_INET6:
10520 if (strcmp(strport, "54321") != 0) {
10521 goto bad;
10522 }
10523 if (passive) {
10524 if (strcmp(straddr, "::") != 0) {
10525 goto bad;
10526 }
10527 } else {
10528 if (strcmp(straddr, "::1") != 0) {
10529 goto bad;
10530 }
10531 }
10532 inet6++;
10533 break;
10534 case AF_UNSPEC:
10535 goto bad;
10536 break;
10537 default:
10538 /* another family support? */
10539 break;
10540 }
10541 }
10542 }
10543
10544 if (!(inet4 == 0 || inet4 == 2))
10545 goto bad;
10546 if (!(inet6 == 0 || inet6 == 2))
10547 goto bad;
10548
10549 if (aitop)
10550 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010551 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010552
10553 bad:
10554 if (aitop)
10555 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010556 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010557}
10558
Martin v. Löwis11437992002-04-12 09:54:03 +000010559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010560if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010561 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010562else
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010565rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10566 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010568
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010569fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010570
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010572
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10574$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10575
Mark Dickinson2df5d282009-12-31 21:22:50 +000010576if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010577then
10578 if test $ipv6 = yes
10579 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010580 echo 'Fatal: You must get working getaddrinfo() function.'
10581 echo ' or you can specify "--disable-ipv6"'.
10582 exit 1
10583 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010584else
Martin v. Löwis11437992002-04-12 09:54:03 +000010585
Matthias Kloseb9621712010-04-24 17:59:49 +000010586$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010587
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010588fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010589
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010590for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010591do :
10592 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010593if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010594 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010595#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010596_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010597
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010598fi
10599done
10600
Michael W. Hudson54241132001-12-07 15:38:26 +000010601
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010602# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10604$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010605if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010607else
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010609/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010610#include <sys/types.h>
10611#include <sys/time.h>
10612#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010613
Martin v. Löwis11437992002-04-12 09:54:03 +000010614int
10615main ()
10616{
10617if ((struct tm *) 0)
10618return 0;
10619 ;
10620 return 0;
10621}
10622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010623if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010624 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010625else
Matthias Kloseb9621712010-04-24 17:59:49 +000010626 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10631$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010632if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010633
Matthias Kloseb9621712010-04-24 17:59:49 +000010634$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010635
10636fi
10637
Matthias Kloseb9621712010-04-24 17:59:49 +000010638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10639$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010640if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010642else
Matthias Kloseb9621712010-04-24 17:59:49 +000010643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010644/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010645#include <sys/types.h>
10646#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010647
Martin v. Löwis11437992002-04-12 09:54:03 +000010648int
10649main ()
10650{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010651struct tm tm;
10652 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010653 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010654 ;
10655 return 0;
10656}
10657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010658if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010659 ac_cv_struct_tm=time.h
10660else
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010664fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10666$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010667if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010668
Matthias Kloseb9621712010-04-24 17:59:49 +000010669$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010670
10671fi
10672
Matthias Kloseb9621712010-04-24 17:59:49 +000010673ac_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 +000010674#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010675
Matthias Kloseb9621712010-04-24 17:59:49 +000010676"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010677if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010678
10679cat >>confdefs.h <<_ACEOF
10680#define HAVE_STRUCT_TM_TM_ZONE 1
10681_ACEOF
10682
10683
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010684fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010685
Martin v. Löwis11437992002-04-12 09:54:03 +000010686if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10687
Matthias Kloseb9621712010-04-24 17:59:49 +000010688$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010689
10690else
Matthias Kloseb9621712010-04-24 17:59:49 +000010691 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10692"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010693if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010694 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695else
Matthias Kloseb9621712010-04-24 17:59:49 +000010696 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010697fi
10698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010699cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010700#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701_ACEOF
10702
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10704$as_echo_n "checking for tzname... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010705if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707else
Matthias Kloseb9621712010-04-24 17:59:49 +000010708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010709/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010710#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711#if !HAVE_DECL_TZNAME
10712extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010714
Martin v. Löwis11437992002-04-12 09:54:03 +000010715int
10716main ()
10717{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010719 ;
10720 return 0;
10721}
10722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010723if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010724 ac_cv_var_tzname=yes
10725else
Matthias Kloseb9621712010-04-24 17:59:49 +000010726 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010728rm -f core conftest.err conftest.$ac_objext \
10729 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10732$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010733 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010734
Matthias Kloseb9621712010-04-24 17:59:49 +000010735$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010736
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010737 fi
10738fi
10739
Matthias Kloseb9621712010-04-24 17:59:49 +000010740ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010741if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010742
10743cat >>confdefs.h <<_ACEOF
10744#define HAVE_STRUCT_STAT_ST_RDEV 1
10745_ACEOF
10746
10747
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010748fi
10749
Matthias Kloseb9621712010-04-24 17:59:49 +000010750ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010751if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010752
Martin v. Löwis11437992002-04-12 09:54:03 +000010753cat >>confdefs.h <<_ACEOF
10754#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10755_ACEOF
10756
10757
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010758fi
10759
Matthias Kloseb9621712010-04-24 17:59:49 +000010760ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010761if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010762
10763cat >>confdefs.h <<_ACEOF
10764#define HAVE_STRUCT_STAT_ST_FLAGS 1
10765_ACEOF
10766
10767
10768fi
10769
Matthias Kloseb9621712010-04-24 17:59:49 +000010770ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010771if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010772
10773cat >>confdefs.h <<_ACEOF
10774#define HAVE_STRUCT_STAT_ST_GEN 1
10775_ACEOF
10776
10777
10778fi
10779
Matthias Kloseb9621712010-04-24 17:59:49 +000010780ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010781if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010782
10783cat >>confdefs.h <<_ACEOF
10784#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10785_ACEOF
10786
10787
10788fi
10789
Matthias Kloseb9621712010-04-24 17:59:49 +000010790ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010791if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010792
Martin v. Löwis11437992002-04-12 09:54:03 +000010793cat >>confdefs.h <<_ACEOF
10794#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10795_ACEOF
10796
10797
Matthias Kloseb9621712010-04-24 17:59:49 +000010798$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010799
10800else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010801 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010802 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010803 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10804 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010805esac
10806
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010807fi
10808
Michael W. Hudson54241132001-12-07 15:38:26 +000010809
Martin v. Löwis11437992002-04-12 09:54:03 +000010810
Matthias Kloseb9621712010-04-24 17:59:49 +000010811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10812$as_echo_n "checking for time.h that defines altzone... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010813if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010814 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010815else
Matthias Kloseb159a552010-04-25 21:00:44 +000010816
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010818/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010819#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010820int
10821main ()
10822{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010823return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010824 ;
10825 return 0;
10826}
10827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010828if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010829 ac_cv_header_time_altzone=yes
10830else
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010835fi
10836
Matthias Kloseb9621712010-04-24 17:59:49 +000010837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10838$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010839if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010840
Matthias Kloseb9621712010-04-24 17:59:49 +000010841$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010842
10843fi
10844
Guido van Rossumda88dad1995-01-26 00:46:29 +000010845was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10847$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010849/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010850
10851#include <sys/types.h>
10852#include <sys/select.h>
10853#include <sys/time.h>
10854
Martin v. Löwis11437992002-04-12 09:54:03 +000010855int
10856main ()
10857{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010858;
Martin v. Löwis11437992002-04-12 09:54:03 +000010859 ;
10860 return 0;
10861}
10862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010863if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010864
10865
Matthias Kloseb9621712010-04-24 17:59:49 +000010866$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010867
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010868 was_it_defined=yes
10869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10873$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010874
Matthias Kloseb9621712010-04-24 17:59:49 +000010875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10876$as_echo_n "checking for addrinfo... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010877if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010878 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010879else
Matthias Kloseb9621712010-04-24 17:59:49 +000010880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010881/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010882#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010883int
10884main ()
10885{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010886struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010887 ;
10888 return 0;
10889}
10890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010891if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010892 ac_cv_struct_addrinfo=yes
10893else
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10897fi
10898
Matthias Kloseb9621712010-04-24 17:59:49 +000010899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10900$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010901if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010902
Matthias Kloseb9621712010-04-24 17:59:49 +000010903$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010904
10905fi
10906
Matthias Kloseb9621712010-04-24 17:59:49 +000010907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10908$as_echo_n "checking for sockaddr_storage... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010909if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010910 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010911else
Matthias Kloseb9621712010-04-24 17:59:49 +000010912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010913/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010914
10915# include <sys/types.h>
10916# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010917int
10918main ()
10919{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010920struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010921 ;
10922 return 0;
10923}
10924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010925if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010926 ac_cv_struct_sockaddr_storage=yes
10927else
Matthias Kloseb9621712010-04-24 17:59:49 +000010928 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10931fi
10932
Matthias Kloseb9621712010-04-24 17:59:49 +000010933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10934$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010935if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010936
Matthias Kloseb9621712010-04-24 17:59:49 +000010937$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010938
10939fi
10940
Guido van Rossum627b2d71993-12-24 10:39:16 +000010941# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010942
Matthias Kloseb9621712010-04-24 17:59:49 +000010943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10944$as_echo_n "checking whether char is unsigned... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010945if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010946 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010947else
Matthias Kloseb9621712010-04-24 17:59:49 +000010948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010950$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010951int
10952main ()
10953{
10954static int test_array [1 - 2 * !(((char) -1) < 0)];
10955test_array [0] = 0
10956
10957 ;
10958 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010959}
Martin v. Löwis11437992002-04-12 09:54:03 +000010960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010961if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010962 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010963else
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10969$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010970if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010972
10973fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010974
Matthias Kloseb9621712010-04-24 17:59:49 +000010975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10976$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010977if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010978 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010979else
Matthias Kloseb9621712010-04-24 17:59:49 +000010980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010981/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010982
Martin v. Löwis11437992002-04-12 09:54:03 +000010983int
10984main ()
10985{
10986/* FIXME: Include the comments suggested by Paul. */
10987#ifndef __cplusplus
10988 /* Ultrix mips cc rejects this. */
10989 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010991 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010992 char const *const *pcpcc;
10993 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010994 /* NEC SVR4.0.2 mips cc rejects this. */
10995 struct point {int x, y;};
10996 static struct point const zero = {0,0};
10997 /* AIX XL C 1.02.0.0 rejects this.
10998 It does not let you subtract one const X* pointer from another in
10999 an arm of an if-expression whose if-part is not a constant
11000 expression */
11001 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011002 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011003 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011004 ++pcpcc;
11005 ppc = (char**) pcpcc;
11006 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 { /* SCO 3.2v4 cc rejects this. */
11008 char *t;
11009 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011010
Martin v. Löwis11437992002-04-12 09:54:03 +000011011 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011012 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011013 }
11014 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11015 int x[] = {25, 17};
11016 const int *foo = &x[0];
11017 ++foo;
11018 }
11019 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11020 typedef const int *iptr;
11021 iptr p = 0;
11022 ++p;
11023 }
11024 { /* AIX XL C 1.02.0.0 rejects this saying
11025 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11026 struct s { int j; const int *ap[3]; };
11027 struct s *b; b->j = 5;
11028 }
11029 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11030 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011031 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011032 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011033 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011034#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011035
Martin v. Löwis11437992002-04-12 09:54:03 +000011036 ;
11037 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011038}
Martin v. Löwis11437992002-04-12 09:54:03 +000011039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011040if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011041 ac_cv_c_const=yes
11042else
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11048$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011049if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011050
Matthias Kloseb9621712010-04-24 17:59:49 +000011051$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011052
11053fi
11054
Michael W. Hudson54241132001-12-07 15:38:26 +000011055
Guido van Rossumda88dad1995-01-26 00:46:29 +000011056works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11058$as_echo_n "checking for working volatile... " >&6; }
11059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011060/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011061
Martin v. Löwis11437992002-04-12 09:54:03 +000011062int
11063main ()
11064{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011065volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011066 ;
11067 return 0;
11068}
11069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011070if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011071 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011072else
Skip Montanaro6dead952003-09-25 14:50:04 +000011073
Matthias Kloseb9621712010-04-24 17:59:49 +000011074$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011075
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011076
Guido van Rossum627b2d71993-12-24 10:39:16 +000011077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11080$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011081
Guido van Rossumda88dad1995-01-26 00:46:29 +000011082works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11084$as_echo_n "checking for working signed char... " >&6; }
11085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011086/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011087
Martin v. Löwis11437992002-04-12 09:54:03 +000011088int
11089main ()
11090{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011091signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011092 ;
11093 return 0;
11094}
11095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011096if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011097 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011098else
Skip Montanaro6dead952003-09-25 14:50:04 +000011099
Matthias Kloseb9621712010-04-24 17:59:49 +000011100$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011101
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011102
Guido van Rossum7f43da71994-08-01 12:15:30 +000011103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11106$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011107
Guido van Rossumda88dad1995-01-26 00:46:29 +000011108have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11110$as_echo_n "checking for prototypes... " >&6; }
11111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011112/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011113int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011114int
11115main ()
11116{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011117return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011118 ;
11119 return 0;
11120}
11121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011122if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011123
Matthias Kloseb9621712010-04-24 17:59:49 +000011124$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011125
Matthias Kloseb159a552010-04-25 21:00:44 +000011126 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11130$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011131
Guido van Rossumda88dad1995-01-26 00:46:29 +000011132works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11134$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011136/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011137
11138#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011139int foo(int x, ...) {
11140 va_list va;
11141 va_start(va, x);
11142 va_arg(va, int);
11143 va_arg(va, char *);
11144 va_arg(va, double);
11145 return 0;
11146}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011147
Martin v. Löwis11437992002-04-12 09:54:03 +000011148int
11149main ()
11150{
Guido van Rossum90eea071996-08-30 20:58:57 +000011151return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011152 ;
11153 return 0;
11154}
11155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011156if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011157
11158
Matthias Kloseb9621712010-04-24 17:59:49 +000011159$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011160
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011161 works=yes
11162
Guido van Rossum627b2d71993-12-24 10:39:16 +000011163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11166$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011167
Martin v. Löwisd6320502004-08-12 13:45:08 +000011168# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11170$as_echo_n "checking for socketpair... " >&6; }
11171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011172/* end confdefs.h. */
11173
11174#include <sys/types.h>
11175#include <sys/socket.h>
11176
11177int
11178main ()
11179{
11180void *x=socketpair
11181 ;
11182 return 0;
11183}
11184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011185if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011186
Matthias Kloseb9621712010-04-24 17:59:49 +000011187$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011188
Matthias Kloseb159a552010-04-25 21:00:44 +000011189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011190$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011191else
Matthias Kloseb9621712010-04-24 17:59:49 +000011192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11193$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011194
11195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011197
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011198# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11200$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011202/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011203#include <sys/types.h>
11204#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011205int
11206main ()
11207{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011208struct sockaddr x;
11209x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011210 ;
11211 return 0;
11212}
11213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011214if ac_fn_c_try_compile "$LINENO"; then :
11215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11216$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011217
Matthias Kloseb9621712010-04-24 17:59:49 +000011218$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011219
11220else
Matthias Kloseb9621712010-04-24 17:59:49 +000011221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11222$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011223
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011226
Guido van Rossumda88dad1995-01-26 00:46:29 +000011227va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11229$as_echo_n "checking whether va_list is an array... " >&6; }
11230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011231/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011232
11233#ifdef HAVE_STDARG_PROTOTYPES
11234#include <stdarg.h>
11235#else
11236#include <varargs.h>
11237#endif
11238
Martin v. Löwis11437992002-04-12 09:54:03 +000011239int
11240main ()
11241{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011242va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 ;
11244 return 0;
11245}
11246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011247if ac_fn_c_try_compile "$LINENO"; then :
11248
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011249else
Skip Montanaro6dead952003-09-25 14:50:04 +000011250
Martin v. Löwis11437992002-04-12 09:54:03 +000011251
Matthias Kloseb9621712010-04-24 17:59:49 +000011252$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011253
Guido van Rossumda88dad1995-01-26 00:46:29 +000011254 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011255
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11259$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011260
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011261# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011262
11263
Matthias Kloseb9621712010-04-24 17:59:49 +000011264ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011265if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011266
Matthias Kloseb9621712010-04-24 17:59:49 +000011267 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011268
Matthias Kloseb9621712010-04-24 17:59:49 +000011269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11270$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011271 OLD_CFLAGS=$CFLAGS
11272 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011274/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011275
11276# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011277
Martin v. Löwis11437992002-04-12 09:54:03 +000011278int
11279main ()
11280{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011281
11282 char *name;
11283 struct hostent *he, *res;
11284 char buffer[2048];
11285 int buflen = 2048;
11286 int h_errnop;
11287
11288 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011289
11290 ;
11291 return 0;
11292}
11293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011294if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011295
Matthias Kloseb9621712010-04-24 17:59:49 +000011296 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011297
Martin v. Löwis11437992002-04-12 09:54:03 +000011298
Matthias Kloseb9621712010-04-24 17:59:49 +000011299$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011300
Matthias Kloseb9621712010-04-24 17:59:49 +000011301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11302$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011303
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011304else
Skip Montanaro6dead952003-09-25 14:50:04 +000011305
Matthias Kloseb9621712010-04-24 17:59:49 +000011306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11307$as_echo "no" >&6; }
11308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11309$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011311/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011312
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011313# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011314
Martin v. Löwis11437992002-04-12 09:54:03 +000011315int
11316main ()
11317{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011318
11319 char *name;
11320 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011321 char buffer[2048];
11322 int buflen = 2048;
11323 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011324
Matthias Kloseb159a552010-04-25 21:00:44 +000011325 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011326
11327 ;
11328 return 0;
11329}
11330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011331if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011332
Matthias Kloseb9621712010-04-24 17:59:49 +000011333 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011334
Martin v. Löwis11437992002-04-12 09:54:03 +000011335
Matthias Kloseb159a552010-04-25 21:00:44 +000011336$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011337
Matthias Kloseb9621712010-04-24 17:59:49 +000011338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11339$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011340
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011341else
Skip Montanaro6dead952003-09-25 14:50:04 +000011342
Matthias Kloseb9621712010-04-24 17:59:49 +000011343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11344$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11346$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11348/* end confdefs.h. */
11349
11350# include <netdb.h>
11351
11352int
11353main ()
11354{
11355
11356 char *name;
11357 struct hostent *he;
11358 struct hostent_data data;
11359
11360 (void) gethostbyname_r(name, he, &data);
11361
11362 ;
11363 return 0;
11364}
11365_ACEOF
11366if ac_fn_c_try_compile "$LINENO"; then :
11367
11368 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11369
11370
11371$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11372
11373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11374$as_echo "yes" >&6; }
11375
11376else
11377
11378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11379$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011380
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011383
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011386
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011389 CFLAGS=$OLD_CFLAGS
11390
11391else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011392
Matthias Kloseb9621712010-04-24 17:59:49 +000011393 for ac_func in gethostbyname
11394do :
11395 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011396if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011398#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011399_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011400
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011401fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011402done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011403
Michael W. Hudson54241132001-12-07 15:38:26 +000011404
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011405fi
11406
Michael W. Hudson54241132001-12-07 15:38:26 +000011407
11408
11409
11410
11411
11412
Guido van Rossum627b2d71993-12-24 10:39:16 +000011413# checks for system services
11414# (none yet)
11415
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011416# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011417ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011418if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011419
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011420else
Matthias Kloseb9621712010-04-24 17:59:49 +000011421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11422$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011423if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011424 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011425else
Martin v. Löwis11437992002-04-12 09:54:03 +000011426 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011427LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011429/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011430
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011431/* Override any GCC internal prototype to avoid an error.
11432 Use char because int might match the return type of a GCC
11433 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011434#ifdef __cplusplus
11435extern "C"
11436#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011437char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011438int
11439main ()
11440{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011441return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011442 ;
11443 return 0;
11444}
11445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011446if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011447 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011448else
Matthias Kloseb9621712010-04-24 17:59:49 +000011449 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011451rm -f core conftest.err conftest.$ac_objext \
11452 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011453LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11456$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011457if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011458 cat >>confdefs.h <<_ACEOF
11459#define HAVE_LIBIEEE 1
11460_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011461
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011462 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011463
Guido van Rossum627b2d71993-12-24 10:39:16 +000011464fi
11465
Michael W. Hudson54241132001-12-07 15:38:26 +000011466
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011467fi
11468
Michael W. Hudson54241132001-12-07 15:38:26 +000011469
Guido van Rossum7f253911997-05-09 02:42:48 +000011470# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11472$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011473
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011474# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011475if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011476 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011477if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011478then
11479
Matthias Kloseb9621712010-04-24 17:59:49 +000011480$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011481
Matthias Kloseb9621712010-04-24 17:59:49 +000011482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11483$as_echo "yes" >&6; }
11484else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11485$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011486fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011487else
Matthias Kloseb9621712010-04-24 17:59:49 +000011488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11489$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011490fi
11491
Guido van Rossum7f253911997-05-09 02:42:48 +000011492
Guido van Rossum7f43da71994-08-01 12:15:30 +000011493# check for --with-libm=...
11494
Guido van Rossum563e7081996-09-10 18:20:48 +000011495case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011496Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011497*) LIBM=-lm
11498esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11500$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011502# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011503if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011504 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011505if test "$withval" = no
11506then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11508$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011509elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011510then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11512$as_echo "set LIBM=\"$withval\"" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011513else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011514fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011515else
Matthias Kloseb9621712010-04-24 17:59:49 +000011516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11517$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518fi
11519
Guido van Rossum7f43da71994-08-01 12:15:30 +000011520
11521# check for --with-libc=...
11522
Matthias Kloseb9621712010-04-24 17:59:49 +000011523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11524$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011526# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011527if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011528 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011529if test "$withval" = no
11530then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11532$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011533elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011534then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11536$as_echo "set LIBC=\"$withval\"" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011537else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011538fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011539else
Matthias Kloseb9621712010-04-24 17:59:49 +000011540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11541$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011542fi
11543
Guido van Rossum7f43da71994-08-01 12:15:30 +000011544
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011545# **************************************************
11546# * Check for various properties of floating point *
11547# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011548
Matthias Kloseb9621712010-04-24 17:59:49 +000011549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11550$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011551if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011552 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011553else
11554
Matthias Kloseb9621712010-04-24 17:59:49 +000011555if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011556 ac_cv_little_endian_double=no
11557else
Matthias Kloseb9621712010-04-24 17:59:49 +000011558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011559/* end confdefs.h. */
11560
11561#include <string.h>
11562int main() {
11563 double x = 9006104071832581.0;
11564 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11565 return 0;
11566 else
11567 return 1;
11568}
11569
11570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011571if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011572 ac_cv_little_endian_double=yes
11573else
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11577 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011578fi
11579
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011580fi
11581
Matthias Kloseb9621712010-04-24 17:59:49 +000011582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11583$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011584if test "$ac_cv_little_endian_double" = yes
11585then
11586
Matthias Kloseb9621712010-04-24 17:59:49 +000011587$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011588
11589fi
11590
Matthias Kloseb9621712010-04-24 17:59:49 +000011591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11592$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011593if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011594 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011595else
11596
Matthias Kloseb9621712010-04-24 17:59:49 +000011597if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011598 ac_cv_big_endian_double=no
11599else
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011601/* end confdefs.h. */
11602
11603#include <string.h>
11604int main() {
11605 double x = 9006104071832581.0;
11606 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11607 return 0;
11608 else
11609 return 1;
11610}
11611
11612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011613if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011614 ac_cv_big_endian_double=yes
11615else
Matthias Kloseb9621712010-04-24 17:59:49 +000011616 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11619 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011620fi
11621
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011622fi
11623
Matthias Kloseb9621712010-04-24 17:59:49 +000011624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11625$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011626if test "$ac_cv_big_endian_double" = yes
11627then
11628
Matthias Kloseb9621712010-04-24 17:59:49 +000011629$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011630
11631fi
11632
11633# Some ARM platforms use a mixed-endian representation for doubles.
11634# While Python doesn't currently have full support for these platforms
11635# (see e.g., issue 1762561), we can at least make sure that float <-> string
11636# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11638$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011639if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011640 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011641else
11642
Matthias Kloseb9621712010-04-24 17:59:49 +000011643if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011644 ac_cv_mixed_endian_double=no
11645else
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011647/* end confdefs.h. */
11648
11649#include <string.h>
11650int main() {
11651 double x = 9006104071832581.0;
11652 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11653 return 0;
11654 else
11655 return 1;
11656}
11657
11658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011659if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011660 ac_cv_mixed_endian_double=yes
11661else
Matthias Kloseb9621712010-04-24 17:59:49 +000011662 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011664rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11665 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011666fi
11667
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011668fi
11669
Matthias Kloseb9621712010-04-24 17:59:49 +000011670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11671$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011672if test "$ac_cv_mixed_endian_double" = yes
11673then
11674
Matthias Kloseb9621712010-04-24 17:59:49 +000011675$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011676
11677fi
11678
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011679# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011680# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011681# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011682# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011683# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011684# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011685
11686# This inline assembler syntax may also work for suncc and icc,
11687# so we try it on all platforms.
11688
Matthias Kloseb9621712010-04-24 17:59:49 +000011689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11690$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011692/* end confdefs.h. */
11693
11694int
11695main ()
11696{
11697
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011698 unsigned short cw;
11699 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11700 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011701
11702 ;
11703 return 0;
11704}
11705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011706if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011707 have_gcc_asm_for_x87=yes
11708else
Matthias Kloseb9621712010-04-24 17:59:49 +000011709 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011710fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11713$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011714if test "$have_gcc_asm_for_x87" = yes
11715then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011716
Matthias Kloseb9621712010-04-24 17:59:49 +000011717$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011718
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011720
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011721# Detect whether system arithmetic is subject to x87-style double
11722# rounding issues. The result of this test has little meaning on non
11723# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11724# mode is round-to-nearest and double rounding issues are present, and
11725# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11727$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011728# $BASECFLAGS may affect the result
11729ac_save_cc="$CC"
11730CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011731if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011732 ac_cv_x87_double_rounding=no
11733else
Matthias Kloseb9621712010-04-24 17:59:49 +000011734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011735/* end confdefs.h. */
11736
11737#include <stdlib.h>
11738#include <math.h>
11739int main() {
11740 volatile double x, y, z;
11741 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11742 x = 0.99999999999999989; /* 1-2**-53 */
11743 y = 1./x;
11744 if (y != 1.)
11745 exit(0);
11746 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11747 x = 1e16;
11748 y = 2.99999;
11749 z = x + y;
11750 if (z != 1e16+4.)
11751 exit(0);
11752 /* both tests show evidence of double rounding */
11753 exit(1);
11754}
11755
11756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011757if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011758 ac_cv_x87_double_rounding=no
11759else
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011761fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11763 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011764fi
11765
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011766CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11768$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011769if test "$ac_cv_x87_double_rounding" = yes
11770then
11771
Matthias Kloseb9621712010-04-24 17:59:49 +000011772$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011773
11774fi
11775
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011776# ************************************
11777# * Check for mathematical functions *
11778# ************************************
11779
11780LIBS_SAVE=$LIBS
11781LIBS="$LIBS $LIBM"
11782
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011783for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11784do :
11785 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11786ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11787if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11788 cat >>confdefs.h <<_ACEOF
11789#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11790_ACEOF
11791
11792fi
11793done
11794
11795for ac_func in hypot lgamma log1p round tgamma
11796do :
11797 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11798ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11799if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11800 cat >>confdefs.h <<_ACEOF
11801#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11802_ACEOF
11803
11804fi
11805done
11806
11807ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11808"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011809if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011810 ac_have_decl=1
11811else
11812 ac_have_decl=0
11813fi
11814
11815cat >>confdefs.h <<_ACEOF
11816#define HAVE_DECL_ISINF $ac_have_decl
11817_ACEOF
11818ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11819"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011820if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011821 ac_have_decl=1
11822else
11823 ac_have_decl=0
11824fi
11825
11826cat >>confdefs.h <<_ACEOF
11827#define HAVE_DECL_ISNAN $ac_have_decl
11828_ACEOF
11829ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11830"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011831if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011832 ac_have_decl=1
11833else
11834 ac_have_decl=0
11835fi
11836
11837cat >>confdefs.h <<_ACEOF
11838#define HAVE_DECL_ISFINITE $ac_have_decl
11839_ACEOF
11840
11841
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011842# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11843# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11845$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011846if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011847 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011848else
11849
Matthias Kloseb9621712010-04-24 17:59:49 +000011850if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011851 ac_cv_tanh_preserves_zero_sign=no
11852else
Matthias Kloseb9621712010-04-24 17:59:49 +000011853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011854/* end confdefs.h. */
11855
11856#include <math.h>
11857#include <stdlib.h>
11858int main() {
11859 /* return 0 if either negative zeros don't exist
11860 on this platform or if negative zeros exist
11861 and tanh(-0.) == -0. */
11862 if (atan2(0., -1.) == atan2(-0., -1.) ||
11863 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11864 else exit(1);
11865}
11866
11867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011868if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011869 ac_cv_tanh_preserves_zero_sign=yes
11870else
Matthias Kloseb9621712010-04-24 17:59:49 +000011871 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11874 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011875fi
11876
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011877fi
11878
Matthias Kloseb9621712010-04-24 17:59:49 +000011879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11880$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011881if test "$ac_cv_tanh_preserves_zero_sign" = yes
11882then
11883
Matthias Kloseb9621712010-04-24 17:59:49 +000011884$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011885
11886fi
11887
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011888if test "$ac_cv_func_log1p" = yes
11889then
11890 # On some versions of AIX, log1p(-0.) returns 0. instead of
11891 # -0. See issue #9920.
11892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11893$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011894 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011895 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011896else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011897
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011898 if test "$cross_compiling" = yes; then :
11899 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011900else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11902/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011903
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011904 #include <math.h>
11905 #include <stdlib.h>
11906 int main() {
11907 /* Fail if the signs of log1p(-0.) and -0. can be
11908 distinguished. */
11909 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11910 return 0;
11911 else
11912 return 1;
11913 }
11914
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011915_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011916if ac_fn_c_try_run "$LINENO"; then :
11917 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011918else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011919 ac_cv_log1p_drops_zero_sign=yes
11920fi
11921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11922 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011923fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011924
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011925fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011926
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
11928$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
11929fi
11930if test "$ac_cv_log1p_drops_zero_sign" = yes
11931then
11932
11933$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
11934
11935fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011936
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011937LIBS=$LIBS_SAVE
11938
Mark Dickinsona614f042009-11-28 12:48:43 +000011939# For multiprocessing module, check that sem_open
11940# actually works. For FreeBSD versions <= 7.2,
11941# the kernel module that provides POSIX semaphores
11942# isn't loaded by default, so an attempt to call
11943# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11945$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011946if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011947 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011948else
Matthias Kloseb9621712010-04-24 17:59:49 +000011949 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011950 ac_cv_posix_semaphores_enabled=yes
11951else
Matthias Kloseb9621712010-04-24 17:59:49 +000011952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011953/* end confdefs.h. */
11954
11955#include <unistd.h>
11956#include <fcntl.h>
11957#include <stdio.h>
11958#include <semaphore.h>
11959#include <sys/stat.h>
11960
11961int main(void) {
11962 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11963 if (a == SEM_FAILED) {
11964 perror("sem_open");
11965 return 1;
11966 }
11967 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011968 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011969 return 0;
11970}
11971
11972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011973if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011974 ac_cv_posix_semaphores_enabled=yes
11975else
Matthias Kloseb9621712010-04-24 17:59:49 +000011976 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11979 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011980fi
11981
11982
Mark Dickinsona614f042009-11-28 12:48:43 +000011983fi
11984
Matthias Kloseb9621712010-04-24 17:59:49 +000011985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11986$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011987if test $ac_cv_posix_semaphores_enabled = no
11988then
11989
Matthias Kloseb9621712010-04-24 17:59:49 +000011990$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011991
11992fi
11993
Mark Dickinson10683072009-04-18 21:18:19 +000011994# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11996$as_echo_n "checking for broken sem_getvalue... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011997if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011998 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011999else
Matthias Kloseb9621712010-04-24 17:59:49 +000012000 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012001 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012002else
Matthias Kloseb9621712010-04-24 17:59:49 +000012003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012004/* end confdefs.h. */
12005
12006#include <unistd.h>
12007#include <fcntl.h>
12008#include <stdio.h>
12009#include <semaphore.h>
12010#include <sys/stat.h>
12011
12012int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012013 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012014 int count;
12015 int res;
12016 if(a==SEM_FAILED){
12017 perror("sem_open");
12018 return 1;
12019
12020 }
12021 res = sem_getvalue(a, &count);
12022 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012023 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012024 return res==-1 ? 1 : 0;
12025}
12026
Mark Dickinson10683072009-04-18 21:18:19 +000012027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012028if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012029 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012030else
Matthias Kloseb9621712010-04-24 17:59:49 +000012031 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012033rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12034 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012035fi
12036
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012037
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012038fi
12039
Matthias Kloseb9621712010-04-24 17:59:49 +000012040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12041$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012042if test $ac_cv_broken_sem_getvalue = yes
12043then
12044
Matthias Kloseb9621712010-04-24 17:59:49 +000012045$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012046
12047fi
12048
Mark Dickinsonbd792642009-03-18 20:06:12 +000012049# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12051$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012052# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012053if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012054 enableval=$enable_big_digits; case $enable_big_digits in
12055yes)
12056 enable_big_digits=30 ;;
12057no)
12058 enable_big_digits=15 ;;
1205915|30)
12060 ;;
12061*)
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012062 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 +000012063esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12065$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012066
12067cat >>confdefs.h <<_ACEOF
12068#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12069_ACEOF
12070
12071
12072else
Matthias Kloseb9621712010-04-24 17:59:49 +000012073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12074$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012075fi
12076
12077
Guido van Rossumef2255b2000-03-10 22:30:29 +000012078# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012079ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012080if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012081
12082
Matthias Kloseb9621712010-04-24 17:59:49 +000012083$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012084
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012085 wchar_h="yes"
12086
Guido van Rossumef2255b2000-03-10 22:30:29 +000012087else
Martin v. Löwis11437992002-04-12 09:54:03 +000012088 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012089
12090fi
12091
Michael W. Hudson54241132001-12-07 15:38:26 +000012092
Martin v. Löwis11437992002-04-12 09:54:03 +000012093
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012094# determine wchar_t size
12095if test "$wchar_h" = yes
12096then
Matthias Kloseb9621712010-04-24 17:59:49 +000012097 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012098# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12099# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12100# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12102$as_echo_n "checking size of wchar_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012103if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012104 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012105else
Matthias Kloseb9621712010-04-24 17:59:49 +000012106 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12107"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012108
Martin v. Löwis11437992002-04-12 09:54:03 +000012109else
Matthias Kloseb9621712010-04-24 17:59:49 +000012110 if test "$ac_cv_type_wchar_t" = yes; then
12111 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12112$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012113as_fn_error 77 "cannot compute sizeof (wchar_t)
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012114See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012115 else
12116 ac_cv_sizeof_wchar_t=0
12117 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012119
Martin v. Löwis11437992002-04-12 09:54:03 +000012120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12122$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012123
12124
12125
Martin v. Löwis11437992002-04-12 09:54:03 +000012126cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012127#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012128_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012129
Michael W. Hudson54241132001-12-07 15:38:26 +000012130
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012131fi
12132
Matthias Kloseb9621712010-04-24 17:59:49 +000012133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12134$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012135have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012137/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012138
12139#include <tcl.h>
12140#if TCL_UTF_MAX != 6
12141# error "NOT UCS4_TCL"
12142#endif
12143int
12144main ()
12145{
12146
12147 ;
12148 return 0;
12149}
12150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012151if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012152
12153
Matthias Kloseb9621712010-04-24 17:59:49 +000012154$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012155
12156 have_ucs4_tcl=yes
12157
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12161$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012162
Skip Montanaro6dead952003-09-25 14:50:04 +000012163# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012164if test "$wchar_h" = yes
12165then
12166 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12168$as_echo_n "checking whether wchar_t is signed... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012169 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012171else
12172
Matthias Kloseb9621712010-04-24 17:59:49 +000012173 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012174 ac_cv_wchar_t_signed=yes
12175else
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012177/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012178
12179 #include <wchar.h>
12180 int main()
12181 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012182 /* Success: exit code 0 */
12183 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012184 }
12185
12186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012187if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012188 ac_cv_wchar_t_signed=yes
12189else
Matthias Kloseb9621712010-04-24 17:59:49 +000012190 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012192rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12193 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012194fi
12195
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012196fi
12197
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12199$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012200fi
12201
Matthias Kloseb9621712010-04-24 17:59:49 +000012202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12203$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012204
12205# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012206if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012207 withval=$with_wide_unicode;
12208if test "$withval" != no
12209then unicode_size="4"
12210else unicode_size="2"
12211fi
12212
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012213else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214
Georg Brandl52d168a2008-01-07 18:10:24 +000012215case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012216 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012217 *) unicode_size="2" ;;
12218esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012219
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012220fi
12221
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012222
12223
Georg Brandl52d168a2008-01-07 18:10:24 +000012224case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012225 4)
12226 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12227
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012228 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012229 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012230 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012231 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012232esac
12233
Michael W. Hudson54241132001-12-07 15:38:26 +000012234
Martin v. Löwis11437992002-04-12 09:54:03 +000012235
Georg Brandl52d168a2008-01-07 18:10:24 +000012236# wchar_t is only usable if it maps to an unsigned type
12237if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012238 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012239then
12240 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012241
Matthias Kloseb9621712010-04-24 17:59:49 +000012242$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012243
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012245
Georg Brandl52d168a2008-01-07 18:10:24 +000012246elif test "$ac_cv_sizeof_short" = "$unicode_size"
12247then
12248 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012249 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012250
Georg Brandl52d168a2008-01-07 18:10:24 +000012251elif test "$ac_cv_sizeof_long" = "$unicode_size"
12252then
12253 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012254 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012255
Georg Brandl52d168a2008-01-07 18:10:24 +000012256else
12257 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12260$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012261
12262# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12264$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012265if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012266 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012267else
Matthias Kloseb9621712010-04-24 17:59:49 +000012268 ac_cv_c_bigendian=unknown
12269 # See if we're dealing with a universal compiler.
12270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12271/* end confdefs.h. */
12272#ifndef __APPLE_CC__
12273 not a universal capable compiler
12274 #endif
12275 typedef int dummy;
12276
Skip Montanaro6dead952003-09-25 14:50:04 +000012277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012278if ac_fn_c_try_compile "$LINENO"; then :
12279
12280 # Check for potential -arch flags. It is not universal unless
12281 # there are at least two -arch flags with different values.
12282 ac_arch=
12283 ac_prev=
12284 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12285 if test -n "$ac_prev"; then
12286 case $ac_word in
12287 i?86 | x86_64 | ppc | ppc64)
12288 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12289 ac_arch=$ac_word
12290 else
12291 ac_cv_c_bigendian=universal
12292 break
12293 fi
12294 ;;
12295 esac
12296 ac_prev=
12297 elif test "x$ac_word" = "x-arch"; then
12298 ac_prev=arch
12299 fi
12300 done
12301fi
12302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12303 if test $ac_cv_c_bigendian = unknown; then
12304 # See if sys/param.h defines the BYTE_ORDER macro.
12305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012306/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012307#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012308 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012309
Martin v. Löwis11437992002-04-12 09:54:03 +000012310int
12311main ()
12312{
Matthias Kloseb9621712010-04-24 17:59:49 +000012313#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12314 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12315 && LITTLE_ENDIAN)
12316 bogus endian macros
12317 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012318
12319 ;
12320 return 0;
12321}
12322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012323if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012324 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012326/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012327#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012328 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012329
Martin v. Löwis11437992002-04-12 09:54:03 +000012330int
12331main ()
12332{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012333#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 not big endian
12335 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012336
12337 ;
12338 return 0;
12339}
12340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012341if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012342 ac_cv_c_bigendian=yes
12343else
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012347fi
12348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12349 fi
12350 if test $ac_cv_c_bigendian = unknown; then
12351 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012353/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012354#include <limits.h>
12355
Martin v. Löwis11437992002-04-12 09:54:03 +000012356int
12357main ()
12358{
Matthias Kloseb9621712010-04-24 17:59:49 +000012359#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12360 bogus endian macros
12361 #endif
12362
Martin v. Löwis11437992002-04-12 09:54:03 +000012363 ;
12364 return 0;
12365}
12366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012367if ac_fn_c_try_compile "$LINENO"; then :
12368 # It does; now see whether it defined to _BIG_ENDIAN or not.
12369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12370/* end confdefs.h. */
12371#include <limits.h>
12372
12373int
12374main ()
12375{
12376#ifndef _BIG_ENDIAN
12377 not big endian
12378 #endif
12379
12380 ;
12381 return 0;
12382}
12383_ACEOF
12384if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012385 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012386else
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12390fi
12391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12392 fi
12393 if test $ac_cv_c_bigendian = unknown; then
12394 # Compile a test program.
12395 if test "$cross_compiling" = yes; then :
12396 # Try to guess by grepping values from an object file.
12397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12398/* end confdefs.h. */
12399short int ascii_mm[] =
12400 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12401 short int ascii_ii[] =
12402 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12403 int use_ascii (int i) {
12404 return ascii_mm[i] + ascii_ii[i];
12405 }
12406 short int ebcdic_ii[] =
12407 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12408 short int ebcdic_mm[] =
12409 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12410 int use_ebcdic (int i) {
12411 return ebcdic_mm[i] + ebcdic_ii[i];
12412 }
12413 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012414
Matthias Kloseb9621712010-04-24 17:59:49 +000012415int
12416main ()
12417{
12418return use_ascii (foo) == use_ebcdic (foo);
12419 ;
12420 return 0;
12421}
12422_ACEOF
12423if ac_fn_c_try_compile "$LINENO"; then :
12424 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12425 ac_cv_c_bigendian=yes
12426 fi
12427 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12428 if test "$ac_cv_c_bigendian" = unknown; then
12429 ac_cv_c_bigendian=no
12430 else
12431 # finding both strings is unlikely to happen, but who knows?
12432 ac_cv_c_bigendian=unknown
12433 fi
12434 fi
12435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012437else
Matthias Kloseb9621712010-04-24 17:59:49 +000012438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012439/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012441int
12442main ()
12443{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444
Matthias Kloseb9621712010-04-24 17:59:49 +000012445 /* Are we little or big endian? From Harbison&Steele. */
12446 union
12447 {
12448 long int l;
12449 char c[sizeof (long int)];
12450 } u;
12451 u.l = 1;
12452 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453
12454 ;
12455 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012456}
Martin v. Löwis11437992002-04-12 09:54:03 +000012457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012458if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012459 ac_cv_c_bigendian=no
12460else
Matthias Kloseb9621712010-04-24 17:59:49 +000012461 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12464 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466
Matthias Kloseb9621712010-04-24 17:59:49 +000012467 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12470$as_echo "$ac_cv_c_bigendian" >&6; }
12471 case $ac_cv_c_bigendian in #(
12472 yes)
12473 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12474;; #(
12475 no)
12476 ;; #(
12477 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012478
Matthias Kloseb9621712010-04-24 17:59:49 +000012479$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012480
Matthias Kloseb9621712010-04-24 17:59:49 +000012481 ;; #(
12482 *)
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012483 as_fn_error $? "unknown endianness
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012484 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012486
Michael W. Hudson54241132001-12-07 15:38:26 +000012487
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012488# ABI version string for Python extension modules. This appears between the
12489# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12490# from the following attributes which affect the ABI of this Python build (in
12491# this order):
12492#
12493# * The Python implementation (always 'cpython-' for us)
12494# * The major and minor version numbers
12495# * --with-pydebug (adds a 'd')
12496# * --with-pymalloc (adds a 'm')
12497# * --with-wide-unicode (adds a 'u')
12498#
12499# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012500# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12501# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012502
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12504$as_echo_n "checking ABIFLAGS... " >&6; }
12505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12506$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12508$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012509SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12511$as_echo "$SOABI" >&6; }
12512
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12514$as_echo_n "checking LDVERSION... " >&6; }
12515LDVERSION='$(VERSION)$(ABIFLAGS)'
12516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12517$as_echo "$LDVERSION" >&6; }
12518
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012519# SO is the extension of shared libraries `(including the dot!)
12520# -- usually .so, .sl on HP-UX, .dll on Cygwin
12521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12522$as_echo_n "checking SO... " >&6; }
12523if test -z "$SO"
12524then
12525 case $ac_sys_system in
12526 hp*|HP*)
12527 case `uname -m` in
12528 ia64) SO=.so;;
12529 *) SO=.sl;;
12530 esac
12531 ;;
12532 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012533 Linux*|GNU*)
12534 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012535 *) SO=.so;;
12536 esac
12537else
12538 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012539 echo
12540 echo '====================================================================='
12541 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012542 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012543 echo '+ Do you really mean to change the extension for shared libraries? +'
12544 echo '+ Continuing in 10 seconds to let you to ponder. +'
12545 echo '+ +'
12546 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012547 sleep 10
12548fi
12549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12550$as_echo "$SO" >&6; }
12551
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012552# Check whether right shifting a negative integer extends the sign bit
12553# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12555$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012556if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012557 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012558else
Martin v. Löwis11437992002-04-12 09:54:03 +000012559
Matthias Kloseb9621712010-04-24 17:59:49 +000012560if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012561 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012562else
Matthias Kloseb9621712010-04-24 17:59:49 +000012563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012564/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012565
12566int main()
12567{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012568 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012569}
12570
Martin v. Löwis11437992002-04-12 09:54:03 +000012571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012572if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012573 ac_cv_rshift_extends_sign=yes
12574else
Matthias Kloseb9621712010-04-24 17:59:49 +000012575 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012576fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12578 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012579fi
12580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012581fi
12582
Matthias Kloseb9621712010-04-24 17:59:49 +000012583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12584$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012585if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012586then
Martin v. Löwis11437992002-04-12 09:54:03 +000012587
Matthias Kloseb9621712010-04-24 17:59:49 +000012588$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012589
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012590fi
12591
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012592# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12594$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012595if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012596 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012597else
Martin v. Löwis11437992002-04-12 09:54:03 +000012598
Matthias Kloseb9621712010-04-24 17:59:49 +000012599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012600/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012601#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012602int
12603main ()
12604{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012605
12606 FILE *f = fopen("/dev/null", "r");
12607 flockfile(f);
12608 getc_unlocked(f);
12609 funlockfile(f);
12610
Martin v. Löwis11437992002-04-12 09:54:03 +000012611 ;
12612 return 0;
12613}
12614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012615if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012616 ac_cv_have_getc_unlocked=yes
12617else
Matthias Kloseb9621712010-04-24 17:59:49 +000012618 ac_cv_have_getc_unlocked=no
12619fi
12620rm -f core conftest.err conftest.$ac_objext \
12621 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012623
Matthias Kloseb9621712010-04-24 17:59:49 +000012624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12625$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012626if test "$ac_cv_have_getc_unlocked" = yes
12627then
Martin v. Löwis11437992002-04-12 09:54:03 +000012628
Matthias Kloseb9621712010-04-24 17:59:49 +000012629$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012630
12631fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012632
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012633# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012634# save the value of LIBS so we don't actually link Python with readline
12635LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012636
Gregory P. Smith18820942008-09-07 06:24:49 +000012637# On some systems we need to link readline to a termcap compatible
12638# library. NOTE: Keep the precedence of listed libraries synchronised
12639# with setup.py.
12640py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12642$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012643for py_libtermcap in "" ncursesw ncurses curses termcap; do
12644 if test -z "$py_libtermcap"; then
12645 READLINE_LIBS="-lreadline"
12646 else
12647 READLINE_LIBS="-lreadline -l$py_libtermcap"
12648 fi
12649 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012651/* end confdefs.h. */
12652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012653/* Override any GCC internal prototype to avoid an error.
12654 Use char because int might match the return type of a GCC
12655 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012656#ifdef __cplusplus
12657extern "C"
12658#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012659char readline ();
12660int
12661main ()
12662{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012663return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012664 ;
12665 return 0;
12666}
12667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012668if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012669 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012670fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012671rm -f core conftest.err conftest.$ac_objext \
12672 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012673 if test $py_cv_lib_readline = yes; then
12674 break
12675 fi
12676done
12677# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12678#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012679if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12681$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012682else
Matthias Kloseb9621712010-04-24 17:59:49 +000012683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12684$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012685
Matthias Kloseb9621712010-04-24 17:59:49 +000012686$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012687
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012688fi
12689
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012690# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12692$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012693if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012695else
12696 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012697LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012699/* end confdefs.h. */
12700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012701/* Override any GCC internal prototype to avoid an error.
12702 Use char because int might match the return type of a GCC
12703 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012704#ifdef __cplusplus
12705extern "C"
12706#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012707char rl_callback_handler_install ();
12708int
12709main ()
12710{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012711return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012712 ;
12713 return 0;
12714}
12715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012716if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012717 ac_cv_lib_readline_rl_callback_handler_install=yes
12718else
Matthias Kloseb9621712010-04-24 17:59:49 +000012719 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012721rm -f core conftest.err conftest.$ac_objext \
12722 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012723LIBS=$ac_check_lib_save_LIBS
12724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12726$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012727if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012728
Matthias Kloseb9621712010-04-24 17:59:49 +000012729$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012730
12731fi
12732
12733
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012734# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012736/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012737#include <readline/readline.h>
12738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012739if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012740 have_readline=yes
12741else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012742 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012743
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012744fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012745rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012746if test $have_readline = yes
12747then
Matthias Kloseb9621712010-04-24 17:59:49 +000012748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012749/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012750#include <readline/readline.h>
12751
12752_ACEOF
12753if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012754 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012755
Matthias Kloseb9621712010-04-24 17:59:49 +000012756$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012757
12758fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012759rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012760
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012762/* end confdefs.h. */
12763#include <readline/readline.h>
12764
12765_ACEOF
12766if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012767 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012768
Matthias Kloseb9621712010-04-24 17:59:49 +000012769$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012770
12771fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012772rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012773
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012774fi
12775
Martin v. Löwis0daad592001-09-30 21:09:59 +000012776# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12778$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012779if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012780 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012781else
Martin v. Löwis11437992002-04-12 09:54:03 +000012782 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012783LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012787/* Override any GCC internal prototype to avoid an error.
12788 Use char because int might match the return type of a GCC
12789 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012790#ifdef __cplusplus
12791extern "C"
12792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012793char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012794int
12795main ()
12796{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012797return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012798 ;
12799 return 0;
12800}
12801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012802if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012803 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012804else
Matthias Kloseb9621712010-04-24 17:59:49 +000012805 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012807rm -f core conftest.err conftest.$ac_objext \
12808 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012809LIBS=$ac_check_lib_save_LIBS
12810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12812$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012813if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012814
Matthias Kloseb9621712010-04-24 17:59:49 +000012815$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012816
Martin v. Löwis0daad592001-09-30 21:09:59 +000012817fi
12818
Michael W. Hudson54241132001-12-07 15:38:26 +000012819
Thomas Wouters89d996e2007-09-08 17:39:28 +000012820# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12822$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012823if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012824 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012825else
12826 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012827LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012829/* end confdefs.h. */
12830
12831/* Override any GCC internal prototype to avoid an error.
12832 Use char because int might match the return type of a GCC
12833 builtin and then its argument prototype would still apply. */
12834#ifdef __cplusplus
12835extern "C"
12836#endif
12837char rl_completion_display_matches_hook ();
12838int
12839main ()
12840{
12841return rl_completion_display_matches_hook ();
12842 ;
12843 return 0;
12844}
12845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012846if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012847 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12848else
Matthias Kloseb9621712010-04-24 17:59:49 +000012849 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012850fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012851rm -f core conftest.err conftest.$ac_objext \
12852 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012853LIBS=$ac_check_lib_save_LIBS
12854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12856$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012857if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012858
Matthias Kloseb9621712010-04-24 17:59:49 +000012859$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012860
12861fi
12862
12863
Martin v. Löwis0daad592001-09-30 21:09:59 +000012864# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12866$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012867if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012868 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012869else
Martin v. Löwis11437992002-04-12 09:54:03 +000012870 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012871LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012875/* Override any GCC internal prototype to avoid an error.
12876 Use char because int might match the return type of a GCC
12877 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012878#ifdef __cplusplus
12879extern "C"
12880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012881char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012882int
12883main ()
12884{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012885return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012886 ;
12887 return 0;
12888}
12889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012890if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012892else
Matthias Kloseb9621712010-04-24 17:59:49 +000012893 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012895rm -f core conftest.err conftest.$ac_objext \
12896 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012897LIBS=$ac_check_lib_save_LIBS
12898fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12900$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012901if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012902
Matthias Kloseb9621712010-04-24 17:59:49 +000012903$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012904
Guido van Rossum353ae582001-07-10 16:45:32 +000012905fi
12906
Jack Jansendd19cf82001-12-06 22:36:17 +000012907
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012908# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012910/* end confdefs.h. */
12911#include <readline/readline.h>
12912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012913if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012914 have_readline=yes
12915else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012916 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012917
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012918fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012919rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012920if test $have_readline = yes
12921then
Matthias Kloseb9621712010-04-24 17:59:49 +000012922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012923/* end confdefs.h. */
12924#include <readline/readline.h>
12925
12926_ACEOF
12927if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012928 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012929
Matthias Kloseb9621712010-04-24 17:59:49 +000012930$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012931
12932fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012933rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012934
12935fi
12936
Martin v. Löwis82bca632006-02-10 20:49:30 +000012937# End of readline checks: restore LIBS
12938LIBS=$LIBS_no_readline
12939
Matthias Kloseb9621712010-04-24 17:59:49 +000012940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12941$as_echo_n "checking for broken nice()... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012942if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012943 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012944else
Martin v. Löwis11437992002-04-12 09:54:03 +000012945
Matthias Kloseb9621712010-04-24 17:59:49 +000012946if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012947 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012948else
Matthias Kloseb9621712010-04-24 17:59:49 +000012949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012950/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012951
12952int main()
12953{
12954 int val1 = nice(1);
12955 if (val1 != -1 && val1 == nice(2))
12956 exit(0);
12957 exit(1);
12958}
12959
Martin v. Löwis11437992002-04-12 09:54:03 +000012960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012961if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012962 ac_cv_broken_nice=yes
12963else
Matthias Kloseb9621712010-04-24 17:59:49 +000012964 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012965fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012966rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12967 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012968fi
12969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012970fi
12971
Matthias Kloseb9621712010-04-24 17:59:49 +000012972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12973$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012974if test "$ac_cv_broken_nice" = yes
12975then
Martin v. Löwis11437992002-04-12 09:54:03 +000012976
Matthias Kloseb9621712010-04-24 17:59:49 +000012977$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012978
12979fi
12980
Matthias Kloseb9621712010-04-24 17:59:49 +000012981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12982$as_echo_n "checking for broken poll()... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012983if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012984 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012985else
Matthias Kloseb9621712010-04-24 17:59:49 +000012986 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012987 ac_cv_broken_poll=no
12988else
Matthias Kloseb9621712010-04-24 17:59:49 +000012989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012990/* end confdefs.h. */
12991
12992#include <poll.h>
12993
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012994int main()
12995{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012996 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012997 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012998
12999 close (42);
13000
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013001 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013002 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013003 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013004 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013005 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013006 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013007 return 1;
13008}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013009
13010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013011if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013012 ac_cv_broken_poll=yes
13013else
Matthias Kloseb9621712010-04-24 17:59:49 +000013014 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013016rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13017 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013019
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013020fi
13021
Matthias Kloseb9621712010-04-24 17:59:49 +000013022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13023$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013024if test "$ac_cv_broken_poll" = yes
13025then
13026
Matthias Kloseb9621712010-04-24 17:59:49 +000013027$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013028
13029fi
13030
Brett Cannon43802422005-02-10 20:48:03 +000013031# 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 +000013032# (which is not required by ISO C or UNIX spec) and/or if we support
13033# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013034ac_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 +000013035#include <$ac_cv_struct_tm>
13036
Matthias Kloseb9621712010-04-24 17:59:49 +000013037"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013038if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013039
13040cat >>confdefs.h <<_ACEOF
13041#define HAVE_STRUCT_TM_TM_ZONE 1
13042_ACEOF
13043
13044
13045fi
13046
13047if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13048
Matthias Kloseb9621712010-04-24 17:59:49 +000013049$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013050
13051else
Matthias Kloseb9621712010-04-24 17:59:49 +000013052 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13053"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013054if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013056else
Matthias Kloseb9621712010-04-24 17:59:49 +000013057 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013058fi
13059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013060cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013061#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013062_ACEOF
13063
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13065$as_echo_n "checking for tzname... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013066if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013068else
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013070/* end confdefs.h. */
13071#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013072#if !HAVE_DECL_TZNAME
13073extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013074#endif
13075
13076int
13077main ()
13078{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013079return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013080 ;
13081 return 0;
13082}
13083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013084if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013085 ac_cv_var_tzname=yes
13086else
Matthias Kloseb9621712010-04-24 17:59:49 +000013087 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013089rm -f core conftest.err conftest.$ac_objext \
13090 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13093$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013094 if test $ac_cv_var_tzname = yes; then
13095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013097
13098 fi
13099fi
13100
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013101
Martin v. Löwis1d459062005-03-14 21:23:33 +000013102# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13104$as_echo_n "checking for working tzset()... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013105if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013106 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013107else
13108
Matthias Kloseb9621712010-04-24 17:59:49 +000013109if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013110 ac_cv_working_tzset=no
13111else
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013113/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013114
13115#include <stdlib.h>
13116#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013117#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013118
13119#if HAVE_TZNAME
13120extern char *tzname[];
13121#endif
13122
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013123int main()
13124{
Brett Cannon18367812003-09-19 00:59:16 +000013125 /* Note that we need to ensure that not only does tzset(3)
13126 do 'something' with localtime, but it works as documented
13127 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013128 This includes making sure that tzname is set properly if
13129 tm->tm_zone does not exist since it is the alternative way
13130 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013131
13132 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013133 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013134 */
13135
Martin v. Löwis1d459062005-03-14 21:23:33 +000013136 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013137 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13138
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013139 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013140 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013141 if (localtime(&groundhogday)->tm_hour != 0)
13142 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013143#if HAVE_TZNAME
13144 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13145 if (strcmp(tzname[0], "UTC") ||
13146 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13147 exit(1);
13148#endif
Brett Cannon18367812003-09-19 00:59:16 +000013149
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013150 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013151 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013152 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013153 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013154#if HAVE_TZNAME
13155 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13156 exit(1);
13157#endif
Brett Cannon18367812003-09-19 00:59:16 +000013158
13159 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13160 tzset();
13161 if (localtime(&groundhogday)->tm_hour != 11)
13162 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013163#if HAVE_TZNAME
13164 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13165 exit(1);
13166#endif
13167
13168#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013169 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13170 exit(1);
13171 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13172 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013173#endif
Brett Cannon18367812003-09-19 00:59:16 +000013174
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013175 exit(0);
13176}
13177
13178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013179if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013180 ac_cv_working_tzset=yes
13181else
Matthias Kloseb9621712010-04-24 17:59:49 +000013182 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013184rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13185 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013186fi
13187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013188fi
13189
Matthias Kloseb9621712010-04-24 17:59:49 +000013190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13191$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013192if test "$ac_cv_working_tzset" = yes
13193then
13194
Matthias Kloseb9621712010-04-24 17:59:49 +000013195$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013196
13197fi
13198
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013199# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13201$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013202if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013203 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +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. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013207#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013208int
13209main ()
13210{
13211
13212struct stat st;
13213st.st_mtim.tv_nsec = 1;
13214
13215 ;
13216 return 0;
13217}
13218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013219if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013220 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013221else
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +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_stat_tv_nsec" >&5
13228$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013229if test "$ac_cv_stat_tv_nsec" = yes
13230then
13231
Matthias Kloseb9621712010-04-24 17:59:49 +000013232$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013233
13234fi
13235
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013236# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13238$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013239if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013240 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013241else
Matthias Kloseb9621712010-04-24 17:59:49 +000013242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013243/* end confdefs.h. */
13244#include <sys/stat.h>
13245int
13246main ()
13247{
13248
13249struct stat st;
13250st.st_mtimespec.tv_nsec = 1;
13251
13252 ;
13253 return 0;
13254}
13255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013256if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013257 ac_cv_stat_tv_nsec2=yes
13258else
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +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_stat_tv_nsec2" >&5
13265$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013266if test "$ac_cv_stat_tv_nsec2" = yes
13267then
13268
Matthias Kloseb9621712010-04-24 17:59:49 +000013269$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013270
13271fi
13272
Jack Jansen666b1e72001-10-31 12:11:48 +000013273# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13275$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013276if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013277 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013278else
Matthias Kloseb9621712010-04-24 17:59:49 +000013279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013280/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013281#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013282int
13283main ()
13284{
Jack Jansen666b1e72001-10-31 12:11:48 +000013285
13286 int rtn;
13287 rtn = mvwdelch(0,0,0);
13288
Martin v. Löwis11437992002-04-12 09:54:03 +000013289 ;
13290 return 0;
13291}
13292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013293if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013294 ac_cv_mvwdelch_is_expression=yes
13295else
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13299fi
13300
Matthias Kloseb9621712010-04-24 17:59:49 +000013301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13302$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013303
13304if test "$ac_cv_mvwdelch_is_expression" = yes
13305then
Martin v. Löwis11437992002-04-12 09:54:03 +000013306
Matthias Kloseb9621712010-04-24 17:59:49 +000013307$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013308
13309fi
13310
Matthias Kloseb9621712010-04-24 17:59:49 +000013311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13312$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013313if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013315else
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013317/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013318#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013319int
13320main ()
13321{
Jack Jansen666b1e72001-10-31 12:11:48 +000013322
13323 WINDOW *w;
13324 w->_flags = 0;
13325
Martin v. Löwis11437992002-04-12 09:54:03 +000013326 ;
13327 return 0;
13328}
13329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013330if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013331 ac_cv_window_has_flags=yes
13332else
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13336fi
13337
Matthias Kloseb9621712010-04-24 17:59:49 +000013338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13339$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013340
Jack Jansen666b1e72001-10-31 12:11:48 +000013341
13342if test "$ac_cv_window_has_flags" = yes
13343then
Martin v. Löwis11437992002-04-12 09:54:03 +000013344
Matthias Kloseb9621712010-04-24 17:59:49 +000013345$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013346
13347fi
13348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13350$as_echo_n "checking for is_term_resized... " >&6; }
13351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013352/* end confdefs.h. */
13353#include <curses.h>
13354int
13355main ()
13356{
13357void *x=is_term_resized
13358 ;
13359 return 0;
13360}
13361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013362if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013363
Matthias Kloseb9621712010-04-24 17:59:49 +000013364$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013365
Matthias Kloseb159a552010-04-25 21:00:44 +000013366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013367$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013368else
Matthias Kloseb9621712010-04-24 17:59:49 +000013369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13370$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013371
13372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13374
Matthias Kloseb9621712010-04-24 17:59:49 +000013375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13376$as_echo_n "checking for resize_term... " >&6; }
13377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013378/* end confdefs.h. */
13379#include <curses.h>
13380int
13381main ()
13382{
13383void *x=resize_term
13384 ;
13385 return 0;
13386}
13387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013388if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013389
Matthias Kloseb9621712010-04-24 17:59:49 +000013390$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013391
Matthias Kloseb159a552010-04-25 21:00:44 +000013392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013393$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013394else
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13396$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013397
13398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13400
Matthias Kloseb9621712010-04-24 17:59:49 +000013401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13402$as_echo_n "checking for resizeterm... " >&6; }
13403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013404/* end confdefs.h. */
13405#include <curses.h>
13406int
13407main ()
13408{
13409void *x=resizeterm
13410 ;
13411 return 0;
13412}
13413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013414if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013415
Matthias Kloseb9621712010-04-24 17:59:49 +000013416$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013417
Matthias Kloseb159a552010-04-25 21:00:44 +000013418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013419$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013420else
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13422$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013423
13424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13428$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013429
13430if test -r /dev/ptmx
13431then
Matthias Kloseb9621712010-04-24 17:59:49 +000013432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13433$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013436
Thomas Wouters89f507f2006-12-13 04:49:30 +000013437else
Matthias Kloseb9621712010-04-24 17:59:49 +000013438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13439$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013440fi
13441
Matthias Kloseb9621712010-04-24 17:59:49 +000013442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13443$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013444
13445if test -r /dev/ptc
13446then
Matthias Kloseb9621712010-04-24 17:59:49 +000013447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13448$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013449
Matthias Kloseb9621712010-04-24 17:59:49 +000013450$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013451
Thomas Wouters89f507f2006-12-13 04:49:30 +000013452else
Matthias Kloseb9621712010-04-24 17:59:49 +000013453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13454$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013455fi
13456
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013457if test "$have_long_long" = yes
13458then
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13460$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013461 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013462 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013463else
Matthias Kloseb9621712010-04-24 17:59:49 +000013464 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013465 ac_cv_have_long_long_format=no
13466else
Matthias Kloseb9621712010-04-24 17:59:49 +000013467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013468/* end confdefs.h. */
13469
13470 #include <stdio.h>
13471 #include <stddef.h>
13472 #include <string.h>
13473
13474 #ifdef HAVE_SYS_TYPES_H
13475 #include <sys/types.h>
13476 #endif
13477
13478 int main()
13479 {
13480 char buffer[256];
13481
13482 if (sprintf(buffer, "%lld", (long long)123) < 0)
13483 return 1;
13484 if (strcmp(buffer, "123"))
13485 return 1;
13486
13487 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13488 return 1;
13489 if (strcmp(buffer, "-123"))
13490 return 1;
13491
13492 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13493 return 1;
13494 if (strcmp(buffer, "123"))
13495 return 1;
13496
13497 return 0;
13498 }
13499
13500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013501if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013502 ac_cv_have_long_long_format=yes
13503else
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013505fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13507 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013508fi
13509
13510
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013511fi
13512
Matthias Kloseb9621712010-04-24 17:59:49 +000013513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13514$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013515fi
13516
Mark Dickinson89d7d412009-12-31 20:50:59 +000013517if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013518then
13519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013521
13522fi
13523
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013524if test $ac_sys_system = Darwin
13525then
13526 LIBS="$LIBS -framework CoreFoundation"
13527fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013528
Matthias Kloseb9621712010-04-24 17:59:49 +000013529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13530$as_echo_n "checking for %zd printf() format support... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013531if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013533else
Matthias Kloseb9621712010-04-24 17:59:49 +000013534 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013535 ac_cv_have_size_t_format="cross -- assuming yes"
13536
Thomas Wouters477c8d52006-05-27 19:21:47 +000013537else
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013539/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013540
Thomas Wouters477c8d52006-05-27 19:21:47 +000013541#include <stdio.h>
13542#include <stddef.h>
13543#include <string.h>
13544
Christian Heimes2c181612007-12-17 20:04:13 +000013545#ifdef HAVE_SYS_TYPES_H
13546#include <sys/types.h>
13547#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013548
13549#ifdef HAVE_SSIZE_T
13550typedef ssize_t Py_ssize_t;
13551#elif SIZEOF_VOID_P == SIZEOF_LONG
13552typedef long Py_ssize_t;
13553#else
13554typedef int Py_ssize_t;
13555#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013556
Christian Heimes2c181612007-12-17 20:04:13 +000013557int main()
13558{
13559 char buffer[256];
13560
Thomas Wouters477c8d52006-05-27 19:21:47 +000013561 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13562 return 1;
13563
Thomas Wouters89f507f2006-12-13 04:49:30 +000013564 if (strcmp(buffer, "123"))
13565 return 1;
13566
13567 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13568 return 1;
13569
13570 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013571 return 1;
13572
13573 return 0;
13574}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013575
Thomas Wouters477c8d52006-05-27 19:21:47 +000013576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013577if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013578 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013579else
Matthias Kloseb9621712010-04-24 17:59:49 +000013580 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13583 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013584fi
13585
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013586fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13588$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013589if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013590
Matthias Kloseb9621712010-04-24 17:59:49 +000013591$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013592
13593fi
13594
Matthias Kloseb9621712010-04-24 17:59:49 +000013595ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013596#ifdef HAVE_SYS_TYPES_H
13597#include <sys/types.h>
13598#endif
13599#ifdef HAVE_SYS_SOCKET_H
13600#include <sys/socket.h>
13601#endif
13602
Matthias Kloseb9621712010-04-24 17:59:49 +000013603"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013604if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013605
Martin v. Löwis11437992002-04-12 09:54:03 +000013606else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013607
Matthias Kloseb9621712010-04-24 17:59:49 +000013608$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013609
13610fi
13611
Michael W. Hudson54241132001-12-07 15:38:26 +000013612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13614$as_echo_n "checking for broken mbstowcs... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013615if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013617else
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013619 ac_cv_broken_mbstowcs=no
13620else
Matthias Kloseb9621712010-04-24 17:59:49 +000013621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013622/* end confdefs.h. */
13623
13624#include<stdlib.h>
13625int main() {
13626 size_t len = -1;
13627 const char *str = "text";
13628 len = mbstowcs(NULL, str, 0);
13629 return (len != 4);
13630}
13631
13632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013633if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013634 ac_cv_broken_mbstowcs=no
13635else
Matthias Kloseb9621712010-04-24 17:59:49 +000013636 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13639 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013640fi
13641
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013642fi
13643
Matthias Kloseb9621712010-04-24 17:59:49 +000013644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13645$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013646if test "$ac_cv_broken_mbstowcs" = yes
13647then
13648
Matthias Kloseb9621712010-04-24 17:59:49 +000013649$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013650
13651fi
13652
Antoine Pitrou042b1282010-08-13 21:15:58 +000013653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13654$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013655if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013656 $as_echo_n "(cached) " >&6
13657else
13658 if test "$cross_compiling" = yes; then :
13659 ac_cv_computed_gotos=no
13660else
13661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13662/* end confdefs.h. */
13663
13664int main(int argc, char **argv)
13665{
13666 static void *targets[1] = { &&LABEL1 };
13667 goto LABEL2;
13668LABEL1:
13669 return 0;
13670LABEL2:
13671 goto *targets[0];
13672 return 1;
13673}
13674
13675_ACEOF
13676if ac_fn_c_try_run "$LINENO"; then :
13677 ac_cv_computed_gotos=yes
13678else
13679 ac_cv_computed_gotos=no
13680fi
13681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13682 conftest.$ac_objext conftest.beam conftest.$ac_ext
13683fi
13684
13685fi
13686
13687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13688$as_echo "$ac_cv_computed_gotos" >&6; }
13689if test "$ac_cv_computed_gotos" = yes
13690then
13691
13692$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13693
13694fi
13695
Antoine Pitroub52ec782009-01-25 16:34:23 +000013696# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13698$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013699
13700# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013701if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013702 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013703if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013704then
13705
Matthias Kloseb9621712010-04-24 17:59:49 +000013706$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013707
Matthias Kloseb9621712010-04-24 17:59:49 +000013708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13709$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013710fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013711if test "$withval" = no
13712then
13713
13714$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13715
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13717$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013718fi
13719
Antoine Pitrou042b1282010-08-13 21:15:58 +000013720else
13721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13722$as_echo "no value specified" >&6; }
13723fi
13724
Antoine Pitroub52ec782009-01-25 16:34:23 +000013725
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013726case $ac_sys_system in
13727AIX*)
13728
13729$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13730 ;;
13731esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013732
Michael W. Hudson54241132001-12-07 15:38:26 +000013733
Jesus Cea6a792292010-05-03 21:18:48 +000013734case $ac_sys_system in
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013735 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 +000013736esac
13737
13738
13739
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013740
13741
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013742for h in `(cd $srcdir;echo Python/thread_*.h)`
13743do
13744 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13745done
13746
Michael W. Hudson54241132001-12-07 15:38:26 +000013747
Neal Norwitzd24499d2005-12-18 21:36:39 +000013748SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13750$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013751for dir in $SRCDIRS; do
13752 if test ! -d $dir; then
13753 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013754 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013755done
Matthias Kloseb9621712010-04-24 17:59:49 +000013756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13757$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013758
Guido van Rossum627b2d71993-12-24 10:39:16 +000013759# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013760ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013761
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013762ac_config_files="$ac_config_files Modules/ld_so_aix"
13763
Martin v. Löwis11437992002-04-12 09:54:03 +000013764cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013765# This file is a shell script that caches the results of configure
13766# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013767# scripts and configure runs, see configure's option --config-cache.
13768# It is not useful on other systems. If it contains results you don't
13769# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013770#
Martin v. Löwis11437992002-04-12 09:54:03 +000013771# config.status only pays attention to the cache file if you give it
13772# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013773#
Skip Montanaro6dead952003-09-25 14:50:04 +000013774# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013775# loading this file, other *unset* `ac_cv_foo' will be assigned the
13776# following values.
13777
13778_ACEOF
13779
Guido van Rossumf78abae1997-01-21 22:02:36 +000013780# The following way of writing the cache mishandles newlines in values,
13781# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013782# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013783# Ultrix sh set writes to stderr and can't be redirected directly,
13784# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013785(
13786 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13787 eval ac_val=\$$ac_var
13788 case $ac_val in #(
13789 *${as_nl}*)
13790 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013791 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13792$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013793 esac
13794 case $ac_var in #(
13795 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013796 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13797 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798 esac ;;
13799 esac
13800 done
13801
Martin v. Löwis11437992002-04-12 09:54:03 +000013802 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013803 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13804 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 # `set' does not quote correctly, so add quotes: double-quote
13806 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013808 "s/'/'\\\\''/g;
13809 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013810 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 *)
13812 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013813 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013815 esac |
13816 sort
13817) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013818 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013819 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013820 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013821 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013822 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13823 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013824 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13825 :end' >>confcache
13826if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13827 if test -w "$cache_file"; then
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013828 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013829 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13830$as_echo "$as_me: updating cache $cache_file" >&6;}
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013831 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013832 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013833 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13834$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013835 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013836fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013837rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013838
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013839test "x$prefix" = xNONE && prefix=$ac_default_prefix
13840# Let make expand exec_prefix.
13841test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013842
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013843DEFS=-DHAVE_CONFIG_H
13844
Skip Montanaro6dead952003-09-25 14:50:04 +000013845ac_libobjs=
13846ac_ltlibobjs=
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013847U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013848for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13849 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013850 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013851 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013852 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13853 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013854 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13855 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013856done
13857LIBOBJS=$ac_libobjs
13858
13859LTLIBOBJS=$ac_ltlibobjs
13860
13861
Martin v. Löwis11437992002-04-12 09:54:03 +000013862
Matthias Kloseb9621712010-04-24 17:59:49 +000013863
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013864: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013865ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013866ac_clean_files_save=$ac_clean_files
13867ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013868{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13869$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13870as_write_fail=0
13871cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013872#! $SHELL
13873# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013874# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013875# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013876# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013877
Martin v. Löwis11437992002-04-12 09:54:03 +000013878debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013879ac_cs_recheck=false
13880ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013881
Matthias Kloseb9621712010-04-24 17:59:49 +000013882SHELL=\${CONFIG_SHELL-$SHELL}
13883export SHELL
13884_ASEOF
13885cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13886## -------------------- ##
13887## M4sh Initialization. ##
13888## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013890# Be more Bourne compatible
13891DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013892if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013893 emulate sh
13894 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013895 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013896 # is contrary to our usage. Disable this feature.
13897 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013899else
Matthias Kloseb9621712010-04-24 17:59:49 +000013900 case `(set -o) 2>/dev/null` in #(
13901 *posix*) :
13902 set -o posix ;; #(
13903 *) :
13904 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013905esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013906fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013907
13908
Matthias Kloseb9621712010-04-24 17:59:49 +000013909as_nl='
13910'
13911export as_nl
13912# Printing a long string crashes Solaris 7 /usr/bin/printf.
13913as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13914as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13915as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13916# Prefer a ksh shell builtin over an external printf program on Solaris,
13917# but without wasting forks for bash or zsh.
13918if test -z "$BASH_VERSION$ZSH_VERSION" \
13919 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13920 as_echo='print -r --'
13921 as_echo_n='print -rn --'
13922elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13923 as_echo='printf %s\n'
13924 as_echo_n='printf %s'
13925else
13926 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13927 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13928 as_echo_n='/usr/ucb/echo -n'
13929 else
13930 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13931 as_echo_n_body='eval
13932 arg=$1;
13933 case $arg in #(
13934 *"$as_nl"*)
13935 expr "X$arg" : "X\\(.*\\)$as_nl";
13936 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13937 esac;
13938 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13939 '
13940 export as_echo_n_body
13941 as_echo_n='sh -c $as_echo_n_body as_echo'
13942 fi
13943 export as_echo_body
13944 as_echo='sh -c $as_echo_body as_echo'
13945fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013946
13947# The user is always right.
13948if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 PATH_SEPARATOR=:
13950 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13951 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13952 PATH_SEPARATOR=';'
13953 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013954fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013956
13957# IFS
13958# We need space, tab and new line, in precisely that order. Quoting is
13959# there to prevent editors from complaining about space-tab.
13960# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13961# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013962IFS=" "" $as_nl"
13963
13964# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013965case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013966 *[\\/]* ) as_myself=$0 ;;
13967 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013968for as_dir in $PATH
13969do
13970 IFS=$as_save_IFS
13971 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013972 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13973 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013974IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013976 ;;
13977esac
13978# We did not find ourselves, most probably we were run as `sh COMMAND'
13979# in which case we are not to be found in the path.
13980if test "x$as_myself" = x; then
13981 as_myself=$0
13982fi
13983if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013984 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13985 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013986fi
13987
Matthias Kloseb9621712010-04-24 17:59:49 +000013988# Unset variables that we do not need and which cause bugs (e.g. in
13989# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13990# suppresses any "Segmentation fault" message there. '((' could
13991# trigger a bug in pdksh 5.2.14.
13992for as_var in BASH_ENV ENV MAIL MAILPATH
13993do eval test x\${$as_var+set} = xset \
13994 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013995done
13996PS1='$ '
13997PS2='> '
13998PS4='+ '
13999
14000# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014001LC_ALL=C
14002export LC_ALL
14003LANGUAGE=C
14004export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014005
Matthias Kloseb9621712010-04-24 17:59:49 +000014006# CDPATH.
14007(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14008
14009
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014010# as_fn_error STATUS ERROR [LINENO LOG_FD]
14011# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014012# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14013# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014014# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014015as_fn_error ()
14016{
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014017 as_status=$1; test $as_status -eq 0 && as_status=1
14018 if test "$4"; then
14019 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14020 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014021 fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014022 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014023 as_fn_exit $as_status
14024} # as_fn_error
14025
14026
14027# as_fn_set_status STATUS
14028# -----------------------
14029# Set $? to STATUS, without forking.
14030as_fn_set_status ()
14031{
14032 return $1
14033} # as_fn_set_status
14034
14035# as_fn_exit STATUS
14036# -----------------
14037# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14038as_fn_exit ()
14039{
14040 set +e
14041 as_fn_set_status $1
14042 exit $1
14043} # as_fn_exit
14044
14045# as_fn_unset VAR
14046# ---------------
14047# Portably unset VAR.
14048as_fn_unset ()
14049{
14050 { eval $1=; unset $1;}
14051}
14052as_unset=as_fn_unset
14053# as_fn_append VAR VALUE
14054# ----------------------
14055# Append the text in VALUE to the end of the definition contained in VAR. Take
14056# advantage of any shell optimizations that allow amortized linear growth over
14057# repeated appends, instead of the typical quadratic growth present in naive
14058# implementations.
14059if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14060 eval 'as_fn_append ()
14061 {
14062 eval $1+=\$2
14063 }'
14064else
14065 as_fn_append ()
14066 {
14067 eval $1=\$$1\$2
14068 }
14069fi # as_fn_append
14070
14071# as_fn_arith ARG...
14072# ------------------
14073# Perform arithmetic evaluation on the ARGs, and store the result in the
14074# global $as_val. Take advantage of shells that can avoid forks. The arguments
14075# must be portable across $(()) and expr.
14076if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14077 eval 'as_fn_arith ()
14078 {
14079 as_val=$(( $* ))
14080 }'
14081else
14082 as_fn_arith ()
14083 {
14084 as_val=`expr "$@" || test $? -eq 1`
14085 }
14086fi # as_fn_arith
14087
14088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014089if expr a : '\(a\)' >/dev/null 2>&1 &&
14090 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14091 as_expr=expr
14092else
14093 as_expr=false
14094fi
14095
14096if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14097 as_basename=basename
14098else
14099 as_basename=false
14100fi
14101
Matthias Kloseb9621712010-04-24 17:59:49 +000014102if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14103 as_dirname=dirname
14104else
14105 as_dirname=false
14106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014108as_me=`$as_basename -- "$0" ||
14109$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14110 X"$0" : 'X\(//\)$' \| \
14111 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014112$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014113 sed '/^.*\/\([^/][^/]*\)\/*$/{
14114 s//\1/
14115 q
14116 }
14117 /^X\/\(\/\/\)$/{
14118 s//\1/
14119 q
14120 }
14121 /^X\/\(\/\).*/{
14122 s//\1/
14123 q
14124 }
14125 s/.*/./; q'`
14126
Matthias Kloseb9621712010-04-24 17:59:49 +000014127# Avoid depending upon Character Ranges.
14128as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14129as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14130as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14131as_cr_digits='0123456789'
14132as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014133
14134ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014135case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014136-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014137 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 xy) ECHO_C='\c';;
14140 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14141 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014142 esac;;
14143*)
14144 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014145esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014146
Martin v. Löwis11437992002-04-12 09:54:03 +000014147rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148if test -d conf$$.dir; then
14149 rm -f conf$$.dir/conf$$.file
14150else
14151 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014152 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014154if (echo >conf$$.file) 2>/dev/null; then
14155 if ln -s conf$$.file conf$$ 2>/dev/null; then
14156 as_ln_s='ln -s'
14157 # ... but there are two gotchas:
14158 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14159 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14160 # In both cases, we have to default to `cp -p'.
14161 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14162 as_ln_s='cp -p'
14163 elif ln conf$$.file conf$$ 2>/dev/null; then
14164 as_ln_s=ln
14165 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014166 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014168else
14169 as_ln_s='cp -p'
14170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014171rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14172rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014173
Matthias Kloseb9621712010-04-24 17:59:49 +000014174
14175# as_fn_mkdir_p
14176# -------------
14177# Create "$as_dir" as a directory, including parents if necessary.
14178as_fn_mkdir_p ()
14179{
14180
14181 case $as_dir in #(
14182 -*) as_dir=./$as_dir;;
14183 esac
14184 test -d "$as_dir" || eval $as_mkdir_p || {
14185 as_dirs=
14186 while :; do
14187 case $as_dir in #(
14188 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14189 *) as_qdir=$as_dir;;
14190 esac
14191 as_dirs="'$as_qdir' $as_dirs"
14192 as_dir=`$as_dirname -- "$as_dir" ||
14193$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14194 X"$as_dir" : 'X\(//\)[^/]' \| \
14195 X"$as_dir" : 'X\(//\)$' \| \
14196 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14197$as_echo X"$as_dir" |
14198 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14199 s//\1/
14200 q
14201 }
14202 /^X\(\/\/\)[^/].*/{
14203 s//\1/
14204 q
14205 }
14206 /^X\(\/\/\)$/{
14207 s//\1/
14208 q
14209 }
14210 /^X\(\/\).*/{
14211 s//\1/
14212 q
14213 }
14214 s/.*/./; q'`
14215 test -d "$as_dir" && break
14216 done
14217 test -z "$as_dirs" || eval "mkdir $as_dirs"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014218 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014219
14220
14221} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014222if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014223 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014224else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014225 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014226 as_mkdir_p=false
14227fi
14228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014229if test -x / >/dev/null 2>&1; then
14230 as_test_x='test -x'
14231else
14232 if ls -dL / >/dev/null 2>&1; then
14233 as_ls_L_option=L
14234 else
14235 as_ls_L_option=
14236 fi
14237 as_test_x='
14238 eval sh -c '\''
14239 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 case $1 in #(
14243 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014244 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014246 ???[sx]*):;;*)false;;esac;fi
14247 '\'' sh
14248 '
14249fi
14250as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014251
14252# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014253as_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 +000014254
14255# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014256as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014257
14258
Martin v. Löwis11437992002-04-12 09:54:03 +000014259exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014260## ----------------------------------- ##
14261## Main body of $CONFIG_STATUS script. ##
14262## ----------------------------------- ##
14263_ASEOF
14264test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014265
Matthias Kloseb9621712010-04-24 17:59:49 +000014266cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14267# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014268# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014269# values after options handling.
14270ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014271This file was extended by python $as_me 3.2, which was
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014272generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014273
14274 CONFIG_FILES = $CONFIG_FILES
14275 CONFIG_HEADERS = $CONFIG_HEADERS
14276 CONFIG_LINKS = $CONFIG_LINKS
14277 CONFIG_COMMANDS = $CONFIG_COMMANDS
14278 $ $0 $@
14279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014280on `(hostname || uname -n) 2>/dev/null | sed 1q`
14281"
14282
Martin v. Löwis11437992002-04-12 09:54:03 +000014283_ACEOF
14284
Matthias Kloseb9621712010-04-24 17:59:49 +000014285case $ac_config_files in *"
14286"*) set x $ac_config_files; shift; ac_config_files=$*;;
14287esac
14288
14289case $ac_config_headers in *"
14290"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14291esac
14292
14293
14294cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014295# Files that config.status was made for.
Barry Warsaw278266f2010-10-14 17:38:46 +000014296config_files="$ac_config_files"
14297config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014299_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014300
Matthias Kloseb9621712010-04-24 17:59:49 +000014301cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014302ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014303\`$as_me' instantiates files and other configuration actions
14304from templates according to the current configuration. Unless the files
14305and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014306
Matthias Kloseb9621712010-04-24 17:59:49 +000014307Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
14309 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014310 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014311 --config print configuration, then exit
14312 -q, --quiet, --silent
14313 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014314 -d, --debug don't remove temporary files
14315 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014316 --file=FILE[:TEMPLATE]
14317 instantiate the configuration file FILE
14318 --header=FILE[:TEMPLATE]
14319 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014320
14321Configuration files:
14322$config_files
14323
14324Configuration headers:
14325$config_headers
14326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014330cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14331ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014332ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014333python config.status 3.2
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014334configured by $0, generated by GNU Autoconf 2.67,
Matthias Kloseb9621712010-04-24 17:59:49 +000014335 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014336
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014337Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014338This config.status script is free software; the Free Software Foundation
14339gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014340
14341ac_pwd='$ac_pwd'
14342srcdir='$srcdir'
14343INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014344test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014345_ACEOF
14346
Matthias Kloseb9621712010-04-24 17:59:49 +000014347cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14348# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014349ac_need_defaults=:
14350while test $# != 0
14351do
14352 case $1 in
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014353 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014354 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14355 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014356 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014357 ;;
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014358 --*=)
14359 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14360 ac_optarg=
14361 ac_shift=:
14362 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014363 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014364 ac_option=$1
14365 ac_optarg=$2
14366 ac_shift=shift
14367 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014368 esac
14369
Skip Montanaro6dead952003-09-25 14:50:04 +000014370 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014371 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014372 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14373 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014374 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014375 $as_echo "$ac_cs_version"; exit ;;
14376 --config | --confi | --conf | --con | --co | --c )
14377 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014378 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014379 debug=: ;;
14380 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014381 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014382 case $ac_optarg in
14383 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014384 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014385 esac
14386 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014387 ac_need_defaults=false;;
14388 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014389 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014390 case $ac_optarg in
14391 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14392 esac
14393 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014394 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014395 --he | --h)
14396 # Conflict between --help and --header
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014397 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014398Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014399 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014401 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14402 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14403 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014404
14405 # This is an error.
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014406 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014407Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014408
Matthias Kloseb9621712010-04-24 17:59:49 +000014409 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014410 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014411
14412 esac
14413 shift
14414done
14415
Skip Montanaro6dead952003-09-25 14:50:04 +000014416ac_configure_extra_args=
14417
14418if $ac_cs_silent; then
14419 exec 6>/dev/null
14420 ac_configure_extra_args="$ac_configure_extra_args --silent"
14421fi
14422
14423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014424cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014425if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014426 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14427 shift
14428 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14429 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014430 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014431 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014432fi
14433
Martin v. Löwis11437992002-04-12 09:54:03 +000014434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014435cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014436exec 5>>config.log
14437{
14438 echo
14439 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14440## Running $as_me. ##
14441_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014442 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014443} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014446cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014447_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014448
Matthias Kloseb9621712010-04-24 17:59:49 +000014449cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014450
14451# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014452for ac_config_target in $ac_config_targets
14453do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014454 case $ac_config_target in
14455 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14456 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14457 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014458 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14459 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14461 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014462 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014463 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014465 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014466 esac
14467done
14468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469
Martin v. Löwis11437992002-04-12 09:54:03 +000014470# If the user did not use the arguments to specify the items to instantiate,
14471# then the envvar interface is used. Set only those that are not.
14472# We use the long form for the default assignment because of an extremely
14473# bizarre bug on SunOS 4.1.3.
14474if $ac_need_defaults; then
14475 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14476 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14477fi
14478
Skip Montanaro6dead952003-09-25 14:50:04 +000014479# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014480# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014481# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014482# Hook for its removal unless debugging.
14483# Note that there is a small window in which the directory will not be cleaned:
14484# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014485$debug ||
14486{
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014487 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014488 trap 'exit_status=$?
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014489 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014490' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014491 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014492}
Martin v. Löwis11437992002-04-12 09:54:03 +000014493# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014494
Martin v. Löwis11437992002-04-12 09:54:03 +000014495{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014496 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014497 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014498} ||
14499{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014500 tmp=./conf$$-$RANDOM
14501 (umask 077 && mkdir "$tmp")
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014502} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014503
Matthias Kloseb9621712010-04-24 17:59:49 +000014504# Set up the scripts for CONFIG_FILES section.
14505# No need to generate them if there are no CONFIG_FILES.
14506# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014508
Matthias Kloseb9621712010-04-24 17:59:49 +000014509
14510ac_cr=`echo X | tr X '\015'`
14511# On cygwin, bash can eat \r inside `` if the user requested igncr.
14512# But we know of no other shell where ac_cr would be empty at this
14513# point, so we can use a bashism as a fallback.
14514if test "x$ac_cr" = x; then
14515 eval ac_cr=\$\'\\r\'
14516fi
14517ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14518if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014519 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014520else
14521 ac_cs_awk_cr=$ac_cr
14522fi
14523
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014524echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014525_ACEOF
14526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014527
Matthias Kloseb9621712010-04-24 17:59:49 +000014528{
14529 echo "cat >conf$$subs.awk <<_ACEOF" &&
14530 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14531 echo "_ACEOF"
14532} >conf$$subs.sh ||
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014533 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14534ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014535ac_delim='%!_!# '
14536for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 . ./conf$$subs.sh ||
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014538 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014539
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14541 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014542 break
14543 elif $ac_last_try; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014544 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014545 else
14546 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014547 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014548done
Matthias Kloseb9621712010-04-24 17:59:49 +000014549rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014550
Matthias Kloseb9621712010-04-24 17:59:49 +000014551cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014552cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014554sed -n '
14555h
14556s/^/S["/; s/!.*/"]=/
14557p
14558g
14559s/^[^!]*!//
14560:repl
14561t repl
14562s/'"$ac_delim"'$//
14563t delim
14564:nl
14565h
14566s/\(.\{148\}\)..*/\1/
14567t more1
14568s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14569p
14570n
14571b repl
14572:more1
14573s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14574p
14575g
14576s/.\{148\}//
14577t nl
14578:delim
14579h
14580s/\(.\{148\}\)..*/\1/
14581t more2
14582s/["\\]/\\&/g; s/^/"/; s/$/"/
14583p
14584b
14585:more2
14586s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14587p
14588g
14589s/.\{148\}//
14590t delim
14591' <conf$$subs.awk | sed '
14592/^[^""]/{
14593 N
14594 s/\n//
14595}
14596' >>$CONFIG_STATUS || ac_write_fail=1
14597rm -f conf$$subs.awk
14598cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14599_ACAWK
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014600cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014601 for (key in S) S_is_set[key] = 1
14602 FS = ""
14603
14604}
14605{
14606 line = $ 0
14607 nfields = split(line, field, "@")
14608 substed = 0
14609 len = length(field[1])
14610 for (i = 2; i < nfields; i++) {
14611 key = field[i]
14612 keylen = length(key)
14613 if (S_is_set[key]) {
14614 value = S[key]
14615 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14616 len += length(value) + length(field[++i])
14617 substed = 1
14618 } else
14619 len += 1 + keylen
14620 }
14621
14622 print line
14623}
14624
14625_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014627cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14628if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14629 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14630else
14631 cat
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014632fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014633 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014634_ACEOF
14635
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014636# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14637# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014638# trailing colons and then remove the whole line if VPATH becomes empty
14639# (actually we leave an empty line to preserve line numbers).
14640if test "x$srcdir" = x.; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014641 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14642h
14643s///
14644s/^/:/
14645s/[ ]*$/:/
14646s/:\$(srcdir):/:/g
14647s/:\${srcdir}:/:/g
14648s/:@srcdir@:/:/g
14649s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650s/:*$//
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014651x
14652s/\(=[ ]*\).*/\1/
14653G
14654s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014655s/^[^=]*=[ ]*$//
14656}'
14657fi
14658
Matthias Kloseb9621712010-04-24 17:59:49 +000014659cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014660fi # test -n "$CONFIG_FILES"
14661
Matthias Kloseb9621712010-04-24 17:59:49 +000014662# Set up the scripts for CONFIG_HEADERS section.
14663# No need to generate them if there are no CONFIG_HEADERS.
14664# This happens for instance with `./config.status Makefile'.
14665if test -n "$CONFIG_HEADERS"; then
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014666cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014667BEGIN {
14668_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669
Matthias Kloseb9621712010-04-24 17:59:49 +000014670# Transform confdefs.h into an awk script `defines.awk', embedded as
14671# here-document in config.status, that substitutes the proper values into
14672# config.h.in to produce config.h.
14673
14674# Create a delimiter string that does not exist in confdefs.h, to ease
14675# handling of long lines.
14676ac_delim='%!_!# '
14677for ac_last_try in false false :; do
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014678 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14679 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014680 break
14681 elif $ac_last_try; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014682 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 else
14684 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14685 fi
14686done
14687
14688# For the awk script, D is an array of macro values keyed by name,
14689# likewise P contains macro parameters if any. Preserve backslash
14690# newline sequences.
14691
14692ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14693sed -n '
14694s/.\{148\}/&'"$ac_delim"'/g
14695t rset
14696:rset
14697s/^[ ]*#[ ]*define[ ][ ]*/ /
14698t def
14699d
14700:def
14701s/\\$//
14702t bsnl
14703s/["\\]/\\&/g
14704s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14705D["\1"]=" \3"/p
14706s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14707d
14708:bsnl
14709s/["\\]/\\&/g
14710s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14711D["\1"]=" \3\\\\\\n"\\/p
14712t cont
14713s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14714t cont
14715d
14716:cont
14717n
14718s/.\{148\}/&'"$ac_delim"'/g
14719t clear
14720:clear
14721s/\\$//
14722t bsnlc
14723s/["\\]/\\&/g; s/^/"/; s/$/"/p
14724d
14725:bsnlc
14726s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14727b cont
14728' <confdefs.h | sed '
14729s/'"$ac_delim"'/"\\\
14730"/g' >>$CONFIG_STATUS || ac_write_fail=1
14731
14732cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14733 for (key in D) D_is_set[key] = 1
14734 FS = ""
14735}
14736/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14737 line = \$ 0
14738 split(line, arg, " ")
14739 if (arg[1] == "#") {
14740 defundef = arg[2]
14741 mac1 = arg[3]
14742 } else {
14743 defundef = substr(arg[1], 2)
14744 mac1 = arg[2]
14745 }
14746 split(mac1, mac2, "(") #)
14747 macro = mac2[1]
14748 prefix = substr(line, 1, index(line, defundef) - 1)
14749 if (D_is_set[macro]) {
14750 # Preserve the white space surrounding the "#".
14751 print prefix "define", macro P[macro] D[macro]
14752 next
14753 } else {
14754 # Replace #undef with comments. This is necessary, for example,
14755 # in the case of _POSIX_SOURCE, which is predefined and required
14756 # on some systems where configure will not decide to define it.
14757 if (defundef == "undef") {
14758 print "/*", prefix defundef, macro, "*/"
14759 next
14760 }
14761 }
14762}
14763{ print }
14764_ACAWK
14765_ACEOF
14766cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014767 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014768fi # test -n "$CONFIG_HEADERS"
14769
14770
14771eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14772shift
14773for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014774do
14775 case $ac_tag in
14776 :[FHLC]) ac_mode=$ac_tag; continue;;
14777 esac
14778 case $ac_mode$ac_tag in
14779 :[FHL]*:*);;
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014780 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014781 :[FH]-) ac_tag=-:-;;
14782 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14783 esac
14784 ac_save_IFS=$IFS
14785 IFS=:
14786 set x $ac_tag
14787 IFS=$ac_save_IFS
14788 shift
14789 ac_file=$1
14790 shift
14791
14792 case $ac_mode in
14793 :L) ac_source=$1;;
14794 :[FH])
14795 ac_file_inputs=
14796 for ac_f
14797 do
14798 case $ac_f in
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014799 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014800 *) # Look for the file first in the build tree, then in the source tree
14801 # (if the path is not absolute). The absolute path cannot be DOS-style,
14802 # because $ac_f cannot contain `:'.
14803 test -f "$ac_f" ||
14804 case $ac_f in
14805 [\\/$]*) false;;
14806 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14807 esac ||
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014808 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14811 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014812 done
14813
14814 # Let's still pretend it is `configure' which instantiates (i.e., don't
14815 # use $as_me), people would be surprised to read:
14816 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014817 configure_input='Generated from '`
14818 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14819 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014820 if test x"$ac_file" != x-; then
14821 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014822 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14823$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014824 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014825 # Neutralize special characters interpreted by sed in replacement strings.
14826 case $configure_input in #(
14827 *\&* | *\|* | *\\* )
14828 ac_sed_conf_input=`$as_echo "$configure_input" |
14829 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14830 *) ac_sed_conf_input=$configure_input;;
14831 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014832
14833 case $ac_tag in
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014834 *:-:* | *:-) cat >"$tmp/stdin" \
14835 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836 esac
14837 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014838 esac
14839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014840 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014841$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014842 X"$ac_file" : 'X\(//\)[^/]' \| \
14843 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014844 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014845$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014846 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14847 s//\1/
14848 q
14849 }
14850 /^X\(\/\/\)[^/].*/{
14851 s//\1/
14852 q
14853 }
14854 /^X\(\/\/\)$/{
14855 s//\1/
14856 q
14857 }
14858 /^X\(\/\).*/{
14859 s//\1/
14860 q
14861 }
14862 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014863 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014864 ac_builddir=.
14865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014866case "$ac_dir" in
14867.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14868*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014870 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014872 case $ac_top_builddir_sub in
14873 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14874 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14875 esac ;;
14876esac
14877ac_abs_top_builddir=$ac_pwd
14878ac_abs_builddir=$ac_pwd$ac_dir_suffix
14879# for backward compatibility:
14880ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014881
14882case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014883 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014884 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014885 ac_top_srcdir=$ac_top_builddir_sub
14886 ac_abs_top_srcdir=$ac_pwd ;;
14887 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014888 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889 ac_top_srcdir=$srcdir
14890 ac_abs_top_srcdir=$srcdir ;;
14891 *) # Relative name.
14892 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14893 ac_top_srcdir=$ac_top_build_prefix$srcdir
14894 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014895esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014896ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014897
Martin v. Löwis11437992002-04-12 09:54:03 +000014898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899 case $ac_mode in
14900 :F)
14901 #
14902 # CONFIG_FILE
14903 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014904
14905 case $INSTALL in
14906 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014907 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014908 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014909_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014910
Matthias Kloseb9621712010-04-24 17:59:49 +000014911cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014912# If the template does not know about datarootdir, expand it.
14913# FIXME: This hack should be removed a few years after 2.60.
14914ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014915ac_sed_dataroot='
14916/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917 p
14918 q
14919}
14920/@datadir@/p
14921/@docdir@/p
14922/@infodir@/p
14923/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014924/@mandir@/p'
14925case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014926*datarootdir*) ac_datarootdir_seen=yes;;
14927*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014928 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14929$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014931cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932 ac_datarootdir_hack='
14933 s&@datadir@&$datadir&g
14934 s&@docdir@&$docdir&g
14935 s&@infodir@&$infodir&g
14936 s&@localedir@&$localedir&g
14937 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939esac
14940_ACEOF
14941
14942# Neutralize VPATH when `$srcdir' = `.'.
14943# Shell code in configure.ac might set extrasub.
14944# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014945cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14946ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014947$extrasub
14948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014949cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014950:t
14951/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014952s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014954s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014955s&@srcdir@&$ac_srcdir&;t t
14956s&@abs_srcdir@&$ac_abs_srcdir&;t t
14957s&@top_srcdir@&$ac_top_srcdir&;t t
14958s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14959s&@builddir@&$ac_builddir&;t t
14960s&@abs_builddir@&$ac_abs_builddir&;t t
14961s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14962s&@INSTALL@&$ac_INSTALL&;t t
14963$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014964"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014965eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
14966 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014968test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014969 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14970 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014972which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014973$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014974which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014975
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014976 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014977 case $ac_file in
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014978 -) cat "$tmp/out" && rm -f "$tmp/out";;
14979 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000014980 esac \
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014981 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014982 ;;
14983 :H)
14984 #
14985 # CONFIG_HEADER
14986 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014988 {
14989 $as_echo "/* $configure_input */" \
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014990 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14991 } >"$tmp/config.h" \
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014992 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014993 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014994 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14995$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014997 rm -f "$ac_file"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014998 mv "$tmp/config.h" "$ac_file" \
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014999 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015000 fi
15001 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015002 $as_echo "/* $configure_input */" \
Barry Warsaw14d98ac2010-11-24 19:43:47 +000015003 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Mark Dickinsonec0d3552010-11-20 10:29:12 +000015004 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015005 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015008
15009 esac
15010
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015011
15012 case $ac_file$ac_mode in
15013 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15014
15015 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015016done # for ac_tag
15017
Guido van Rossum627b2d71993-12-24 10:39:16 +000015018
Matthias Kloseb9621712010-04-24 17:59:49 +000015019as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015020_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015021ac_clean_files=$ac_clean_files_save
15022
Matthias Kloseb9621712010-04-24 17:59:49 +000015023test $ac_write_fail = 0 ||
Mark Dickinsonec0d3552010-11-20 10:29:12 +000015024 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015025
Martin v. Löwis11437992002-04-12 09:54:03 +000015026
15027# configure is writing to config.log, and then calls config.status.
15028# config.status does its own redirection, appending to config.log.
15029# Unfortunately, on DOS this fails, as config.log is still kept open
15030# by configure, so config.status won't be able to write to it; its
15031# output is simply discarded. So we exec the FD to /dev/null,
15032# effectively closing config.log, so it can be properly (re)opened and
15033# appended to by config.status. When coming back to configure, we
15034# need to make the FD available again.
15035if test "$no_create" != yes; then
15036 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015037 ac_config_status_args=
15038 test "$silent" = yes &&
15039 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015041 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015042 exec 5>>config.log
15043 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15044 # would make configure fail if this is the last instruction.
Mark Dickinsonec0d3552010-11-20 10:29:12 +000015045 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015046fi
15047if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15048 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15049$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015050fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015051
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015052
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015053echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015054if test ! -f Modules/Setup
15055then
15056 cp $srcdir/Modules/Setup.dist Modules/Setup
15057fi
15058
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015059echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015060if test ! -f Modules/Setup.local
15061then
15062 echo "# Edit this file for local setup changes" >Modules/Setup.local
15063fi
15064
15065echo "creating Makefile"
15066$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15067 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015068 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015069mv config.c Modules