blob: 8d01bc17f8f109b92658e071e64e2d16e1b9914c [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Gregory P. Smith138fa432010-12-13 08:00:52 +00002# From configure.in Revision: 87207 .
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
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000650PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000651BLDLIBRARY
652DLLLIBRARY
653LDLIBRARY
654LIBRARY
655BUILDEXEEXT
656EGREP
657GREP
658CPP
659MAINCC
660CXX
661OBJEXT
662EXEEXT
663ac_ct_CC
664CPPFLAGS
665LDFLAGS
666CFLAGS
667CC
668EXPORT_MACOSX_DEPLOYMENT_TARGET
669CONFIGURE_MACOSX_DEPLOYMENT_TARGET
670SGI_ABI
671MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000672FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000673FRAMEWORKUNIXTOOLSPREFIX
674FRAMEWORKALTINSTALLLAST
675FRAMEWORKALTINSTALLFIRST
676FRAMEWORKINSTALLLAST
677FRAMEWORKINSTALLFIRST
678PYTHONFRAMEWORKINSTALLDIR
679PYTHONFRAMEWORKPREFIX
680PYTHONFRAMEWORKDIR
681PYTHONFRAMEWORKIDENTIFIER
682PYTHONFRAMEWORK
683LIPO_32BIT_FLAGS
684ARCH_RUN_32BIT
685UNIVERSALSDK
686CONFIG_ARGS
687SOVERSION
688VERSION
689target_alias
690host_alias
691build_alias
692LIBS
693ECHO_T
694ECHO_N
695ECHO_C
696DEFS
697mandir
698localedir
699libdir
700psdir
701pdfdir
702dvidir
703htmldir
704infodir
705docdir
706oldincludedir
707includedir
708localstatedir
709sharedstatedir
710sysconfdir
711datadir
712datarootdir
713libexecdir
714sbindir
715bindir
716program_transform_name
717prefix
718exec_prefix
719PACKAGE_URL
720PACKAGE_BUGREPORT
721PACKAGE_STRING
722PACKAGE_VERSION
723PACKAGE_TARNAME
724PACKAGE_NAME
725PATH_SEPARATOR
726SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000727ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000728ac_user_opts='
729enable_option_checking
730enable_universalsdk
731with_universal_archs
732with_framework_name
733enable_framework
734with_gcc
735with_cxx_main
736with_suffix
737enable_shared
738enable_profiling
739with_pydebug
740with_libs
741with_system_expat
742with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000743enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000744with_dbmliborder
745with_signal_module
746with_dec_threads
747with_threads
748with_thread
749enable_ipv6
750with_doc_strings
751with_tsc
752with_pymalloc
753with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000754with_fpectl
755with_libm
756with_libc
757enable_big_digits
758with_wide_unicode
759with_computed_gotos
760'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000761 ac_precious_vars='build_alias
762host_alias
763target_alias
764CC
765CFLAGS
766LDFLAGS
767LIBS
768CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000769CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000770
Guido van Rossum627b2d71993-12-24 10:39:16 +0000771
Guido van Rossum7f43da71994-08-01 12:15:30 +0000772# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000773ac_init_help=
774ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000775ac_unrecognized_opts=
776ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000777# The variables have the same names as the options, with
778# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000779cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000780exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000781no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000782no_recursion=
783prefix=NONE
784program_prefix=NONE
785program_suffix=NONE
786program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000787silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000788site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000790verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791x_includes=NONE
792x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000793
794# Installation directory options.
795# These are left unexpanded so users can "make install exec_prefix=/foo"
796# and all the variables that are supposed to be based on exec_prefix
797# by default will actually change.
798# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000800bindir='${exec_prefix}/bin'
801sbindir='${exec_prefix}/sbin'
802libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000803datarootdir='${prefix}/share'
804datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000805sysconfdir='${prefix}/etc'
806sharedstatedir='${prefix}/com'
807localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000808includedir='${prefix}/include'
809oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000810docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
811infodir='${datarootdir}/info'
812htmldir='${docdir}'
813dvidir='${docdir}'
814pdfdir='${docdir}'
815psdir='${docdir}'
816libdir='${exec_prefix}/lib'
817localedir='${datarootdir}/locale'
818mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000823do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824 # If the previous option needs an argument, assign it.
825 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827 ac_prev=
828 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000829 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000831 case $ac_option in
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000832 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
833 *=) ac_optarg= ;;
834 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000835 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837 # Accept the important Cygnus configure options, so we can diagnose typos.
838
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 case $ac_dashdash$ac_option in
840 --)
841 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000843 -bindir | --bindir | --bindi | --bind | --bin | --bi)
844 ac_prev=bindir ;;
845 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000846 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000847
848 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000850 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853 -cache-file | --cache-file | --cache-fil | --cache-fi \
854 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
855 ac_prev=cache_file ;;
856 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
857 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 cache_file=$ac_optarg ;;
859
860 --config-cache | -C)
861 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000864 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000865 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000866 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000868 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
869 | --dataroo | --dataro | --datar)
870 ac_prev=datarootdir ;;
871 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
872 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
873 datarootdir=$ac_optarg ;;
874
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000876 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000878 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000879 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000880 ac_useropt_orig=$ac_useropt
881 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
882 case $ac_user_opts in
883 *"
884"enable_$ac_useropt"
885"*) ;;
886 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
887 ac_unrecognized_sep=', ';;
888 esac
889 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890
891 -docdir | --docdir | --docdi | --doc | --do)
892 ac_prev=docdir ;;
893 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
894 docdir=$ac_optarg ;;
895
896 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
897 ac_prev=dvidir ;;
898 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
899 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
901 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000902 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000903 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000904 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000905 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000906 ac_useropt_orig=$ac_useropt
907 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
908 case $ac_user_opts in
909 *"
910"enable_$ac_useropt"
911"*) ;;
912 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
913 ac_unrecognized_sep=', ';;
914 esac
915 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
918 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
919 | --exec | --exe | --ex)
920 ac_prev=exec_prefix ;;
921 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
922 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
923 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
926 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 # Obsolete; use --with-gas.
928 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 -help | --help | --hel | --he | -h)
931 ac_init_help=long ;;
932 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
933 ac_init_help=recursive ;;
934 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
935 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
937 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000942 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
943 ac_prev=htmldir ;;
944 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
945 | --ht=*)
946 htmldir=$ac_optarg ;;
947
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948 -includedir | --includedir | --includedi | --included | --include \
949 | --includ | --inclu | --incl | --inc)
950 ac_prev=includedir ;;
951 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
952 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954
955 -infodir | --infodir | --infodi | --infod | --info | --inf)
956 ac_prev=infodir ;;
957 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
960 -libdir | --libdir | --libdi | --libd)
961 ac_prev=libdir ;;
962 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000963 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964
965 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
966 | --libexe | --libex | --libe)
967 ac_prev=libexecdir ;;
968 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
969 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000972 -localedir | --localedir | --localedi | --localed | --locale)
973 ac_prev=localedir ;;
974 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
975 localedir=$ac_optarg ;;
976
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000978 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000979 ac_prev=localstatedir ;;
980 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000981 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983
984 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
985 ac_prev=mandir ;;
986 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000988
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990 # Obsolete; use --without-fp.
991 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995 no_create=yes ;;
996
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000997 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
998 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
999 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001001 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1002 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1003 | --oldin | --oldi | --old | --ol | --o)
1004 ac_prev=oldincludedir ;;
1005 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1006 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1007 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001009
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1011 ac_prev=prefix ;;
1012 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1016 | --program-pre | --program-pr | --program-p)
1017 ac_prev=program_prefix ;;
1018 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1019 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
1022 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1023 | --program-suf | --program-su | --program-s)
1024 ac_prev=program_suffix ;;
1025 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1026 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
1029 -program-transform-name | --program-transform-name \
1030 | --program-transform-nam | --program-transform-na \
1031 | --program-transform-n | --program-transform- \
1032 | --program-transform | --program-transfor \
1033 | --program-transfo | --program-transf \
1034 | --program-trans | --program-tran \
1035 | --progr-tra | --program-tr | --program-t)
1036 ac_prev=program_transform_name ;;
1037 -program-transform-name=* | --program-transform-name=* \
1038 | --program-transform-nam=* | --program-transform-na=* \
1039 | --program-transform-n=* | --program-transform-=* \
1040 | --program-transform=* | --program-transfor=* \
1041 | --program-transfo=* | --program-transf=* \
1042 | --program-trans=* | --program-tran=* \
1043 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001046 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1047 ac_prev=pdfdir ;;
1048 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1049 pdfdir=$ac_optarg ;;
1050
1051 -psdir | --psdir | --psdi | --psd | --ps)
1052 ac_prev=psdir ;;
1053 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1054 psdir=$ac_optarg ;;
1055
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1057 | -silent | --silent | --silen | --sile | --sil)
1058 silent=yes ;;
1059
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1061 ac_prev=sbindir ;;
1062 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1063 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
1066 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1067 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1068 | --sharedst | --shareds | --shared | --share | --shar \
1069 | --sha | --sh)
1070 ac_prev=sharedstatedir ;;
1071 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1072 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1073 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1074 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 -site | --site | --sit)
1078 ac_prev=site ;;
1079 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1083 ac_prev=srcdir ;;
1084 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1088 | --syscon | --sysco | --sysc | --sys | --sy)
1089 ac_prev=sysconfdir ;;
1090 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1091 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
1099 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1100 verbose=yes ;;
1101
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 -version | --version | --versio | --versi | --vers | -V)
1103 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
1105 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001106 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001107 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001108 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001109 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001110 ac_useropt_orig=$ac_useropt
1111 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1112 case $ac_user_opts in
1113 *"
1114"with_$ac_useropt"
1115"*) ;;
1116 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1117 ac_unrecognized_sep=', ';;
1118 esac
1119 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
1121 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001122 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001123 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001124 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001125 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001126 ac_useropt_orig=$ac_useropt
1127 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1128 case $ac_user_opts in
1129 *"
1130"with_$ac_useropt"
1131"*) ;;
1132 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1133 ac_unrecognized_sep=', ';;
1134 esac
1135 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137 --x)
1138 # Obsolete; use --with-x.
1139 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140
1141 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1142 | --x-incl | --x-inc | --x-in | --x-i)
1143 ac_prev=x_includes ;;
1144 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1145 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
1148 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1149 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1150 ac_prev=x_libraries ;;
1151 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1152 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001155 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1156Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157 ;;
1158
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 *=*)
1160 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1161 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001162 case $ac_envvar in #(
1163 '' | [0-9]* | *[!_$as_cr_alnum]* )
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001164 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001166 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 export $ac_envvar ;;
1168
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001169 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001171 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001174 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175 ;;
1176
1177 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001178done
1179
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001182 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183fi
1184
Matthias Kloseb9621712010-04-24 17:59:49 +00001185if test -n "$ac_unrecognized_opts"; then
1186 case $enable_option_checking in
1187 no) ;;
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001188 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1190 esac
1191fi
1192
1193# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001194for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1195 datadir sysconfdir sharedstatedir localstatedir includedir \
1196 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1197 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001199 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 # Remove trailing slashes.
1201 case $ac_val in
1202 */ )
1203 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1204 eval $ac_var=\$ac_val;;
1205 esac
1206 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001207 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001208 [\\/$]* | ?:[\\/]* ) continue;;
1209 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210 esac
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001211 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001212done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213
Martin v. Löwis11437992002-04-12 09:54:03 +00001214# There might be people who depend on the old broken behavior: `$host'
1215# used to hold the argument of --host etc.
1216# FIXME: To remove some day.
1217build=$build_alias
1218host=$host_alias
1219target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001220
Martin v. Löwis11437992002-04-12 09:54:03 +00001221# FIXME: To remove some day.
1222if test "x$host_alias" != x; then
1223 if test "x$build_alias" = x; then
1224 cross_compiling=maybe
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001225 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1226 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 elif test "x$build_alias" != "x$host_alias"; then
1228 cross_compiling=yes
1229 fi
1230fi
1231
1232ac_tool_prefix=
1233test -n "$host_alias" && ac_tool_prefix=$host_alias-
1234
1235test "$silent" = yes && exec 6>/dev/null
1236
Guido van Rossum627b2d71993-12-24 10:39:16 +00001237
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001238ac_pwd=`pwd` && test -n "$ac_pwd" &&
1239ac_ls_di=`ls -di .` &&
1240ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001241 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001243 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001244
1245
Guido van Rossum627b2d71993-12-24 10:39:16 +00001246# Find the source files, if location was not specified.
1247if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001249 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001250 ac_confdir=`$as_dirname -- "$as_myself" ||
1251$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1252 X"$as_myself" : 'X\(//\)[^/]' \| \
1253 X"$as_myself" : 'X\(//\)$' \| \
1254 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1255$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1257 s//\1/
1258 q
1259 }
1260 /^X\(\/\/\)[^/].*/{
1261 s//\1/
1262 q
1263 }
1264 /^X\(\/\/\)$/{
1265 s//\1/
1266 q
1267 }
1268 /^X\(\/\).*/{
1269 s//\1/
1270 q
1271 }
1272 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001274 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275 srcdir=..
1276 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001277else
1278 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001280if test ! -r "$srcdir/$ac_unique_file"; then
1281 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001282 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1285ac_abs_confdir=`(
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001286 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287 pwd)`
1288# When building in place, set srcdir=.
1289if test "$ac_abs_confdir" = "$ac_pwd"; then
1290 srcdir=.
1291fi
1292# Remove unnecessary trailing slashes from srcdir.
1293# Double slashes in file names in object file debugging info
1294# mess up M-x gdb in Emacs.
1295case $srcdir in
1296*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1297esac
1298for ac_var in $ac_precious_vars; do
1299 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1300 eval ac_env_${ac_var}_value=\$${ac_var}
1301 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1302 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1303done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305#
1306# Report the --help message.
1307#
1308if test "$ac_init_help" = "long"; then
1309 # Omit some internal or obsolete options to make the list less imposing.
1310 # This message is too long to be a string in the A/UX 3.1 sh.
1311 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001312\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001313
1314Usage: $0 [OPTION]... [VAR=VALUE]...
1315
1316To assign environment variables (e.g., CC, CFLAGS...), specify them as
1317VAR=VALUE. See below for descriptions of some of the useful variables.
1318
1319Defaults for the options are specified in brackets.
1320
1321Configuration:
1322 -h, --help display this help and exit
1323 --help=short display options specific to this package
1324 --help=recursive display the short help of all the included packages
1325 -V, --version display version information and exit
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001326 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001327 --cache-file=FILE cache test results in FILE [disabled]
1328 -C, --config-cache alias for \`--cache-file=config.cache'
1329 -n, --no-create do not create output files
1330 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1331
Martin v. Löwis11437992002-04-12 09:54:03 +00001332Installation directories:
1333 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001334 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001335 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001336 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001337
1338By default, \`make install' will install all the files in
1339\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1340an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1341for instance \`--prefix=\$HOME'.
1342
1343For better control, use the options below.
1344
1345Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001346 --bindir=DIR user executables [EPREFIX/bin]
1347 --sbindir=DIR system admin executables [EPREFIX/sbin]
1348 --libexecdir=DIR program executables [EPREFIX/libexec]
1349 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1350 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1351 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1352 --libdir=DIR object code libraries [EPREFIX/lib]
1353 --includedir=DIR C header files [PREFIX/include]
1354 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1355 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1356 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1357 --infodir=DIR info documentation [DATAROOTDIR/info]
1358 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1359 --mandir=DIR man documentation [DATAROOTDIR/man]
1360 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1361 --htmldir=DIR html documentation [DOCDIR]
1362 --dvidir=DIR dvi documentation [DOCDIR]
1363 --pdfdir=DIR pdf documentation [DOCDIR]
1364 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001365_ACEOF
1366
1367 cat <<\_ACEOF
1368_ACEOF
1369fi
1370
1371if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001372 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001373 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001374 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 cat <<\_ACEOF
1376
1377Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001378 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001379 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1380 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001381 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001382 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001383 --enable-framework[=INSTALLDIR]
1384 Build (MacOSX|Darwin) framework
1385 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001386 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001387 --enable-loadable-sqlite-extensions
1388 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001389 --enable-ipv6 Enable ipv6 (with ipv4) support
1390 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001391 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001392 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001393
1394Optional Packages:
1395 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1396 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001397 --with-universal-archs=ARCH
1398 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001399 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001400 --with-framework-name=FRAMEWORK
1401 specify an alternate name of the framework built
1402 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001403 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001404 --with-cxx-main=<compiler>
1405 compile main() and link python executable with C++
1406 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001407 --with-suffix=.exe set executable suffix
1408 --with-pydebug build with Py_DEBUG defined
1409 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001410 --with-system-expat build pyexpat module using an installed expat
1411 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001412 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001413 --with-dbmliborder=db1:db2:...
1414 order to check db backends for dbm. Valid value is a
1415 colon separated string with the backend names
1416 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001417 --with-signal-module disable/enable signal module
1418 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1419 --with(out)-threads[=DIRECTORY]
1420 disable/enable thread support
1421 --with(out)-thread[=DIRECTORY]
1422 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001423 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001424 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001425 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001426 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001427 --with-fpectl enable SIGFPE catching
1428 --with-libm=STRING math library
1429 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001430 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001431 --with(out)-computed-gotos
1432 Use computed gotos in evaluation loop (enabled by
1433 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001434
1435Some influential environment variables:
1436 CC C compiler command
1437 CFLAGS C compiler flags
1438 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1439 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001440 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001441 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001442 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001443 CPP C preprocessor
1444
1445Use these variables to override the choices made by `configure' or to help
1446it to find libraries and programs with nonstandard names/locations.
1447
Georg Brandle2e15612009-05-20 18:25:10 +00001448Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001449_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001450ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001451fi
1452
1453if test "$ac_init_help" = "recursive"; then
1454 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001455 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001456 test -d "$ac_dir" ||
1457 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1458 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001459 ac_builddir=.
1460
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461case "$ac_dir" in
1462.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1463*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001464 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001465 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001466 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001467 case $ac_top_builddir_sub in
1468 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1469 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1470 esac ;;
1471esac
1472ac_abs_top_builddir=$ac_pwd
1473ac_abs_builddir=$ac_pwd$ac_dir_suffix
1474# for backward compatibility:
1475ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001476
1477case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001478 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480 ac_top_srcdir=$ac_top_builddir_sub
1481 ac_abs_top_srcdir=$ac_pwd ;;
1482 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001483 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001484 ac_top_srcdir=$srcdir
1485 ac_abs_top_srcdir=$srcdir ;;
1486 *) # Relative name.
1487 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1488 ac_top_srcdir=$ac_top_build_prefix$srcdir
1489 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001490esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001491ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001492
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493 cd "$ac_dir" || { ac_status=$?; continue; }
1494 # Check for guested configure.
1495 if test -f "$ac_srcdir/configure.gnu"; then
1496 echo &&
1497 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1498 elif test -f "$ac_srcdir/configure"; then
1499 echo &&
1500 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001501 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001502 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001503 fi || ac_status=$?
1504 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001505 done
1506fi
1507
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001508test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001509if $ac_init_version; then
1510 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001511python configure 3.2
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001512generated by GNU Autoconf 2.67
Martin v. Löwis11437992002-04-12 09:54:03 +00001513
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001514Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001515This configure script is free software; the Free Software Foundation
1516gives unlimited permission to copy, distribute and modify it.
1517_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001520
1521## ------------------------ ##
1522## Autoconf initialization. ##
1523## ------------------------ ##
1524
1525# ac_fn_c_try_compile LINENO
1526# --------------------------
1527# Try to compile conftest.$ac_ext, and return whether this succeeded.
1528ac_fn_c_try_compile ()
1529{
1530 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1531 rm -f conftest.$ac_objext
1532 if { { ac_try="$ac_compile"
1533case "(($ac_try" in
1534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1535 *) ac_try_echo=$ac_try;;
1536esac
1537eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1538$as_echo "$ac_try_echo"; } >&5
1539 (eval "$ac_compile") 2>conftest.err
1540 ac_status=$?
1541 if test -s conftest.err; then
1542 grep -v '^ *+' conftest.err >conftest.er1
1543 cat conftest.er1 >&5
1544 mv -f conftest.er1 conftest.err
1545 fi
1546 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1547 test $ac_status = 0; } && {
1548 test -z "$ac_c_werror_flag" ||
1549 test ! -s conftest.err
1550 } && test -s conftest.$ac_objext; then :
1551 ac_retval=0
1552else
1553 $as_echo "$as_me: failed program was:" >&5
1554sed 's/^/| /' conftest.$ac_ext >&5
1555
1556 ac_retval=1
1557fi
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001558 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001559 as_fn_set_status $ac_retval
1560
1561} # ac_fn_c_try_compile
1562
1563# ac_fn_c_try_cpp LINENO
1564# ----------------------
1565# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1566ac_fn_c_try_cpp ()
1567{
1568 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1569 if { { ac_try="$ac_cpp conftest.$ac_ext"
1570case "(($ac_try" in
1571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1572 *) ac_try_echo=$ac_try;;
1573esac
1574eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1575$as_echo "$ac_try_echo"; } >&5
1576 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1577 ac_status=$?
1578 if test -s conftest.err; then
1579 grep -v '^ *+' conftest.err >conftest.er1
1580 cat conftest.er1 >&5
1581 mv -f conftest.er1 conftest.err
1582 fi
1583 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001584 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001585 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1586 test ! -s conftest.err
1587 }; then :
1588 ac_retval=0
1589else
1590 $as_echo "$as_me: failed program was:" >&5
1591sed 's/^/| /' conftest.$ac_ext >&5
1592
1593 ac_retval=1
1594fi
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001595 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001596 as_fn_set_status $ac_retval
1597
1598} # ac_fn_c_try_cpp
1599
1600# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1601# -------------------------------------------------------
1602# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1603# the include files in INCLUDES and setting the cache variable VAR
1604# accordingly.
1605ac_fn_c_check_header_mongrel ()
1606{
1607 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001608 if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1610$as_echo_n "checking for $2... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001611if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001612 $as_echo_n "(cached) " >&6
1613fi
1614eval ac_res=\$$3
1615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1616$as_echo "$ac_res" >&6; }
1617else
1618 # Is the header compilable?
1619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1620$as_echo_n "checking $2 usability... " >&6; }
1621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1622/* end confdefs.h. */
1623$4
1624#include <$2>
1625_ACEOF
1626if ac_fn_c_try_compile "$LINENO"; then :
1627 ac_header_compiler=yes
1628else
1629 ac_header_compiler=no
1630fi
1631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1633$as_echo "$ac_header_compiler" >&6; }
1634
1635# Is the header present?
1636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1637$as_echo_n "checking $2 presence... " >&6; }
1638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1639/* end confdefs.h. */
1640#include <$2>
1641_ACEOF
1642if ac_fn_c_try_cpp "$LINENO"; then :
1643 ac_header_preproc=yes
1644else
1645 ac_header_preproc=no
1646fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001647rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1649$as_echo "$ac_header_preproc" >&6; }
1650
1651# So? What about this header?
1652case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1653 yes:no: )
1654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1655$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1657$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1658 ;;
1659 no:yes:* )
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1661$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1663$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1665$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1667$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1669$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001670( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001671## Report this to http://bugs.python.org/ ##
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001672## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001673 ) | sed "s/^/$as_me: WARNING: /" >&2
1674 ;;
1675esac
1676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1677$as_echo_n "checking for $2... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001678if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001679 $as_echo_n "(cached) " >&6
1680else
1681 eval "$3=\$ac_header_compiler"
1682fi
1683eval ac_res=\$$3
1684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1685$as_echo "$ac_res" >&6; }
1686fi
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001687 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001688
1689} # ac_fn_c_check_header_mongrel
1690
1691# ac_fn_c_try_run LINENO
1692# ----------------------
1693# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1694# that executables *can* be run.
1695ac_fn_c_try_run ()
1696{
1697 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1698 if { { ac_try="$ac_link"
1699case "(($ac_try" in
1700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1701 *) ac_try_echo=$ac_try;;
1702esac
1703eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1704$as_echo "$ac_try_echo"; } >&5
1705 (eval "$ac_link") 2>&5
1706 ac_status=$?
1707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1708 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1709 { { case "(($ac_try" in
1710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1711 *) ac_try_echo=$ac_try;;
1712esac
1713eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1714$as_echo "$ac_try_echo"; } >&5
1715 (eval "$ac_try") 2>&5
1716 ac_status=$?
1717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1718 test $ac_status = 0; }; }; then :
1719 ac_retval=0
1720else
1721 $as_echo "$as_me: program exited with status $ac_status" >&5
1722 $as_echo "$as_me: failed program was:" >&5
1723sed 's/^/| /' conftest.$ac_ext >&5
1724
1725 ac_retval=$ac_status
1726fi
1727 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001728 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001729 as_fn_set_status $ac_retval
1730
1731} # ac_fn_c_try_run
1732
1733# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1734# -------------------------------------------------------
1735# Tests whether HEADER exists and can be compiled using the include files in
1736# INCLUDES, setting the cache variable VAR accordingly.
1737ac_fn_c_check_header_compile ()
1738{
1739 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1741$as_echo_n "checking for $2... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001742if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001743 $as_echo_n "(cached) " >&6
1744else
1745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1746/* end confdefs.h. */
1747$4
1748#include <$2>
1749_ACEOF
1750if ac_fn_c_try_compile "$LINENO"; then :
1751 eval "$3=yes"
1752else
1753 eval "$3=no"
1754fi
1755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1756fi
1757eval ac_res=\$$3
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1759$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001760 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001761
1762} # ac_fn_c_check_header_compile
1763
1764# ac_fn_c_try_link LINENO
1765# -----------------------
1766# Try to link conftest.$ac_ext, and return whether this succeeded.
1767ac_fn_c_try_link ()
1768{
1769 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1770 rm -f conftest.$ac_objext conftest$ac_exeext
1771 if { { ac_try="$ac_link"
1772case "(($ac_try" in
1773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1774 *) ac_try_echo=$ac_try;;
1775esac
1776eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1777$as_echo "$ac_try_echo"; } >&5
1778 (eval "$ac_link") 2>conftest.err
1779 ac_status=$?
1780 if test -s conftest.err; then
1781 grep -v '^ *+' conftest.err >conftest.er1
1782 cat conftest.er1 >&5
1783 mv -f conftest.er1 conftest.err
1784 fi
1785 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1786 test $ac_status = 0; } && {
1787 test -z "$ac_c_werror_flag" ||
1788 test ! -s conftest.err
1789 } && test -s conftest$ac_exeext && {
1790 test "$cross_compiling" = yes ||
1791 $as_test_x conftest$ac_exeext
1792 }; then :
1793 ac_retval=0
1794else
1795 $as_echo "$as_me: failed program was:" >&5
1796sed 's/^/| /' conftest.$ac_ext >&5
1797
1798 ac_retval=1
1799fi
1800 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1801 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1802 # interfere with the next link command; also delete a directory that is
1803 # left behind by Apple's compiler. We do this before executing the actions.
1804 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001805 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001806 as_fn_set_status $ac_retval
1807
1808} # ac_fn_c_try_link
1809
1810# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1811# -------------------------------------------
1812# Tests whether TYPE exists after having included INCLUDES, setting cache
1813# variable VAR accordingly.
1814ac_fn_c_check_type ()
1815{
1816 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1818$as_echo_n "checking for $2... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001819if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001820 $as_echo_n "(cached) " >&6
1821else
1822 eval "$3=no"
1823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1824/* end confdefs.h. */
1825$4
1826int
1827main ()
1828{
1829if (sizeof ($2))
1830 return 0;
1831 ;
1832 return 0;
1833}
1834_ACEOF
1835if ac_fn_c_try_compile "$LINENO"; then :
1836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1837/* end confdefs.h. */
1838$4
1839int
1840main ()
1841{
1842if (sizeof (($2)))
1843 return 0;
1844 ;
1845 return 0;
1846}
1847_ACEOF
1848if ac_fn_c_try_compile "$LINENO"; then :
1849
1850else
1851 eval "$3=yes"
1852fi
1853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1854fi
1855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1856fi
1857eval ac_res=\$$3
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1859$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001860 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001861
1862} # ac_fn_c_check_type
1863
1864# ac_fn_c_find_uintX_t LINENO BITS VAR
1865# ------------------------------------
1866# Finds an unsigned integer type with width BITS, setting cache variable VAR
1867# accordingly.
1868ac_fn_c_find_uintX_t ()
1869{
1870 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1872$as_echo_n "checking for uint$2_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001873if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001874 $as_echo_n "(cached) " >&6
1875else
1876 eval "$3=no"
1877 # Order is important - never check a type that is potentially smaller
1878 # than half of the expected target width.
1879 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1880 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1882/* end confdefs.h. */
1883$ac_includes_default
1884int
1885main ()
1886{
1887static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1888test_array [0] = 0
1889
1890 ;
1891 return 0;
1892}
1893_ACEOF
1894if ac_fn_c_try_compile "$LINENO"; then :
1895 case $ac_type in #(
1896 uint$2_t) :
1897 eval "$3=yes" ;; #(
1898 *) :
1899 eval "$3=\$ac_type" ;;
1900esac
1901fi
1902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001903 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001904
1905else
1906 break
1907fi
1908 done
1909fi
1910eval ac_res=\$$3
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1912$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001913 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001914
1915} # ac_fn_c_find_uintX_t
1916
1917# ac_fn_c_find_intX_t LINENO BITS VAR
1918# -----------------------------------
1919# Finds a signed integer type with width BITS, setting cache variable VAR
1920# accordingly.
1921ac_fn_c_find_intX_t ()
1922{
1923 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1925$as_echo_n "checking for int$2_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001926if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001927 $as_echo_n "(cached) " >&6
1928else
1929 eval "$3=no"
1930 # Order is important - never check a type that is potentially smaller
1931 # than half of the expected target width.
1932 for ac_type in int$2_t 'int' 'long int' \
1933 'long long int' 'short int' 'signed char'; do
1934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1935/* end confdefs.h. */
1936$ac_includes_default
Barry Warsaw278266f2010-10-14 17:38:46 +00001937 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001938int
1939main ()
1940{
Barry Warsaw278266f2010-10-14 17:38:46 +00001941static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001942test_array [0] = 0
1943
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$ac_includes_default
Barry Warsaw278266f2010-10-14 17:38:46 +00001952 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001953int
1954main ()
1955{
Barry Warsaw278266f2010-10-14 17:38:46 +00001956static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001957 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1958test_array [0] = 0
1959
1960 ;
1961 return 0;
1962}
1963_ACEOF
1964if ac_fn_c_try_compile "$LINENO"; then :
1965
1966else
1967 case $ac_type in #(
1968 int$2_t) :
1969 eval "$3=yes" ;; #(
1970 *) :
1971 eval "$3=\$ac_type" ;;
1972esac
1973fi
1974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001977 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001978
1979else
1980 break
1981fi
1982 done
1983fi
1984eval ac_res=\$$3
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1986$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00001987 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001988
1989} # ac_fn_c_find_intX_t
1990
1991# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1992# --------------------------------------------
1993# Tries to find the compile-time value of EXPR in a program that includes
1994# INCLUDES, setting VAR accordingly. Returns whether the value could be
1995# computed
1996ac_fn_c_compute_int ()
1997{
1998 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1999 if test "$cross_compiling" = yes; then
2000 # Depending upon the size, compute the lo and hi bounds.
2001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002/* end confdefs.h. */
2003$4
2004int
2005main ()
2006{
2007static int test_array [1 - 2 * !(($2) >= 0)];
2008test_array [0] = 0
2009
2010 ;
2011 return 0;
2012}
2013_ACEOF
2014if ac_fn_c_try_compile "$LINENO"; then :
2015 ac_lo=0 ac_mid=0
2016 while :; do
2017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2018/* end confdefs.h. */
2019$4
2020int
2021main ()
2022{
2023static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2024test_array [0] = 0
2025
2026 ;
2027 return 0;
2028}
2029_ACEOF
2030if ac_fn_c_try_compile "$LINENO"; then :
2031 ac_hi=$ac_mid; break
2032else
2033 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2034 if test $ac_lo -le $ac_mid; then
2035 ac_lo= ac_hi=
2036 break
2037 fi
2038 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2039fi
2040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2041 done
2042else
2043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2044/* end confdefs.h. */
2045$4
2046int
2047main ()
2048{
2049static int test_array [1 - 2 * !(($2) < 0)];
2050test_array [0] = 0
2051
2052 ;
2053 return 0;
2054}
2055_ACEOF
2056if ac_fn_c_try_compile "$LINENO"; then :
2057 ac_hi=-1 ac_mid=-1
2058 while :; do
2059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2066test_array [0] = 0
2067
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073 ac_lo=$ac_mid; break
2074else
2075 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2076 if test $ac_mid -le $ac_hi; then
2077 ac_lo= ac_hi=
2078 break
2079 fi
2080 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083 done
2084else
2085 ac_lo= ac_hi=
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090# Binary search between lo and hi bounds.
2091while test "x$ac_lo" != "x$ac_hi"; do
2092 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2100test_array [0] = 0
2101
2102 ;
2103 return 0;
2104}
2105_ACEOF
2106if ac_fn_c_try_compile "$LINENO"; then :
2107 ac_hi=$ac_mid
2108else
2109 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2110fi
2111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112done
2113case $ac_lo in #((
2114?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2115'') ac_retval=1 ;;
2116esac
2117 else
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121static long int longval () { return $2; }
2122static unsigned long int ulongval () { return $2; }
2123#include <stdio.h>
2124#include <stdlib.h>
2125int
2126main ()
2127{
2128
2129 FILE *f = fopen ("conftest.val", "w");
2130 if (! f)
2131 return 1;
2132 if (($2) < 0)
2133 {
2134 long int i = longval ();
2135 if (i != ($2))
2136 return 1;
2137 fprintf (f, "%ld", i);
2138 }
2139 else
2140 {
2141 unsigned long int i = ulongval ();
2142 if (i != ($2))
2143 return 1;
2144 fprintf (f, "%lu", i);
2145 }
2146 /* Do not output a trailing newline, as this causes \r\n confusion
2147 on some platforms. */
2148 return ferror (f) || fclose (f) != 0;
2149
2150 ;
2151 return 0;
2152}
2153_ACEOF
2154if ac_fn_c_try_run "$LINENO"; then :
2155 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2156else
2157 ac_retval=1
2158fi
2159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2160 conftest.$ac_objext conftest.beam conftest.$ac_ext
2161rm -f conftest.val
2162
2163 fi
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002164 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002165 as_fn_set_status $ac_retval
2166
2167} # ac_fn_c_compute_int
2168
2169# ac_fn_c_check_func LINENO FUNC VAR
2170# ----------------------------------
2171# Tests whether FUNC exists, setting the cache variable VAR accordingly
2172ac_fn_c_check_func ()
2173{
2174 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2176$as_echo_n "checking for $2... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002177if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002178 $as_echo_n "(cached) " >&6
2179else
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h. */
2182/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2183 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2184#define $2 innocuous_$2
2185
2186/* System header to define __stub macros and hopefully few prototypes,
2187 which can conflict with char $2 (); below.
2188 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2189 <limits.h> exists even on freestanding compilers. */
2190
2191#ifdef __STDC__
2192# include <limits.h>
2193#else
2194# include <assert.h>
2195#endif
2196
2197#undef $2
2198
2199/* Override any GCC internal prototype to avoid an error.
2200 Use char because int might match the return type of a GCC
2201 builtin and then its argument prototype would still apply. */
2202#ifdef __cplusplus
2203extern "C"
2204#endif
2205char $2 ();
2206/* The GNU C library defines this for functions which it implements
2207 to always fail with ENOSYS. Some functions are actually named
2208 something starting with __ and the normal name is an alias. */
2209#if defined __stub_$2 || defined __stub___$2
2210choke me
2211#endif
2212
2213int
2214main ()
2215{
2216return $2 ();
2217 ;
2218 return 0;
2219}
2220_ACEOF
2221if ac_fn_c_try_link "$LINENO"; then :
2222 eval "$3=yes"
2223else
2224 eval "$3=no"
2225fi
2226rm -f core conftest.err conftest.$ac_objext \
2227 conftest$ac_exeext conftest.$ac_ext
2228fi
2229eval ac_res=\$$3
2230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2231$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002232 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002233
2234} # ac_fn_c_check_func
2235
2236# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2237# ----------------------------------------------------
2238# Tries to find if the field MEMBER exists in type AGGR, after including
2239# INCLUDES, setting cache variable VAR accordingly.
2240ac_fn_c_check_member ()
2241{
2242 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2244$as_echo_n "checking for $2.$3... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002245if eval "test \"\${$4+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002246 $as_echo_n "(cached) " >&6
2247else
2248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2249/* end confdefs.h. */
2250$5
2251int
2252main ()
2253{
2254static $2 ac_aggr;
2255if (ac_aggr.$3)
2256return 0;
2257 ;
2258 return 0;
2259}
2260_ACEOF
2261if ac_fn_c_try_compile "$LINENO"; then :
2262 eval "$4=yes"
2263else
2264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2265/* end confdefs.h. */
2266$5
2267int
2268main ()
2269{
2270static $2 ac_aggr;
2271if (sizeof ac_aggr.$3)
2272return 0;
2273 ;
2274 return 0;
2275}
2276_ACEOF
2277if ac_fn_c_try_compile "$LINENO"; then :
2278 eval "$4=yes"
2279else
2280 eval "$4=no"
2281fi
2282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2283fi
2284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2285fi
2286eval ac_res=\$$4
2287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2288$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002289 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002290
2291} # ac_fn_c_check_member
2292
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002293# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2294# ---------------------------------------------
2295# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2296# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002297ac_fn_c_check_decl ()
2298{
2299 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002300 as_decl_name=`echo $2|sed 's/ *(.*//'`
2301 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2303$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002304if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002305 $as_echo_n "(cached) " >&6
2306else
2307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308/* end confdefs.h. */
2309$4
2310int
2311main ()
2312{
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002313#ifndef $as_decl_name
2314#ifdef __cplusplus
2315 (void) $as_decl_use;
2316#else
2317 (void) $as_decl_name;
2318#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002319#endif
2320
2321 ;
2322 return 0;
2323}
2324_ACEOF
2325if ac_fn_c_try_compile "$LINENO"; then :
2326 eval "$3=yes"
2327else
2328 eval "$3=no"
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332eval ac_res=\$$3
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2334$as_echo "$ac_res" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002335 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002336
2337} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002339This file contains any messages produced by compilers while
2340running configure, to aid debugging if configure makes a mistake.
2341
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002342It was created by python $as_me 3.2, which was
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002343generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002344
2345 $ $0 $@
2346
2347_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002349{
2350cat <<_ASUNAME
2351## --------- ##
2352## Platform. ##
2353## --------- ##
2354
2355hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2356uname -m = `(uname -m) 2>/dev/null || echo unknown`
2357uname -r = `(uname -r) 2>/dev/null || echo unknown`
2358uname -s = `(uname -s) 2>/dev/null || echo unknown`
2359uname -v = `(uname -v) 2>/dev/null || echo unknown`
2360
2361/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2362/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2363
2364/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2365/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2366/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002367/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002368/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2369/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2370/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2371
2372_ASUNAME
2373
2374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2375for as_dir in $PATH
2376do
2377 IFS=$as_save_IFS
2378 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002379 $as_echo "PATH: $as_dir"
2380 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002381IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002382
2383} >&5
2384
2385cat >&5 <<_ACEOF
2386
2387
2388## ----------- ##
2389## Core tests. ##
2390## ----------- ##
2391
2392_ACEOF
2393
2394
2395# Keep a trace of the command line.
2396# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002397# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002398# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002401ac_configure_args0=
2402ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_must_keep_next=false
2404for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002405do
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 for ac_arg
2407 do
2408 case $ac_arg in
2409 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2410 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2411 | -silent | --silent | --silen | --sile | --sil)
2412 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 esac
2416 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002421 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 case $ac_arg in
2424 *=* | --config-cache | -C | -disable-* | --disable-* \
2425 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2426 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2427 | -with-* | --with-* | -without-* | --without-* | --x)
2428 case "$ac_configure_args0 " in
2429 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2430 esac
2431 ;;
2432 -* ) ac_must_keep_next=true ;;
2433 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002435 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 ;;
2437 esac
2438 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002439done
Matthias Kloseb9621712010-04-24 17:59:49 +00002440{ ac_configure_args0=; unset ac_configure_args0;}
2441{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002442
2443# When interrupted or exit'd, cleanup temporary files, and complete
2444# config.log. We remove comments because anyway the quotes in there
2445# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002446# WARNING: Use '\'' to represent an apostrophe within the trap.
2447# 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 +00002448trap 'exit_status=$?
2449 # Save into config.log some information that might help in debugging.
2450 {
2451 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002452
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002453 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002454## Cache variables. ##
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002455## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002456 echo
2457 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458(
2459 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2460 eval ac_val=\$$ac_var
2461 case $ac_val in #(
2462 *${as_nl}*)
2463 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002464 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2465$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 esac
2467 case $ac_var in #(
2468 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002469 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2470 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 esac ;;
2472 esac
2473 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2476 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 "s/'\''/'\''\\\\'\'''\''/g;
2479 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2480 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002481 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 esac |
2485 sort
2486)
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002488
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002489 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002490## Output variables. ##
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002491## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 echo
2493 for ac_var in $ac_subst_vars
2494 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 eval ac_val=\$$ac_var
2496 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 done | sort
2501 echo
2502
2503 if test -n "$ac_subst_files"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002504 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505## File substitutions. ##
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002506## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 echo
2508 for ac_var in $ac_subst_files
2509 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 eval ac_val=\$$ac_var
2511 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 done | sort
2516 echo
2517 fi
2518
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 if test -s confdefs.h; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002520 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002521## confdefs.h. ##
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002522## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
2526 fi
2527 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 $as_echo "$as_me: caught signal $ac_signal"
2529 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531 rm -f core *.core core.conftest.* &&
2532 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002535for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002537done
2538ac_signal=0
2539
2540# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002542
Matthias Kloseb9621712010-04-24 17:59:49 +00002543$as_echo "/* confdefs.h */" > confdefs.h
2544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545# Predefined preprocessor variables.
2546
2547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_NAME "$PACKAGE_NAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_VERSION "$PACKAGE_VERSION"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_STRING "$PACKAGE_STRING"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2565_ACEOF
2566
Matthias Kloseb9621712010-04-24 17:59:49 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_URL "$PACKAGE_URL"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571
2572# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002573# Prefer an explicitly selected file to automatically selected ones.
2574ac_site_file1=NONE
2575ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576if test -n "$CONFIG_SITE"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002577 # We do not want a PATH search for config.site.
2578 case $CONFIG_SITE in #((
2579 -*) ac_site_file1=./$CONFIG_SITE;;
2580 */*) ac_site_file1=$CONFIG_SITE;;
2581 *) ac_site_file1=./$CONFIG_SITE;;
2582 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 ac_site_file1=$prefix/share/config.site
2585 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586else
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 ac_site_file1=$ac_default_prefix/share/config.site
2588 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002590for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591do
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 test "x$ac_site_file" = xNONE && continue
2593 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2594 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2595$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 sed 's/^/| /' "$ac_site_file" >&5
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002597 . "$ac_site_file" \
2598 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2600as_fn_error $? "failed to load site script $ac_site_file
Barry Warsaw14d98ac2010-11-24 19:43:47 +00002601See \`config.log' for more details" "$LINENO" 5 ; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002602 fi
2603done
2604
2605if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 # Some versions of bash will fail to source /dev/null (special files
2607 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2608 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2609 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2610$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2613 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 esac
2615 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002616else
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2618$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 >$cache_file
2620fi
2621
2622# Check that the precious variables saved in the cache have kept the same
2623# value.
2624ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2627 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2629 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 case $ac_old_set,$ac_new_set in
2631 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2633$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 +00002634 ac_cache_corrupted=: ;;
2635 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2637$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 ac_cache_corrupted=: ;;
2639 ,);;
2640 *)
2641 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 # differences in whitespace do not lead to failure.
2643 ac_old_val_w=`echo x $ac_old_val`
2644 ac_new_val_w=`echo x $ac_new_val`
2645 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2647$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2648 ac_cache_corrupted=:
2649 else
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2651$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2652 eval $ac_var=\$ac_old_val
2653 fi
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2655$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2657$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 fi;;
2659 esac
2660 # Pass precious variables to config.status.
2661 if test "$ac_new_set" = set; then
2662 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 *) ac_arg=$ac_var=$ac_new_val ;;
2665 esac
2666 case " $ac_configure_args " in
2667 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 esac
2670 fi
2671done
2672if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2676$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002677 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002679## -------------------- ##
2680## Main body of script. ##
2681## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682
Guido van Rossum7f43da71994-08-01 12:15:30 +00002683ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002685ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2686ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2687ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688
Guido van Rossum627b2d71993-12-24 10:39:16 +00002689
Michael W. Hudson54241132001-12-07 15:38:26 +00002690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002691ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002692
2693
Martin v. Löwis11437992002-04-12 09:54:03 +00002694
Benjamin Petersond23f8222009-04-05 19:13:16 +00002695if test "$prefix" != "/"; then
2696 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2697fi
2698
2699
Martin v. Löwis11437992002-04-12 09:54:03 +00002700
2701
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002702# We don't use PACKAGE_ variables, and they cause conflicts
2703# with other autoconf-based packages that include Python.h
2704grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2705rm confdefs.h
2706mv confdefs.h.new confdefs.h
2707
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002708
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002709VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002710
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002711# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002712
2713SOVERSION=1.0
2714
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002715# The later defininition of _XOPEN_SOURCE disables certain features
2716# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2717
Matthias Kloseb9621712010-04-24 17:59:49 +00002718$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002719
2720
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002721# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2722# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2723# them.
2724
Matthias Kloseb9621712010-04-24 17:59:49 +00002725$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002726
2727
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002728# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2729# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2730# them.
2731
Matthias Kloseb9621712010-04-24 17:59:49 +00002732$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002733
2734
Martin v. Löwisd6320502004-08-12 13:45:08 +00002735# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2736# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2737
Matthias Kloseb9621712010-04-24 17:59:49 +00002738$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002739
2740
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002741# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2742# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2743# them.
2744
Matthias Kloseb9621712010-04-24 17:59:49 +00002745$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002746
2747
2748
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002749define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002750
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002751# Arguments passed to configure.
2752
2753CONFIG_ARGS="$ac_configure_args"
2754
Matthias Kloseb9621712010-04-24 17:59:49 +00002755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2756$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002757# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002758if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002759 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002760 case $enableval in
2761 yes)
2762 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002763 if test ! -d "${enableval}"
2764 then
2765 enableval=/
2766 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002767 ;;
2768 esac
2769 case $enableval in
2770 no)
2771 UNIVERSALSDK=
2772 enable_universalsdk=
2773 ;;
2774 *)
2775 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002776 if test ! -d "${UNIVERSALSDK}"
2777 then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002778 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002779 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002780 ;;
2781 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002782
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002783
Thomas Wouters477c8d52006-05-27 19:21:47 +00002784else
2785
2786 UNIVERSALSDK=
2787 enable_universalsdk=
2788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002789fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002790
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002791if test -n "${UNIVERSALSDK}"
2792then
Matthias Kloseb9621712010-04-24 17:59:49 +00002793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2794$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002795else
Matthias Kloseb9621712010-04-24 17:59:49 +00002796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2797$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002798fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002799
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002800
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002801
2802
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002803UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002804
Matthias Kloseb9621712010-04-24 17:59:49 +00002805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2806$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002807
2808# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002809if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002810 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2812$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002813 UNIVERSAL_ARCHS="$withval"
2814
2815else
2816
Matthias Kloseb9621712010-04-24 17:59:49 +00002817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2818$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002819
2820fi
2821
2822
2823
2824
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002825
2826# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002827if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002828 withval=$with_framework_name;
2829 PYTHONFRAMEWORK=${withval}
2830 PYTHONFRAMEWORKDIR=${withval}.framework
2831 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2832
2833else
2834
2835 PYTHONFRAMEWORK=Python
2836 PYTHONFRAMEWORKDIR=Python.framework
2837 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2838
2839fi
2840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002841# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002842if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002843 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002844 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002845 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002846 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002847 esac
2848 case $enableval in
2849 no)
2850 PYTHONFRAMEWORK=
2851 PYTHONFRAMEWORKDIR=no-framework
2852 PYTHONFRAMEWORKPREFIX=
2853 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002854 FRAMEWORKINSTALLFIRST=
2855 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002856 FRAMEWORKALTINSTALLFIRST=
2857 FRAMEWORKALTINSTALLLAST=
2858 if test "x${prefix}" = "xNONE"; then
2859 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2860 else
2861 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2862 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002863 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002864 ;;
2865 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002866 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002867 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002868 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002869 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002870 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2871 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002872 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002873
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002874 if test "x${prefix}" = "xNONE" ; then
2875 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002876
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002877 else
2878 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2879 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002880
2881 case "${enableval}" in
2882 /System*)
2883 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2884 if test "${prefix}" = "NONE" ; then
2885 # See below
2886 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2887 fi
2888 ;;
2889
2890 /Library*)
2891 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2892 ;;
2893
2894 */Library/Frameworks)
2895 MDIR="`dirname "${enableval}"`"
2896 MDIR="`dirname "${MDIR}"`"
2897 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2898
2899 if test "${prefix}" = "NONE"; then
2900 # User hasn't specified the
2901 # --prefix option, but wants to install
2902 # the framework in a non-default location,
2903 # ensure that the compatibility links get
2904 # installed relative to that prefix as well
2905 # instead of in /usr/local.
2906 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2907 fi
2908 ;;
2909
2910 *)
2911 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2912 ;;
2913 esac
2914
Jack Jansen127e56e2001-09-11 14:41:54 +00002915 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002916
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002917 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002918 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002919 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002921 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002922
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002923 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2924
2925 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2926
Jack Jansene578a632001-08-15 01:27:14 +00002927 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002928
Guido van Rossum563e7081996-09-10 18:20:48 +00002929else
Martin v. Löwis11437992002-04-12 09:54:03 +00002930
Jack Jansene578a632001-08-15 01:27:14 +00002931 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002932 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002933 PYTHONFRAMEWORKPREFIX=
2934 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002935 FRAMEWORKINSTALLFIRST=
2936 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002937 FRAMEWORKALTINSTALLFIRST=
2938 FRAMEWORKALTINSTALLLAST=
2939 if test "x${prefix}" = "xNONE" ; then
2940 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2941 else
2942 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2943 fi
Jack Jansene578a632001-08-15 01:27:14 +00002944 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002945
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002947fi
2948
Thomas Wouters477c8d52006-05-27 19:21:47 +00002949
2950
Michael W. Hudson54241132001-12-07 15:38:26 +00002951
2952
2953
2954
Jack Jansene578a632001-08-15 01:27:14 +00002955
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002956
2957
2958
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002959
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002960
Jack Jansene578a632001-08-15 01:27:14 +00002961##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002962## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002963## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002964##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002965# Set name for machine-dependent library files
2966
Matthias Kloseb9621712010-04-24 17:59:49 +00002967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2968$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002969if test -z "$MACHDEP"
2970then
Guido van Rossum563e7081996-09-10 18:20:48 +00002971 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002972 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002973 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002974 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002975 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002976 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002977 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002978 ac_md_system=`echo $ac_sys_system |
2979 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2980 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002981 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002982 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002983
Guido van Rossum07397971997-04-29 21:49:50 +00002984 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002985 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002986 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002987 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002988 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002989 esac
2990fi
Guido van Rossum91922671997-10-09 20:24:13 +00002991
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002992# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2993# disable features if it is defined, without any means to access these
2994# features as extensions. For these systems, we skip the definition of
2995# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2996# some feature, make sure there is no alternative way to access this
2997# feature. Also, when using wildcards, make sure you have verified the
2998# need for not defining _XOPEN_SOURCE on all systems matching the
2999# wildcard, and that the wildcard does not include future systems
3000# (which may remove their limitations).
3001case $ac_sys_system/$ac_sys_release in
3002 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3003 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003004 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003005 # In addition, Stefan Krah confirms that issue #1244610 exists through
3006 # OpenBSD 4.6, but is fixed in 4.7.
3007 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003008 define_xopen_source=no
3009 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3010 # also defined. This can be overridden by defining _BSD_SOURCE
3011 # As this has a different meaning on Linux, only define it on OpenBSD
3012
Matthias Kloseb9621712010-04-24 17:59:49 +00003013$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003014
3015 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003016 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003017 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3018 # also defined. This can be overridden by defining _BSD_SOURCE
3019 # As this has a different meaning on Linux, only define it on OpenBSD
3020
Matthias Kloseb9621712010-04-24 17:59:49 +00003021$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003022
3023 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003024 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3025 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3026 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003027 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 +00003028 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003029 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3030 # request to enable features supported by the standard as a request
3031 # to disable features not supported by the standard. The best way
3032 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3033 # entirely and define __EXTENSIONS__ instead.
3034 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003035 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003036 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3037 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003038 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003039 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003040 define_xopen_source=no;;
3041 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003042 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003043 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003044 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003045 # On FreeBSD 4, the math functions C89 does not cover are never defined
3046 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3047 FreeBSD/4.*)
3048 define_xopen_source=no;;
3049 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3050 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3051 # identifies itself as Darwin/7.*
3052 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3053 # disables platform specific features beyond repair.
3054 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3055 # has no effect, don't bother defining them
3056 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003057 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003058 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003059 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003060 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3061 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3062 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003063 AIX/4)
3064 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003065 AIX/5)
3066 if test `uname -r` -eq 1; then
3067 define_xopen_source=no
3068 fi
3069 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003070 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3071 # defining NI_NUMERICHOST.
3072 QNX/6.3.2)
3073 define_xopen_source=no
3074 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003075
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003076esac
3077
3078if test $define_xopen_source = yes
3079then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003080
Matthias Kloseb9621712010-04-24 17:59:49 +00003081$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003082
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003083
3084 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3085 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3086 # several APIs are not declared. Since this is also needed in some
3087 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003088
Matthias Kloseb9621712010-04-24 17:59:49 +00003089$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003090
3091
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003092
Matthias Kloseb9621712010-04-24 17:59:49 +00003093$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003094
3095
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003096fi
3097
Guido van Rossum91922671997-10-09 20:24:13 +00003098#
3099# SGI compilers allow the specification of the both the ABI and the
3100# ISA on the command line. Depending on the values of these switches,
3101# different and often incompatable code will be generated.
3102#
3103# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3104# thus supply support for various ABI/ISA combinations. The MACHDEP
3105# variable is also adjusted.
3106#
3107
3108if test ! -z "$SGI_ABI"
3109then
3110 CC="cc $SGI_ABI"
3111 LDFLAGS="$SGI_ABI $LDFLAGS"
3112 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3115$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003116
Jack Jansen6b08a402004-06-03 12:41:45 +00003117# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3118# it may influence the way we can build extensions, so distutils
3119# needs to check it
3120
Thomas Wouters477c8d52006-05-27 19:21:47 +00003121
Jack Jansen6b08a402004-06-03 12:41:45 +00003122CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003123EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003124
Matthias Kloseb9621712010-04-24 17:59:49 +00003125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3126$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003127ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3129$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003130
Guido van Rossum627b2d71993-12-24 10:39:16 +00003131# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003132
3133# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3134# for debug/optimization stuff. BASECFLAGS is for flags that are required
3135# just to get things to compile and link. Users are free to override OPT
3136# when running configure or make. The build should not break if they do.
3137# BASECFLAGS should generally not be messed with, however.
3138
3139# XXX shouldn't some/most/all of this code be merged with the stuff later
3140# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3142$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003144# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003145if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003146 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003147 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003148 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003149 without_gcc=yes;;
3150 yes) CC=gcc
3151 without_gcc=no;;
3152 *) CC=$withval
3153 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003154 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003155else
Martin v. Löwis11437992002-04-12 09:54:03 +00003156
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003157 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003158 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003159 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003160 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003161 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003162fi
3163
Matthias Kloseb9621712010-04-24 17:59:49 +00003164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3165$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003166
Guido van Rossum8b131c51995-03-09 14:10:13 +00003167# If the user switches compilers, we can't believe the cache
3168if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3169then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003170 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003171(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003172fi
3173
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003174# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3175# when the compiler supports them, but we don't always want -O2, and
3176# we set -g later.
3177if test -z "$CFLAGS"; then
3178 CFLAGS=
3179fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003180ac_ext=c
3181ac_cpp='$CPP $CPPFLAGS'
3182ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3183ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3184ac_compiler_gnu=$ac_cv_c_compiler_gnu
3185if test -n "$ac_tool_prefix"; then
3186 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3187set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3189$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003190if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003191 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003192else
3193 if test -n "$CC"; then
3194 ac_cv_prog_CC="$CC" # Let the user override the test.
3195else
Martin v. Löwis11437992002-04-12 09:54:03 +00003196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3197for as_dir in $PATH
3198do
3199 IFS=$as_save_IFS
3200 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003201 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003202 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 +00003203 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003204 $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 +00003205 break 2
3206 fi
3207done
Matthias Kloseb9621712010-04-24 17:59:49 +00003208 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003209IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003210
Jack Jansendd19cf82001-12-06 22:36:17 +00003211fi
3212fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003213CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003214if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3216$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003217else
Matthias Kloseb9621712010-04-24 17:59:49 +00003218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3219$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003220fi
3221
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003222
Martin v. Löwis11437992002-04-12 09:54:03 +00003223fi
3224if test -z "$ac_cv_prog_CC"; then
3225 ac_ct_CC=$CC
3226 # Extract the first word of "gcc", so it can be a program name with args.
3227set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3229$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003230if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003231 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003232else
3233 if test -n "$ac_ct_CC"; then
3234 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3235else
3236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3237for as_dir in $PATH
3238do
3239 IFS=$as_save_IFS
3240 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003241 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003242 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 +00003243 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003244 $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 +00003245 break 2
3246 fi
3247done
Matthias Kloseb9621712010-04-24 17:59:49 +00003248 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003249IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003250
3251fi
3252fi
3253ac_ct_CC=$ac_cv_prog_ac_ct_CC
3254if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3256$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003257else
Matthias Kloseb9621712010-04-24 17:59:49 +00003258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3259$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003260fi
3261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003262 if test "x$ac_ct_CC" = x; then
3263 CC=""
3264 else
3265 case $cross_compiling:$ac_tool_warned in
3266yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003267{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3268$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003269ac_tool_warned=yes ;;
3270esac
3271 CC=$ac_ct_CC
3272 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003273else
3274 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003275fi
3276
Jack Jansendd19cf82001-12-06 22:36:17 +00003277if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003278 if test -n "$ac_tool_prefix"; then
3279 # 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 +00003280set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3282$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003283if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003284 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003285else
3286 if test -n "$CC"; then
3287 ac_cv_prog_CC="$CC" # Let the user override the test.
3288else
Martin v. Löwis11437992002-04-12 09:54:03 +00003289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3290for as_dir in $PATH
3291do
3292 IFS=$as_save_IFS
3293 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003294 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003295 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003296 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003297 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003298 break 2
3299 fi
3300done
Matthias Kloseb9621712010-04-24 17:59:49 +00003301 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003302IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003303
3304fi
3305fi
3306CC=$ac_cv_prog_CC
3307if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3309$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003310else
Matthias Kloseb9621712010-04-24 17:59:49 +00003311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3312$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003313fi
3314
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003315
Martin v. Löwis11437992002-04-12 09:54:03 +00003316 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003317fi
3318if test -z "$CC"; then
3319 # Extract the first word of "cc", so it can be a program name with args.
3320set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3322$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003323if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003324 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003325else
3326 if test -n "$CC"; then
3327 ac_cv_prog_CC="$CC" # Let the user override the test.
3328else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003329 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3331for as_dir in $PATH
3332do
3333 IFS=$as_save_IFS
3334 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003335 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003336 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 +00003337 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3338 ac_prog_rejected=yes
3339 continue
3340 fi
3341 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003342 $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 +00003343 break 2
3344 fi
3345done
Matthias Kloseb9621712010-04-24 17:59:49 +00003346 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003347IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003348
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003349if test $ac_prog_rejected = yes; then
3350 # We found a bogon in the path, so make sure we never use it.
3351 set dummy $ac_cv_prog_CC
3352 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003353 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003354 # We chose a different compiler from the bogus one.
3355 # However, it has the same basename, so the bogon will be chosen
3356 # first if we set CC to just the basename; use the full file name.
3357 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003358 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003359 fi
3360fi
3361fi
3362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003363CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003364if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3366$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003367else
Matthias Kloseb9621712010-04-24 17:59:49 +00003368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3369$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003370fi
3371
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003372
Martin v. Löwis11437992002-04-12 09:54:03 +00003373fi
3374if test -z "$CC"; then
3375 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003376 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003377 do
3378 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3379set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3381$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003382if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003383 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003384else
3385 if test -n "$CC"; then
3386 ac_cv_prog_CC="$CC" # Let the user override the test.
3387else
Martin v. Löwis11437992002-04-12 09:54:03 +00003388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3389for as_dir in $PATH
3390do
3391 IFS=$as_save_IFS
3392 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003393 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003394 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 +00003395 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003396 $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 +00003397 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003398 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003399done
Matthias Kloseb9621712010-04-24 17:59:49 +00003400 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003402
3403fi
3404fi
3405CC=$ac_cv_prog_CC
3406if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3408$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003409else
Matthias Kloseb9621712010-04-24 17:59:49 +00003410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3411$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003412fi
3413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003414
Martin v. Löwis11437992002-04-12 09:54:03 +00003415 test -n "$CC" && break
3416 done
3417fi
3418if test -z "$CC"; then
3419 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003420 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003421do
3422 # Extract the first word of "$ac_prog", so it can be a program name with args.
3423set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3425$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003426if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003427 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003428else
3429 if test -n "$ac_ct_CC"; then
3430 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3431else
3432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3433for as_dir in $PATH
3434do
3435 IFS=$as_save_IFS
3436 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003437 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003438 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 +00003439 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003440 $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 +00003441 break 2
3442 fi
3443done
Matthias Kloseb9621712010-04-24 17:59:49 +00003444 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003445IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003446
Martin v. Löwis11437992002-04-12 09:54:03 +00003447fi
3448fi
3449ac_ct_CC=$ac_cv_prog_ac_ct_CC
3450if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3452$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003453else
Matthias Kloseb9621712010-04-24 17:59:49 +00003454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3455$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003456fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003457
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458
Martin v. Löwis11437992002-04-12 09:54:03 +00003459 test -n "$ac_ct_CC" && break
3460done
Michael W. Hudson54241132001-12-07 15:38:26 +00003461
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003462 if test "x$ac_ct_CC" = x; then
3463 CC=""
3464 else
3465 case $cross_compiling:$ac_tool_warned in
3466yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003467{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3468$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003469ac_tool_warned=yes ;;
3470esac
3471 CC=$ac_ct_CC
3472 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003473fi
3474
3475fi
3476
3477
Matthias Kloseb9621712010-04-24 17:59:49 +00003478test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3479$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003480as_fn_error $? "no acceptable C compiler found in \$PATH
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003481See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003482
3483# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003484$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3485set X $ac_compile
3486ac_compiler=$2
3487for ac_option in --version -v -V -qversion; do
3488 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003489case "(($ac_try" in
3490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3491 *) ac_try_echo=$ac_try;;
3492esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003493eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3494$as_echo "$ac_try_echo"; } >&5
3495 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003496 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003497 if test -s conftest.err; then
3498 sed '10a\
3499... rest of stderr output deleted ...
3500 10q' conftest.err >conftest.er1
3501 cat conftest.er1 >&5
3502 fi
3503 rm -f conftest.er1 conftest.err
3504 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3505 test $ac_status = 0; }
3506done
Martin v. Löwis11437992002-04-12 09:54:03 +00003507
Matthias Kloseb9621712010-04-24 17:59:49 +00003508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003509/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003510
Martin v. Löwis11437992002-04-12 09:54:03 +00003511int
3512main ()
3513{
3514
3515 ;
3516 return 0;
3517}
3518_ACEOF
3519ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003520ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003521# Try to create an executable without -o first, disregard a.out.
3522# It will help us diagnose broken compilers, and finding out an intuition
3523# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3525$as_echo_n "checking whether the C compiler works... " >&6; }
3526ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3527
3528# The possible output files:
3529ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3530
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531ac_rmfiles=
3532for ac_file in $ac_files
3533do
3534 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003535 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003536 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3537 esac
3538done
3539rm -f $ac_rmfiles
3540
Matthias Kloseb9621712010-04-24 17:59:49 +00003541if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003542case "(($ac_try" in
3543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3544 *) ac_try_echo=$ac_try;;
3545esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003546eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3547$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003548 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003549 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003550 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3551 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3553# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3554# in a Makefile. We should not override ac_cv_exeext if it was cached,
3555# so that the user can short-circuit this test for compilers unknown to
3556# Autoconf.
3557for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003558do
3559 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003560 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003561 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003562 ;;
3563 [ab].out )
3564 # We found the default executable, but exeext='' is most
3565 # certainly right.
3566 break;;
3567 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003568 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003569 then :; else
3570 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3571 fi
3572 # We set ac_cv_exeext here because the later test for it is not
3573 # safe: cross compilers may not add the suffix if given an `-o'
3574 # argument, so we may need to know it at that point already.
3575 # Even if this section looks crufty: it has the advantage of
3576 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003577 break;;
3578 * )
3579 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003580 esac
3581done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003582test "$ac_cv_exeext" = no && ac_cv_exeext=
3583
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003584else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003585 ac_file=''
3586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003587if test -z "$ac_file"; then :
3588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3589$as_echo "no" >&6; }
3590$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003591sed 's/^/| /' conftest.$ac_ext >&5
3592
Matthias Kloseb9621712010-04-24 17:59:49 +00003593{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3594$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003595as_fn_error 77 "C compiler cannot create executables
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003596See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003597else
3598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3599$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3602$as_echo_n "checking for C compiler default output file name... " >&6; }
3603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3604$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003605ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003606
Matthias Kloseb9621712010-04-24 17:59:49 +00003607rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003608ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3610$as_echo_n "checking for suffix of executables... " >&6; }
3611if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612case "(($ac_try" in
3613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3614 *) ac_try_echo=$ac_try;;
3615esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003616eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3617$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003618 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3621 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003622 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3623# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3624# work properly (i.e., refer to `conftest.exe'), while it won't with
3625# `rm'.
3626for ac_file in conftest.exe conftest conftest.*; do
3627 test -f "$ac_file" || continue
3628 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003630 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3631 break;;
3632 * ) break;;
3633 esac
3634done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003635else
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3637$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003638as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003639See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003641rm -f conftest conftest$ac_cv_exeext
3642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3643$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003644
3645rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003646EXEEXT=$ac_cv_exeext
3647ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3649/* end confdefs.h. */
3650#include <stdio.h>
3651int
3652main ()
3653{
3654FILE *f = fopen ("conftest.out", "w");
3655 return ferror (f) || fclose (f) != 0;
3656
3657 ;
3658 return 0;
3659}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003661ac_clean_files="$ac_clean_files conftest.out"
3662# Check that the compiler produces executables we can run. If not, either
3663# the compiler is broken, or we cross compile.
3664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3665$as_echo_n "checking whether we are cross compiling... " >&6; }
3666if test "$cross_compiling" != yes; then
3667 { { ac_try="$ac_link"
3668case "(($ac_try" in
3669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3670 *) ac_try_echo=$ac_try;;
3671esac
3672eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3673$as_echo "$ac_try_echo"; } >&5
3674 (eval "$ac_link") 2>&5
3675 ac_status=$?
3676 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3677 test $ac_status = 0; }
3678 if { ac_try='./conftest$ac_cv_exeext'
3679 { { case "(($ac_try" in
3680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3681 *) ac_try_echo=$ac_try;;
3682esac
3683eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3684$as_echo "$ac_try_echo"; } >&5
3685 (eval "$ac_try") 2>&5
3686 ac_status=$?
3687 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3688 test $ac_status = 0; }; }; then
3689 cross_compiling=no
3690 else
3691 if test "$cross_compiling" = maybe; then
3692 cross_compiling=yes
3693 else
3694 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3695$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003696as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003697If you meant to cross compile, use \`--host'.
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003698See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 fi
3700 fi
3701fi
3702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3703$as_echo "$cross_compiling" >&6; }
3704
3705rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3706ac_clean_files=$ac_clean_files_save
3707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3708$as_echo_n "checking for suffix of object files... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003709if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 $as_echo_n "(cached) " >&6
3711else
3712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003713/* end confdefs.h. */
3714
3715int
3716main ()
3717{
3718
3719 ;
3720 return 0;
3721}
3722_ACEOF
3723rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003724if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725case "(($ac_try" in
3726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3727 *) ac_try_echo=$ac_try;;
3728esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003729eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3730$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3734 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735 for ac_file in conftest.o conftest.obj conftest.*; do
3736 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3740 break;;
3741 esac
3742done
3743else
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003745sed 's/^/| /' conftest.$ac_ext >&5
3746
Matthias Kloseb9621712010-04-24 17:59:49 +00003747{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003749as_fn_error $? "cannot compute suffix of object files: cannot compile
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003750See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003751fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003752rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3755$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003756OBJEXT=$ac_cv_objext
3757ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3759$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003760if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003762else
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003765
Martin v. Löwis11437992002-04-12 09:54:03 +00003766int
3767main ()
3768{
3769#ifndef __GNUC__
3770 choke me
3771#endif
3772
3773 ;
3774 return 0;
3775}
3776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003777if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003778 ac_compiler_gnu=yes
3779else
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003783ac_cv_c_compiler_gnu=$ac_compiler_gnu
3784
3785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3787$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3788if test $ac_compiler_gnu = yes; then
3789 GCC=yes
3790else
3791 GCC=
3792fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003793ac_test_CFLAGS=${CFLAGS+set}
3794ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3796$as_echo_n "checking whether $CC accepts -g... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003797if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003799else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003800 ac_save_c_werror_flag=$ac_c_werror_flag
3801 ac_c_werror_flag=yes
3802 ac_cv_prog_cc_g=no
3803 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003806
Martin v. Löwis11437992002-04-12 09:54:03 +00003807int
3808main ()
3809{
3810
3811 ;
3812 return 0;
3813}
3814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003815if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003816 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003817else
Matthias Kloseb9621712010-04-24 17:59:49 +00003818 CFLAGS=""
3819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003820/* end confdefs.h. */
3821
3822int
3823main ()
3824{
3825
3826 ;
3827 return 0;
3828}
3829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003830if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003831
Matthias Kloseb9621712010-04-24 17:59:49 +00003832else
3833 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836/* end confdefs.h. */
3837
3838int
3839main ()
3840{
3841
3842 ;
3843 return 0;
3844}
3845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003846if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3854 ac_c_werror_flag=$ac_save_c_werror_flag
3855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3857$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003858if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003859 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003860elif test $ac_cv_prog_cc_g = yes; then
3861 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003862 CFLAGS="-g -O2"
3863 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003864 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003865 fi
3866else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003867 if test "$GCC" = yes; then
3868 CFLAGS="-O2"
3869 else
3870 CFLAGS=
3871 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3874$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00003875if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003876 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003877else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003879ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003881/* end confdefs.h. */
3882#include <stdarg.h>
3883#include <stdio.h>
3884#include <sys/types.h>
3885#include <sys/stat.h>
3886/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3887struct buf { int x; };
3888FILE * (*rcsopen) (struct buf *, struct stat *, int);
3889static char *e (p, i)
3890 char **p;
3891 int i;
3892{
3893 return p[i];
3894}
3895static char *f (char * (*g) (char **, int), char **p, ...)
3896{
3897 char *s;
3898 va_list v;
3899 va_start (v,p);
3900 s = g (p, va_arg (v,int));
3901 va_end (v);
3902 return s;
3903}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003904
3905/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3906 function prototypes and stuff, but not '\xHH' hex character constants.
3907 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003909 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3910 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003911 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003912int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3915 inside strings and character constants. */
3916#define FOO(x) 'x'
3917int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3918
Skip Montanaro6dead952003-09-25 14:50:04 +00003919int test (int i, double x);
3920struct s1 {int (*f) (int a);};
3921struct s2 {int (*f) (double a);};
3922int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3923int argc;
3924char **argv;
3925int
3926main ()
3927{
3928return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3929 ;
3930 return 0;
3931}
3932_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3934 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003935do
3936 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003937 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940rm -f core conftest.err conftest.$ac_objext
3941 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003942done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003944CC=$ac_save_CC
3945
3946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003947# AC_CACHE_VAL
3948case "x$ac_cv_prog_cc_c89" in
3949 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3951$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3954$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003955 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3958$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003959esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003960if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003961
Matthias Kloseb9621712010-04-24 17:59:49 +00003962fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003963
Martin v. Löwis11437992002-04-12 09:54:03 +00003964ac_ext=c
3965ac_cpp='$CPP $CPPFLAGS'
3966ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3967ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3968ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003969
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003970
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003971
3972
Matthias Kloseb9621712010-04-24 17:59:49 +00003973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3974$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003977if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003979
3980 case $withval in
3981 no) with_cxx_main=no
3982 MAINCC='$(CC)';;
3983 yes) with_cxx_main=yes
3984 MAINCC='$(CXX)';;
3985 *) with_cxx_main=yes
3986 MAINCC=$withval
3987 if test -z "$CXX"
3988 then
3989 CXX=$withval
3990 fi;;
3991 esac
3992else
3993
3994 with_cxx_main=no
3995 MAINCC='$(CC)'
3996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997fi
3998
Matthias Kloseb9621712010-04-24 17:59:49 +00003999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4000$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004001
4002preset_cxx="$CXX"
4003if test -z "$CXX"
4004then
4005 case "$CC" in
4006 gcc) # Extract the first word of "g++", so it can be a program name with args.
4007set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4009$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004010if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004011 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004012else
4013 case $CXX in
4014 [\\/]* | ?:[\\/]*)
4015 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4016 ;;
4017 *)
4018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4019for as_dir in notfound
4020do
4021 IFS=$as_save_IFS
4022 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004024 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 +00004025 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004027 break 2
4028 fi
4029done
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004031IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004032
4033 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4034 ;;
4035esac
4036fi
4037CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004038if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4040$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004041else
Matthias Kloseb9621712010-04-24 17:59:49 +00004042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4043$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004045
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004046 ;;
4047 cc) # Extract the first word of "c++", so it can be a program name with args.
4048set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4050$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004051if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004053else
4054 case $CXX in
4055 [\\/]* | ?:[\\/]*)
4056 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4057 ;;
4058 *)
4059 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4060for as_dir in notfound
4061do
4062 IFS=$as_save_IFS
4063 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004064 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004065 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 +00004066 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004067 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004068 break 2
4069 fi
4070done
Matthias Kloseb9621712010-04-24 17:59:49 +00004071 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004072IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004073
4074 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4075 ;;
4076esac
4077fi
4078CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004079if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4081$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004082else
Matthias Kloseb9621712010-04-24 17:59:49 +00004083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4084$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004086
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004087 ;;
4088 esac
4089 if test "$CXX" = "notfound"
4090 then
4091 CXX=""
4092 fi
4093fi
4094if test -z "$CXX"
4095then
4096 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4097do
4098 # Extract the first word of "$ac_prog", so it can be a program name with args.
4099set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4101$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004102if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004104else
4105 if test -n "$CXX"; then
4106 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4107else
4108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4109for as_dir in $PATH
4110do
4111 IFS=$as_save_IFS
4112 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004113 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004114 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 +00004115 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004117 break 2
4118 fi
4119done
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004121IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004122
4123fi
4124fi
4125CXX=$ac_cv_prog_CXX
4126if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4128$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004129else
Matthias Kloseb9621712010-04-24 17:59:49 +00004130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4131$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004132fi
4133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004135 test -n "$CXX" && break
4136done
4137test -n "$CXX" || CXX="notfound"
4138
4139 if test "$CXX" = "notfound"
4140 then
4141 CXX=""
4142 fi
4143fi
4144if test "$preset_cxx" != "$CXX"
4145then
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004147
4148 By default, distutils will build C++ extension modules with \"$CXX\".
4149 If this is not intended, then set CXX on the configure command line.
4150 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004151$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004152
4153 By default, distutils will build C++ extension modules with \"$CXX\".
4154 If this is not intended, then set CXX on the configure command line.
4155 " >&2;}
4156fi
4157
4158
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004159# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004160
4161ac_ext=c
4162ac_cpp='$CPP $CPPFLAGS'
4163ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4164ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4165ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4167$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004168# On Suns, sometimes $CPP names a directory.
4169if test -n "$CPP" && test -d "$CPP"; then
4170 CPP=
4171fi
4172if test -z "$CPP"; then
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004173 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004175else
Martin v. Löwis11437992002-04-12 09:54:03 +00004176 # Double quotes because CPP needs to be expanded
4177 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4178 do
4179 ac_preproc_ok=false
4180for ac_c_preproc_warn_flag in '' yes
4181do
4182 # Use a header file that comes with gcc, so configuring glibc
4183 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004184 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4185 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004186 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004187 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004189/* end confdefs.h. */
4190#ifdef __STDC__
4191# include <limits.h>
4192#else
4193# include <assert.h>
4194#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004195 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004197if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004198
Matthias Kloseb9621712010-04-24 17:59:49 +00004199else
Martin v. Löwis11437992002-04-12 09:54:03 +00004200 # Broken: fails on valid input.
4201continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004202fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004203rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004206 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004209#include <ac_nonexistent.h>
4210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004211if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004212 # Broken: success on invalid input.
4213continue
4214else
Martin v. Löwis11437992002-04-12 09:54:03 +00004215 # Passes both tests.
4216ac_preproc_ok=:
4217break
4218fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004219rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004220
4221done
4222# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004223rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004224if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004225 break
4226fi
4227
4228 done
4229 ac_cv_prog_CPP=$CPP
4230
4231fi
4232 CPP=$ac_cv_prog_CPP
4233else
4234 ac_cv_prog_CPP=$CPP
4235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4237$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004238ac_preproc_ok=false
4239for ac_c_preproc_warn_flag in '' yes
4240do
4241 # Use a header file that comes with gcc, so configuring glibc
4242 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004243 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4244 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004245 # On the NeXT, cc -E runs the code through the compiler's parser,
4246 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004248/* end confdefs.h. */
4249#ifdef __STDC__
4250# include <limits.h>
4251#else
4252# include <assert.h>
4253#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004254 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004256if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004257
Matthias Kloseb9621712010-04-24 17:59:49 +00004258else
Martin v. Löwis11437992002-04-12 09:54:03 +00004259 # Broken: fails on valid input.
4260continue
4261fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004262rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004263
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004265 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004268#include <ac_nonexistent.h>
4269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004270if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004271 # Broken: success on invalid input.
4272continue
4273else
Martin v. Löwis11437992002-04-12 09:54:03 +00004274 # Passes both tests.
4275ac_preproc_ok=:
4276break
4277fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004278rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004279
4280done
4281# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004282rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004283if $ac_preproc_ok; then :
4284
Martin v. Löwis11437992002-04-12 09:54:03 +00004285else
Matthias Kloseb9621712010-04-24 17:59:49 +00004286 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4287$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004288as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004289See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004290fi
4291
4292ac_ext=c
4293ac_cpp='$CPP $CPPFLAGS'
4294ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4295ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4296ac_compiler_gnu=$ac_cv_c_compiler_gnu
4297
4298
Matthias Kloseb9621712010-04-24 17:59:49 +00004299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4300$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004301if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004303else
Matthias Kloseb9621712010-04-24 17:59:49 +00004304 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004306 # Loop through the user's path and test for each of PROGNAME-LIST
4307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4309do
4310 IFS=$as_save_IFS
4311 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 for ac_prog in grep ggrep; do
4313 for ac_exec_ext in '' $ac_executable_extensions; do
4314 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4315 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4316# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 # Check for GNU $ac_path_GREP
4318case `"$ac_path_GREP" --version 2>&1` in
4319*GNU*)
4320 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4321*)
4322 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004323 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324 while :
4325 do
4326 cat "conftest.in" "conftest.in" >"conftest.tmp"
4327 mv "conftest.tmp" "conftest.in"
4328 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004329 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4331 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004332 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4334 # Best one so far, save it but keep looking for a better one
4335 ac_cv_path_GREP="$ac_path_GREP"
4336 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004337 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338 # 10*(2^10) chars as input seems more than enough
4339 test $ac_count -gt 10 && break
4340 done
4341 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4342esac
4343
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 $ac_path_GREP_found && break 3
4345 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004349 if test -z "$ac_cv_path_GREP"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004350 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 +00004351 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352else
4353 ac_cv_path_GREP=$GREP
4354fi
4355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4358$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359 GREP="$ac_cv_path_GREP"
4360
4361
Matthias Kloseb9621712010-04-24 17:59:49 +00004362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4363$as_echo_n "checking for egrep... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004364if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004365 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366else
4367 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4368 then ac_cv_path_EGREP="$GREP -E"
4369 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004370 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 # Loop through the user's path and test for each of PROGNAME-LIST
4373 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4375do
4376 IFS=$as_save_IFS
4377 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004378 for ac_prog in egrep; do
4379 for ac_exec_ext in '' $ac_executable_extensions; do
4380 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4381 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4382# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004383 # Check for GNU $ac_path_EGREP
4384case `"$ac_path_EGREP" --version 2>&1` in
4385*GNU*)
4386 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4387*)
4388 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004389 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004390 while :
4391 do
4392 cat "conftest.in" "conftest.in" >"conftest.tmp"
4393 mv "conftest.tmp" "conftest.in"
4394 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004395 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004396 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4397 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004398 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004399 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4400 # Best one so far, save it but keep looking for a better one
4401 ac_cv_path_EGREP="$ac_path_EGREP"
4402 ac_path_EGREP_max=$ac_count
4403 fi
4404 # 10*(2^10) chars as input seems more than enough
4405 test $ac_count -gt 10 && break
4406 done
4407 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4408esac
4409
Matthias Kloseb9621712010-04-24 17:59:49 +00004410 $ac_path_EGREP_found && break 3
4411 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004412 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004413 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004415 if test -z "$ac_cv_path_EGREP"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004416 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 +00004417 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418else
4419 ac_cv_path_EGREP=$EGREP
4420fi
4421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422 fi
4423fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4425$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004426 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004427
4428
Matthias Kloseb9621712010-04-24 17:59:49 +00004429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4430$as_echo_n "checking for ANSI C header files... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004431if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004432 $as_echo_n "(cached) " >&6
4433else
4434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004435/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004436#include <stdlib.h>
4437#include <stdarg.h>
4438#include <string.h>
4439#include <float.h>
4440
4441int
4442main ()
4443{
4444
4445 ;
4446 return 0;
4447}
4448_ACEOF
4449if ac_fn_c_try_compile "$LINENO"; then :
4450 ac_cv_header_stdc=yes
4451else
4452 ac_cv_header_stdc=no
4453fi
4454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4455
4456if test $ac_cv_header_stdc = yes; then
4457 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4459/* end confdefs.h. */
4460#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004461
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004462_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004464 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004465
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004466else
Matthias Kloseb9621712010-04-24 17:59:49 +00004467 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004468fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004469rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004470
Matthias Kloseb9621712010-04-24 17:59:49 +00004471fi
4472
4473if test $ac_cv_header_stdc = yes; then
4474 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4476/* end confdefs.h. */
4477#include <stdlib.h>
4478
4479_ACEOF
4480if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4481 $EGREP "free" >/dev/null 2>&1; then :
4482
4483else
4484 ac_cv_header_stdc=no
4485fi
4486rm -f conftest*
4487
4488fi
4489
4490if test $ac_cv_header_stdc = yes; then
4491 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4492 if test "$cross_compiling" = yes; then :
4493 :
4494else
4495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4496/* end confdefs.h. */
4497#include <ctype.h>
4498#include <stdlib.h>
4499#if ((' ' & 0x0FF) == 0x020)
4500# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4501# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4502#else
4503# define ISLOWER(c) \
4504 (('a' <= (c) && (c) <= 'i') \
4505 || ('j' <= (c) && (c) <= 'r') \
4506 || ('s' <= (c) && (c) <= 'z'))
4507# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4508#endif
4509
4510#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4511int
4512main ()
4513{
4514 int i;
4515 for (i = 0; i < 256; i++)
4516 if (XOR (islower (i), ISLOWER (i))
4517 || toupper (i) != TOUPPER (i))
4518 return 2;
4519 return 0;
4520}
4521_ACEOF
4522if ac_fn_c_try_run "$LINENO"; then :
4523
4524else
4525 ac_cv_header_stdc=no
4526fi
4527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4528 conftest.$ac_objext conftest.beam conftest.$ac_ext
4529fi
4530
4531fi
4532fi
4533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4534$as_echo "$ac_cv_header_stdc" >&6; }
4535if test $ac_cv_header_stdc = yes; then
4536
4537$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4538
4539fi
4540
4541# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4542for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4543 inttypes.h stdint.h unistd.h
4544do :
4545 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4546ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4547"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004548if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004549 cat >>confdefs.h <<_ACEOF
4550#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4551_ACEOF
4552
4553fi
4554
4555done
4556
4557
4558
4559 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 +00004560if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004561 MINIX=yes
4562else
4563 MINIX=
4564fi
4565
4566
4567 if test "$MINIX" = yes; then
4568
4569$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4570
4571
4572$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4573
4574
4575$as_echo "#define _MINIX 1" >>confdefs.h
4576
4577 fi
4578
4579
4580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4581$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004582if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004583 $as_echo_n "(cached) " >&6
4584else
4585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4586/* end confdefs.h. */
4587
4588# define __EXTENSIONS__ 1
4589 $ac_includes_default
4590int
4591main ()
4592{
4593
4594 ;
4595 return 0;
4596}
4597_ACEOF
4598if ac_fn_c_try_compile "$LINENO"; then :
4599 ac_cv_safe_to_define___extensions__=yes
4600else
4601 ac_cv_safe_to_define___extensions__=no
4602fi
4603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4604fi
4605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4606$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4607 test $ac_cv_safe_to_define___extensions__ = yes &&
4608 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4609
4610 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4611
4612 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4613
4614 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4615
4616 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4617
4618
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004619
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004620# Check for unsupported systems
4621case $ac_sys_system/$ac_sys_release in
4622atheos*|Linux*/1*)
4623 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4624 echo See README for details.
4625 exit 1;;
4626esac
4627
4628
Matthias Kloseb9621712010-04-24 17:59:49 +00004629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4630$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004631
4632# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004633if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004634 withval=$with_suffix;
4635 case $withval in
4636 no) EXEEXT=;;
4637 yes) EXEEXT=.exe;;
4638 *) EXEEXT=$withval;;
4639 esac
4640fi
4641
Matthias Kloseb9621712010-04-24 17:59:49 +00004642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4643$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004644
4645# Test whether we're running on a non-case-sensitive system, in which
4646# case we give a warning if no ext is given
4647
Matthias Kloseb9621712010-04-24 17:59:49 +00004648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4649$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004650if test ! -d CaseSensitiveTestDir; then
4651mkdir CaseSensitiveTestDir
4652fi
4653
4654if test -d casesensitivetestdir
4655then
Matthias Kloseb9621712010-04-24 17:59:49 +00004656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4657$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004658 BUILDEXEEXT=.exe
4659else
Matthias Kloseb9621712010-04-24 17:59:49 +00004660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4661$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004662 BUILDEXEEXT=$EXEEXT
4663fi
4664rmdir CaseSensitiveTestDir
4665
4666case $MACHDEP in
4667bsdos*)
4668 case $CC in
4669 gcc) CC="$CC -D_HAVE_BSDI";;
4670 esac;;
4671esac
4672
4673case $ac_sys_system in
4674hp*|HP*)
4675 case $CC in
4676 cc|*/cc) CC="$CC -Ae";;
4677 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004678esac
4679
4680
4681
Matthias Kloseb9621712010-04-24 17:59:49 +00004682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4683$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004684if test -z "$LIBRARY"
4685then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004686 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4689$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004690
4691# LDLIBRARY is the name of the library to link against (as opposed to the
4692# name of the library into which to insert object files). BLDLIBRARY is also
4693# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4694# is blank as the main program is not linked directly against LDLIBRARY.
4695# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4696# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4697# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4698# DLLLIBRARY is the shared (i.e., DLL) library.
4699#
4700# RUNSHARED is used to run shared python without installed libraries
4701#
4702# INSTSONAME is the name of the shared library that will be use to install
4703# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004704#
4705# LDVERSION is the shared library version number, normally the Python version
4706# with the ABI build flags appended.
4707
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004708
4709
4710
4711
4712
4713
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004714
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004715LDLIBRARY="$LIBRARY"
4716BLDLIBRARY='$(LDLIBRARY)'
4717INSTSONAME='$(LDLIBRARY)'
4718DLLLIBRARY=''
4719LDLIBRARYDIR=''
4720RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004721LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004722
4723# LINKCC is the command that links the python executable -- default is $(CC).
4724# If CXX is set, and if it is needed to link a main function that was
4725# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4726# python might then depend on the C++ runtime
4727# This is altered for AIX in order to build the export list before
4728# linking.
4729
Matthias Kloseb9621712010-04-24 17:59:49 +00004730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4731$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004732if test -z "$LINKCC"
4733then
4734 LINKCC='$(PURIFY) $(MAINCC)'
4735 case $ac_sys_system in
4736 AIX*)
4737 exp_extra="\"\""
4738 if test $ac_sys_release -ge 5 -o \
4739 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4740 exp_extra="."
4741 fi
4742 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004743 QNX*)
4744 # qcc must be used because the other compilers do not
4745 # support -N.
4746 LINKCC=qcc;;
4747 esac
4748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4750$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004751
4752# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4753# make sure we default having it set to "no": this is used by
4754# distutils.unixccompiler to know if it should add --enable-new-dtags
4755# to linker command lines, and failing to detect GNU ld simply results
4756# in the same bahaviour as before.
4757
Matthias Kloseb9621712010-04-24 17:59:49 +00004758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4759$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004760ac_prog=ld
4761if test "$GCC" = yes; then
4762 ac_prog=`$CC -print-prog-name=ld`
4763fi
4764case `"$ac_prog" -V 2>&1 < /dev/null` in
4765 *GNU*)
4766 GNULD=yes;;
4767 *)
4768 GNULD=no;;
4769esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4771$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004772
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4774$as_echo_n "checking for inline... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004775if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004776 $as_echo_n "(cached) " >&6
4777else
4778 ac_cv_c_inline=no
4779for ac_kw in inline __inline__ __inline; do
4780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4781/* end confdefs.h. */
4782#ifndef __cplusplus
4783typedef int foo_t;
4784static $ac_kw foo_t static_foo () {return 0; }
4785$ac_kw foo_t foo () {return 0; }
4786#endif
4787
4788_ACEOF
4789if ac_fn_c_try_compile "$LINENO"; then :
4790 ac_cv_c_inline=$ac_kw
4791fi
4792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4793 test "$ac_cv_c_inline" != no && break
4794done
4795
4796fi
4797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4798$as_echo "$ac_cv_c_inline" >&6; }
4799
4800case $ac_cv_c_inline in
4801 inline | yes) ;;
4802 *)
4803 case $ac_cv_c_inline in
4804 no) ac_val=;;
4805 *) ac_val=$ac_cv_c_inline;;
4806 esac
4807 cat >>confdefs.h <<_ACEOF
4808#ifndef __cplusplus
4809#define inline $ac_val
4810#endif
4811_ACEOF
4812 ;;
4813esac
4814
4815if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004816
4817$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004818
4819
4820fi
4821
4822
Matthias Kloseb9621712010-04-24 17:59:49 +00004823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4824$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004825# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004826if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004827 enableval=$enable_shared;
4828fi
4829
4830
4831if test -z "$enable_shared"
4832then
4833 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004834 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004835 enable_shared="yes";;
4836 *)
4837 enable_shared="no";;
4838 esac
4839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4841$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842
Matthias Kloseb9621712010-04-24 17:59:49 +00004843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4844$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004846if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004847 enableval=$enable_profiling; ac_save_cc="$CC"
4848 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850 ac_enable_profiling="no"
4851else
Matthias Kloseb9621712010-04-24 17:59:49 +00004852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004853/* end confdefs.h. */
4854int main() { return 0; }
4855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004856if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857 ac_enable_profiling="yes"
4858else
Matthias Kloseb9621712010-04-24 17:59:49 +00004859 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004861rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4862 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004863fi
4864
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865 CC="$ac_save_cc"
4866fi
4867
Matthias Kloseb9621712010-04-24 17:59:49 +00004868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4869$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004870
4871case "$ac_enable_profiling" in
4872 "yes")
4873 BASECFLAGS="-pg $BASECFLAGS"
4874 LDFLAGS="-pg $LDFLAGS"
4875 ;;
4876esac
4877
Matthias Kloseb9621712010-04-24 17:59:49 +00004878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4879$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004880
4881# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4882# library that we build, but we do not want to link against it (we
4883# will find it with a -framework option). For this reason there is an
4884# extra variable BLDLIBRARY against which Python and the extension
4885# modules are linked, BLDLIBRARY. This is normally the same as
4886# LDLIBRARY, but empty for MacOSX framework builds.
4887if test "$enable_framework"
4888then
4889 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4890 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4891 BLDLIBRARY=''
4892else
4893 BLDLIBRARY='$(LDLIBRARY)'
4894fi
4895
4896# Other platforms follow
4897if test $enable_shared = "yes"; then
4898
Matthias Kloseb9621712010-04-24 17:59:49 +00004899$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900
4901 case $ac_sys_system in
4902 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004903 LDLIBRARY='libpython$(LDVERSION).dll.a'
4904 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004905 ;;
4906 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004907 LDLIBRARY='libpython$(LDVERSION).so'
4908 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004909 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4910 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004911 if test $with_pydebug == no
4912 then
4913 PY3LIBRARY=libpython3.so
4914 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004915 ;;
4916 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004917 LDLIBRARY='libpython$(LDVERSION).so'
4918 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004919 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4920 case $ac_sys_system in
4921 FreeBSD*)
4922 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4923 ;;
4924 esac
4925 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004926 PY3LIBRARY=libpython3.so
4927 if test $with_pydebug == no
4928 then
4929 PY3LIBRARY=libpython3.so
4930 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004931 ;;
4932 hp*|HP*)
4933 case `uname -m` in
4934 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004935 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004936 ;;
4937 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004938 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004939 ;;
4940 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004941 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4943 ;;
4944 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004945 LDLIBRARY='libpython$(LDVERSION).so'
4946 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4948 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004949 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004950 LDLIBRARY='libpython$(LDVERSION).dylib'
4951 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004952 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4953 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004954 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004955 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004956 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4957 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004958
4959 esac
4960else # shared is disabled
4961 case $ac_sys_system in
4962 CYGWIN*)
4963 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004964 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965 ;;
4966 esac
4967fi
4968
Matthias Kloseb9621712010-04-24 17:59:49 +00004969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4970$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004971
4972if test -n "$ac_tool_prefix"; then
4973 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4974set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4976$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004977if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004979else
4980 if test -n "$RANLIB"; then
4981 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4982else
4983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4984for as_dir in $PATH
4985do
4986 IFS=$as_save_IFS
4987 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004988 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004989 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4990 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004992 break 2
4993 fi
4994done
Matthias Kloseb9621712010-04-24 17:59:49 +00004995 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996IFS=$as_save_IFS
4997
4998fi
4999fi
5000RANLIB=$ac_cv_prog_RANLIB
5001if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5003$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005004else
Matthias Kloseb9621712010-04-24 17:59:49 +00005005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5006$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007fi
5008
5009
5010fi
5011if test -z "$ac_cv_prog_RANLIB"; then
5012 ac_ct_RANLIB=$RANLIB
5013 # Extract the first word of "ranlib", so it can be a program name with args.
5014set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5016$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005017if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005018 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019else
5020 if test -n "$ac_ct_RANLIB"; then
5021 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5022else
5023as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5024for as_dir in $PATH
5025do
5026 IFS=$as_save_IFS
5027 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005029 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5030 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032 break 2
5033 fi
5034done
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005036IFS=$as_save_IFS
5037
5038fi
5039fi
5040ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5041if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5043$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044else
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5046$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047fi
5048
5049 if test "x$ac_ct_RANLIB" = x; then
5050 RANLIB=":"
5051 else
5052 case $cross_compiling:$ac_tool_warned in
5053yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005054{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5055$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005056ac_tool_warned=yes ;;
5057esac
5058 RANLIB=$ac_ct_RANLIB
5059 fi
5060else
5061 RANLIB="$ac_cv_prog_RANLIB"
5062fi
5063
5064
5065for ac_prog in ar aal
5066do
5067 # Extract the first word of "$ac_prog", so it can be a program name with args.
5068set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005071if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073else
5074 if test -n "$AR"; then
5075 ac_cv_prog_AR="$AR" # Let the user override the test.
5076else
5077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080 IFS=$as_save_IFS
5081 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5084 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005086 break 2
5087 fi
5088done
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090IFS=$as_save_IFS
5091
5092fi
5093fi
5094AR=$ac_cv_prog_AR
5095if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5097$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005098else
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005101fi
5102
5103
5104 test -n "$AR" && break
5105done
5106test -n "$AR" || AR="ar"
5107
5108
5109# tweak ARFLAGS only if the user didn't set it on the command line
5110
5111if test -z "$ARFLAGS"
5112then
5113 ARFLAGS="rc"
5114fi
5115
5116
5117# Extract the first word of "svnversion", so it can be a program name with args.
5118set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5120$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005121if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123else
5124 if test -n "$SVNVERSION"; then
5125 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5126else
5127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5128for as_dir in $PATH
5129do
5130 IFS=$as_save_IFS
5131 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005132 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005133 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5134 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005136 break 2
5137 fi
5138done
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005140IFS=$as_save_IFS
5141
5142 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5143fi
5144fi
5145SVNVERSION=$ac_cv_prog_SVNVERSION
5146if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5148$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005149else
Matthias Kloseb9621712010-04-24 17:59:49 +00005150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5151$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005152fi
5153
5154
5155if test $SVNVERSION = found
5156then
5157 SVNVERSION="svnversion \$(srcdir)"
5158else
5159 SVNVERSION="echo Unversioned directory"
5160fi
5161
5162case $MACHDEP in
5163bsdos*|hp*|HP*)
5164 # install -d does not work on BSDI or HP-UX
5165 if test -z "$INSTALL"
5166 then
5167 INSTALL="${srcdir}/install-sh -c"
5168 fi
5169esac
5170ac_aux_dir=
5171for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005172 if test -f "$ac_dir/install-sh"; then
5173 ac_aux_dir=$ac_dir
5174 ac_install_sh="$ac_aux_dir/install-sh -c"
5175 break
5176 elif test -f "$ac_dir/install.sh"; then
5177 ac_aux_dir=$ac_dir
5178 ac_install_sh="$ac_aux_dir/install.sh -c"
5179 break
5180 elif test -f "$ac_dir/shtool"; then
5181 ac_aux_dir=$ac_dir
5182 ac_install_sh="$ac_aux_dir/shtool install -c"
5183 break
5184 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005185done
5186if test -z "$ac_aux_dir"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005187 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005188fi
5189
5190# These three variables are undocumented and unsupported,
5191# and are intended to be withdrawn in a future Autoconf release.
5192# They can cause serious problems if a builder's source tree is in a directory
5193# whose full name contains unusual characters.
5194ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5195ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5196ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5197
5198
5199# Find a good install program. We prefer a C program (faster),
5200# so one script is as good as another. But avoid the broken or
5201# incompatible versions:
5202# SysV /etc/install, /usr/sbin/install
5203# SunOS /usr/etc/install
5204# IRIX /sbin/install
5205# AIX /bin/install
5206# AmigaOS /C/install, which installs bootblocks on floppy discs
5207# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5208# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5209# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5210# OS/2's system install, which has a completely different semantic
5211# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005212# Reject install programs that cannot install multiple files.
5213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5214$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005215if test -z "$INSTALL"; then
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005216if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005217 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005218else
5219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5220for as_dir in $PATH
5221do
5222 IFS=$as_save_IFS
5223 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005224 # Account for people who put trailing slashes in PATH elements.
5225case $as_dir/ in #((
5226 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005227 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005228 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005229 /usr/ucb/* ) ;;
5230 *)
5231 # OSF1 and SCO ODT 3.0 have their own names for install.
5232 # Don't use installbsd from OSF since it installs stuff as root
5233 # by default.
5234 for ac_prog in ginstall scoinst install; do
5235 for ac_exec_ext in '' $ac_executable_extensions; do
5236 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5237 if test $ac_prog = install &&
5238 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5239 # AIX install. It has an incompatible calling convention.
5240 :
5241 elif test $ac_prog = install &&
5242 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5243 # program-specific install script used by HP pwplus--don't use.
5244 :
5245 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005246 rm -rf conftest.one conftest.two conftest.dir
5247 echo one > conftest.one
5248 echo two > conftest.two
5249 mkdir conftest.dir
5250 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5251 test -s conftest.one && test -s conftest.two &&
5252 test -s conftest.dir/conftest.one &&
5253 test -s conftest.dir/conftest.two
5254 then
5255 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5256 break 3
5257 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005258 fi
5259 fi
5260 done
5261 done
5262 ;;
5263esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005264
5265 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005266IFS=$as_save_IFS
5267
Matthias Kloseb9621712010-04-24 17:59:49 +00005268rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005269
5270fi
5271 if test "${ac_cv_path_install+set}" = set; then
5272 INSTALL=$ac_cv_path_install
5273 else
5274 # As a last resort, use the slow shell script. Don't cache a
5275 # value for INSTALL within a source directory, because that will
5276 # break other packages using the cache if that directory is
5277 # removed, or if the value is a relative name.
5278 INSTALL=$ac_install_sh
5279 fi
5280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5282$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005283
5284# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5285# It thinks the first close brace ends the variable substitution.
5286test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5287
5288test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5289
5290test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5291
5292
5293# Not every filesystem supports hard links
5294
5295if test -z "$LN" ; then
5296 case $ac_sys_system in
5297 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005298 *) LN=ln;;
5299 esac
5300fi
5301
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005302# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005303
5304ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005305
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005306# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5308$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309
5310# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005311if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312 withval=$with_pydebug;
5313if test "$withval" != no
5314then
5315
Matthias Kloseb9621712010-04-24 17:59:49 +00005316$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005317
Matthias Kloseb9621712010-04-24 17:59:49 +00005318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5319$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005320 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005321 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005322else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5323$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005324fi
5325else
Matthias Kloseb9621712010-04-24 17:59:49 +00005326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5327$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005328fi
5329
5330
5331# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5332# merged with this chunk of code?
5333
5334# Optimizer/debugger flags
5335# ------------------------
5336# (The following bit of code is complicated enough - please keep things
5337# indented properly. Just pretend you're editing Python code. ;-)
5338
5339# There are two parallel sets of case statements below, one that checks to
5340# see if OPT was set and one that does BASECFLAGS setting based upon
5341# compiler and platform. BASECFLAGS tweaks need to be made even if the
5342# user set OPT.
5343
5344# tweak OPT based on compiler and platform, only if the user didn't set
5345# it on the command line
5346
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005347if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005348then
5349 case $GCC in
5350 yes)
5351 if test "$CC" != 'g++' ; then
5352 STRICT_PROTO="-Wstrict-prototypes"
5353 fi
5354 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5355 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5356 WRAP="-fwrapv"
5357 fi
5358 case $ac_cv_prog_cc_g in
5359 yes)
5360 if test "$Py_DEBUG" = 'true' ; then
5361 # Optimization messes up debuggers, so turn it off for
5362 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005363 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364 else
5365 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5366 fi
5367 ;;
5368 *)
5369 OPT="-O3 -Wall $STRICT_PROTO"
5370 ;;
5371 esac
5372 case $ac_sys_system in
5373 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5374 ;;
5375 esac
5376 ;;
5377
5378 *)
5379 OPT="-O"
5380 ;;
5381 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005382fi
5383
5384
5385
5386# The -arch flags for universal builds on OSX
5387UNIVERSAL_ARCH_FLAGS=
5388
5389
5390# tweak BASECFLAGS based on compiler and platform
5391case $GCC in
5392yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005393 # Python doesn't violate C99 aliasing rules, but older versions of
5394 # GCC produce warnings for legal Python code. Enable
5395 # -fno-strict-aliasing on versions of GCC that support but produce
5396 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5398$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005399 ac_save_cc="$CC"
5400 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005401 save_CFLAGS="$CFLAGS"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005402 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005404else
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005407
Matthias Kloseb159a552010-04-25 21:00:44 +00005408
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005409int
5410main ()
5411{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005412
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005413 ;
5414 return 0;
5415}
Matthias Kloseb159a552010-04-25 21:00:44 +00005416
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005418if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005419
5420 CC="$ac_save_cc -fstrict-aliasing"
5421 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005423/* end confdefs.h. */
5424
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005425 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005426int
5427main ()
5428{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005429double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005430 ;
5431 return 0;
5432}
Matthias Kloseb159a552010-04-25 21:00:44 +00005433
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005435if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005436
5437 ac_cv_no_strict_aliasing=no
5438
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439else
Matthias Kloseb159a552010-04-25 21:00:44 +00005440
5441 ac_cv_no_strict_aliasing=yes
5442
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005443fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005445
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005446else
Matthias Kloseb159a552010-04-25 21:00:44 +00005447
5448 ac_cv_no_strict_aliasing=no
5449
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005452fi
5453
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005454 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5457$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005458 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005459 then
5460 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5461 fi
5462
5463 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5464 # support. Without this, treatment of subnormals doesn't follow
5465 # the standard.
5466 case $ac_sys_machine in
5467 alpha*)
5468 BASECFLAGS="$BASECFLAGS -mieee"
5469 ;;
5470 esac
5471
5472 case $ac_sys_system in
5473 SCO_SV*)
5474 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5475 ;;
5476 # is there any other compiler on Darwin besides gcc?
5477 Darwin*)
5478 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5479 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005480 if test "${CC}" = gcc
5481 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5483$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005484 case "${UNIVERSALSDK}" in
5485 */MacOSX10.4u.sdk)
5486 # Build using 10.4 SDK, force usage of gcc when the
5487 # compiler is gcc, otherwise the user will get very
5488 # confusing error messages when building on OSX 10.6
5489 CC=gcc-4.0
5490 CPP=cpp-4.0
5491 ;;
5492 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5494$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005495 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005496
5497
5498 if test "${enable_universalsdk}"; then
5499 UNIVERSAL_ARCH_FLAGS=""
5500 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5501 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5502 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005503 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5505 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005506 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005507 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005508
5509 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5510 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005511 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005512 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005514 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5515 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005516 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005517 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005518
5519 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5520 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005521 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005522 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005523
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005524 else
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005525 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 +00005526
5527 fi
5528
5529
Ronald Oussoren666028b2010-04-18 19:07:43 +00005530 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5531 if test "${UNIVERSALSDK}" != "/"
5532 then
5533 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5534 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005535 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536 fi
5537 fi
5538
5539 # Calculate the right deployment target for this build.
5540 #
5541 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5542 if test ${cur_target} '>' 10.2; then
5543 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005544 if test ${enable_universalsdk}; then
5545 if test "${UNIVERSAL_ARCHS}" = "all"; then
5546 # Ensure that the default platform for a
5547 # 4-way universal build is OSX 10.5,
5548 # that's the first OS release where
5549 # 4-way builds make sense.
5550 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005551
5552 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5553 cur_target='10.5'
5554
5555 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5556 cur_target='10.5'
5557
5558 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5559 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005560 fi
5561 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005562 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005563 # On Intel macs default to a deployment
5564 # target of 10.4, that's the first OSX
5565 # release with Intel support.
5566 cur_target="10.4"
5567 fi
5568 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005569 fi
5570 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5571
5572 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5573 # environment with a value that is the same as what we'll use
5574 # in the Makefile to ensure that we'll get the same compiler
5575 # environment during configure and build time.
5576 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5577 export MACOSX_DEPLOYMENT_TARGET
5578 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5579
5580 ;;
5581 OSF*)
5582 BASECFLAGS="$BASECFLAGS -mieee"
5583 ;;
5584 esac
5585 ;;
5586
5587*)
5588 case $ac_sys_system in
5589 OpenUNIX*|UnixWare*)
5590 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5591 ;;
5592 OSF*)
5593 BASECFLAGS="$BASECFLAGS -ieee -std"
5594 ;;
5595 SCO_SV*)
5596 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5597 ;;
5598 esac
5599 ;;
5600esac
5601
5602if test "$Py_DEBUG" = 'true'; then
5603 :
5604else
5605 OPT="-DNDEBUG $OPT"
5606fi
5607
5608if test "$ac_arch_flags"
5609then
5610 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5611fi
5612
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613# Check whether GCC supports PyArg_ParseTuple format
5614if test "$GCC" = "yes"
5615then
Matthias Kloseb9621712010-04-24 17:59:49 +00005616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5617$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618 save_CFLAGS=$CFLAGS
5619 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621/* end confdefs.h. */
5622
5623 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624int
5625main ()
5626{
5627
5628 ;
5629 return 0;
5630}
Matthias Kloseb159a552010-04-25 21:00:44 +00005631
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005633if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005634
Matthias Kloseb159a552010-04-25 21:00:44 +00005635
Matthias Kloseb9621712010-04-24 17:59:49 +00005636$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637
Matthias Kloseb159a552010-04-25 21:00:44 +00005638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005639$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005640
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641else
Matthias Kloseb159a552010-04-25 21:00:44 +00005642
5643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005644$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645
5646fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5648 CFLAGS=$save_CFLAGS
5649fi
5650
5651# On some compilers, pthreads are available without further options
5652# (e.g. MacOS X). On some of these systems, the compiler will not
5653# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5654# So we have to see first whether pthreads are available without
5655# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5657$as_echo_n "checking whether pthreads are available without options... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005658if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005659 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660else
Matthias Kloseb9621712010-04-24 17:59:49 +00005661 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662 ac_cv_pthread_is_default=no
5663else
Matthias Kloseb9621712010-04-24 17:59:49 +00005664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665/* end confdefs.h. */
5666
5667#include <pthread.h>
5668
5669void* routine(void* p){return NULL;}
5670
5671int main(){
5672 pthread_t p;
5673 if(pthread_create(&p,NULL,routine,NULL)!=0)
5674 return 1;
5675 (void)pthread_detach(p);
5676 return 0;
5677}
5678
5679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005680if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681
5682 ac_cv_pthread_is_default=yes
5683 ac_cv_kthread=no
5684 ac_cv_pthread=no
5685
5686else
Matthias Kloseb9621712010-04-24 17:59:49 +00005687 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5690 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691fi
5692
5693
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694fi
5695
Matthias Kloseb9621712010-04-24 17:59:49 +00005696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5697$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698
5699
5700if test $ac_cv_pthread_is_default = yes
5701then
5702 ac_cv_kpthread=no
5703else
5704# -Kpthread, if available, provides the right #defines
5705# and linker options to make pthread_create available
5706# Some compilers won't report that they do not support -Kpthread,
5707# so we need to run a program to see whether it really made the
5708# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5710$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005711if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005712 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713else
5714 ac_save_cc="$CC"
5715CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005716if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717 ac_cv_kpthread=no
5718else
Matthias Kloseb9621712010-04-24 17:59:49 +00005719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720/* end confdefs.h. */
5721
5722#include <pthread.h>
5723
5724void* routine(void* p){return NULL;}
5725
5726int main(){
5727 pthread_t p;
5728 if(pthread_create(&p,NULL,routine,NULL)!=0)
5729 return 1;
5730 (void)pthread_detach(p);
5731 return 0;
5732}
5733
5734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005735if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736 ac_cv_kpthread=yes
5737else
Matthias Kloseb9621712010-04-24 17:59:49 +00005738 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5741 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742fi
5743
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744CC="$ac_save_cc"
5745fi
5746
Matthias Kloseb9621712010-04-24 17:59:49 +00005747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5748$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749fi
5750
5751if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5752then
5753# -Kthread, if available, provides the right #defines
5754# and linker options to make pthread_create available
5755# Some compilers won't report that they do not support -Kthread,
5756# so we need to run a program to see whether it really made the
5757# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5759$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005760if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005761 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762else
5763 ac_save_cc="$CC"
5764CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005765if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766 ac_cv_kthread=no
5767else
Matthias Kloseb9621712010-04-24 17:59:49 +00005768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769/* end confdefs.h. */
5770
5771#include <pthread.h>
5772
5773void* routine(void* p){return NULL;}
5774
5775int main(){
5776 pthread_t p;
5777 if(pthread_create(&p,NULL,routine,NULL)!=0)
5778 return 1;
5779 (void)pthread_detach(p);
5780 return 0;
5781}
5782
5783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005784if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785 ac_cv_kthread=yes
5786else
Matthias Kloseb9621712010-04-24 17:59:49 +00005787 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5790 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791fi
5792
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793CC="$ac_save_cc"
5794fi
5795
Matthias Kloseb9621712010-04-24 17:59:49 +00005796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5797$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798fi
5799
5800if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5801then
5802# -pthread, if available, provides the right #defines
5803# and linker options to make pthread_create available
5804# Some compilers won't report that they do not support -pthread,
5805# so we need to run a program to see whether it really made the
5806# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5808$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005809if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005810 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811else
5812 ac_save_cc="$CC"
5813CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005814if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815 ac_cv_pthread=no
5816else
Matthias Kloseb9621712010-04-24 17:59:49 +00005817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818/* end confdefs.h. */
5819
5820#include <pthread.h>
5821
5822void* routine(void* p){return NULL;}
5823
5824int main(){
5825 pthread_t p;
5826 if(pthread_create(&p,NULL,routine,NULL)!=0)
5827 return 1;
5828 (void)pthread_detach(p);
5829 return 0;
5830}
5831
5832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005833if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834 ac_cv_pthread=yes
5835else
Matthias Kloseb9621712010-04-24 17:59:49 +00005836 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5839 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840fi
5841
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842CC="$ac_save_cc"
5843fi
5844
Matthias Kloseb9621712010-04-24 17:59:49 +00005845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5846$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847fi
5848
5849# If we have set a CC compiler flag for thread support then
5850# check if it works for CXX, too.
5851ac_cv_cxx_thread=no
5852if test ! -z "$CXX"
5853then
Matthias Kloseb9621712010-04-24 17:59:49 +00005854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5855$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856ac_save_cxx="$CXX"
5857
5858if test "$ac_cv_kpthread" = "yes"
5859then
5860 CXX="$CXX -Kpthread"
5861 ac_cv_cxx_thread=yes
5862elif test "$ac_cv_kthread" = "yes"
5863then
5864 CXX="$CXX -Kthread"
5865 ac_cv_cxx_thread=yes
5866elif test "$ac_cv_pthread" = "yes"
5867then
5868 CXX="$CXX -pthread"
5869 ac_cv_cxx_thread=yes
5870fi
5871
5872if test $ac_cv_cxx_thread = yes
5873then
5874 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5875 $CXX -c conftest.$ac_ext 2>&5
5876 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5877 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5878 then
5879 ac_cv_cxx_thread=yes
5880 else
5881 ac_cv_cxx_thread=no
5882 fi
5883 rm -fr conftest*
5884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5886$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887fi
5888CXX="$ac_save_cxx"
5889
5890
5891# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5893$as_echo_n "checking for ANSI C header files... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005894if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005895 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896else
Matthias Kloseb9621712010-04-24 17:59:49 +00005897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898/* end confdefs.h. */
5899#include <stdlib.h>
5900#include <stdarg.h>
5901#include <string.h>
5902#include <float.h>
5903
5904int
5905main ()
5906{
5907
5908 ;
5909 return 0;
5910}
5911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005912if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 ac_cv_header_stdc=yes
5914else
Matthias Kloseb9621712010-04-24 17:59:49 +00005915 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5918
5919if test $ac_cv_header_stdc = yes; then
5920 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922/* end confdefs.h. */
5923#include <string.h>
5924
5925_ACEOF
5926if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005927 $EGREP "memchr" >/dev/null 2>&1; then :
5928
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929else
5930 ac_cv_header_stdc=no
5931fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005932rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933
5934fi
5935
5936if test $ac_cv_header_stdc = yes; then
5937 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939/* end confdefs.h. */
5940#include <stdlib.h>
5941
5942_ACEOF
5943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005944 $EGREP "free" >/dev/null 2>&1; then :
5945
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946else
5947 ac_cv_header_stdc=no
5948fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005949rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950
5951fi
5952
5953if test $ac_cv_header_stdc = yes; then
5954 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005955 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 :
5957else
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959/* end confdefs.h. */
5960#include <ctype.h>
5961#include <stdlib.h>
5962#if ((' ' & 0x0FF) == 0x020)
5963# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5964# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5965#else
5966# define ISLOWER(c) \
5967 (('a' <= (c) && (c) <= 'i') \
5968 || ('j' <= (c) && (c) <= 'r') \
5969 || ('s' <= (c) && (c) <= 'z'))
5970# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5971#endif
5972
5973#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5974int
5975main ()
5976{
5977 int i;
5978 for (i = 0; i < 256; i++)
5979 if (XOR (islower (i), ISLOWER (i))
5980 || toupper (i) != TOUPPER (i))
5981 return 2;
5982 return 0;
5983}
5984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005985if ac_fn_c_try_run "$LINENO"; then :
5986
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987else
Matthias Kloseb9621712010-04-24 17:59:49 +00005988 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005990rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5991 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992fi
5993
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994fi
5995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5997$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998if test $ac_cv_header_stdc = yes; then
5999
Matthias Kloseb9621712010-04-24 17:59:49 +00006000$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001
6002fi
6003
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006004for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6005fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006006ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006007shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006008unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006009sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6010sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006011sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006012sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006013sys/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 +00006014sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006015bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006016do :
6017 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6018ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006019if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006020 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006021#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006022_ACEOF
6023
6024fi
6025
Guido van Rossum627b2d71993-12-24 10:39:16 +00006026done
6027
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006028ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006029for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006030 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6032$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006033if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006034 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006035else
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006037/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006038#include <sys/types.h>
6039#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006040
Martin v. Löwis11437992002-04-12 09:54:03 +00006041int
6042main ()
6043{
6044if ((DIR *) 0)
6045return 0;
6046 ;
6047 return 0;
6048}
6049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006050if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006051 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006052else
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006057eval ac_res=\$$as_ac_Header
6058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6059$as_echo "$ac_res" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006060if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006061 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006062#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006063_ACEOF
6064
6065ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006066fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006067
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006068done
6069# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6070if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6072$as_echo_n "checking for library containing opendir... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006073if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006074 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006075else
Martin v. Löwis11437992002-04-12 09:54:03 +00006076 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006079
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006080/* Override any GCC internal prototype to avoid an error.
6081 Use char because int might match the return type of a GCC
6082 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006083#ifdef __cplusplus
6084extern "C"
6085#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006086char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006087int
6088main ()
6089{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006090return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006091 ;
6092 return 0;
6093}
6094_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006095for ac_lib in '' dir; do
6096 if test -z "$ac_lib"; then
6097 ac_res="none required"
6098 else
6099 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006100 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006101 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006102 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006103 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006105rm -f core conftest.err conftest.$ac_objext \
6106 conftest$ac_exeext
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006107 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006108 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006110done
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006111if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006112
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006113else
6114 ac_cv_search_opendir=no
6115fi
6116rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006117LIBS=$ac_func_search_save_LIBS
6118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6120$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006121ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006122if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006123 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006124
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006125fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006126
Michael W. Hudson54241132001-12-07 15:38:26 +00006127else
Matthias Kloseb9621712010-04-24 17:59:49 +00006128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6129$as_echo_n "checking for library containing opendir... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006130if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006131 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006132else
6133 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006135/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006137/* Override any GCC internal prototype to avoid an error.
6138 Use char because int might match the return type of a GCC
6139 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006140#ifdef __cplusplus
6141extern "C"
6142#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006143char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006144int
6145main ()
6146{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006147return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006148 ;
6149 return 0;
6150}
6151_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006152for ac_lib in '' x; do
6153 if test -z "$ac_lib"; then
6154 ac_res="none required"
6155 else
6156 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006157 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006158 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006159 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006160 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006161fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006162rm -f core conftest.err conftest.$ac_objext \
6163 conftest$ac_exeext
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006164 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006165 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006167done
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006168if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006169
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006170else
6171 ac_cv_search_opendir=no
6172fi
6173rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006174LIBS=$ac_func_search_save_LIBS
6175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6177$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006178ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006179if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006180 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006181
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006182fi
6183
6184fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006185
Matthias Kloseb9621712010-04-24 17:59:49 +00006186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6187$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006188if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006189 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006190else
Matthias Kloseb9621712010-04-24 17:59:49 +00006191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006192/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006193#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194int
6195main ()
6196{
6197return makedev(0, 0);
6198 ;
6199 return 0;
6200}
6201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006202if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006203 ac_cv_header_sys_types_h_makedev=yes
6204else
Matthias Kloseb9621712010-04-24 17:59:49 +00006205 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006207rm -f core conftest.err conftest.$ac_objext \
6208 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006209
6210fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6212$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213
6214if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006215ac_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 +00006216if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006217
Matthias Kloseb9621712010-04-24 17:59:49 +00006218$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006219
6220fi
6221
6222
6223
6224 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006225 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 +00006226if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006227
Matthias Kloseb9621712010-04-24 17:59:49 +00006228$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006229
6230fi
6231
6232
6233 fi
6234fi
6235
Michael W. Hudson54241132001-12-07 15:38:26 +00006236
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006237# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006238for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006239do :
6240 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006241#ifdef HAVE_CURSES_H
6242#include <curses.h>
6243#endif
6244
Matthias Kloseb9621712010-04-24 17:59:49 +00006245"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006246if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006247 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006248#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006249_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006250
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006251fi
6252
6253done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006254
6255
Martin v. Löwis11017b12006-01-14 18:12:57 +00006256# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006257for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006258do :
6259 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 +00006260#ifdef HAVE_ASM_TYPES_H
6261#include <asm/types.h>
6262#endif
6263#ifdef HAVE_SYS_SOCKET_H
6264#include <sys/socket.h>
6265#endif
6266
Matthias Kloseb9621712010-04-24 17:59:49 +00006267"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006268if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006269 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006270#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006271_ACEOF
6272
6273fi
6274
6275done
6276
6277
Guido van Rossum627b2d71993-12-24 10:39:16 +00006278# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006279was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6281$as_echo_n "checking for clock_t in time.h... " >&6; }
6282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006283/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006284#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006285
6286_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006287if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006288 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006289 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006290else
Martin v. Löwis11437992002-04-12 09:54:03 +00006291
6292
Matthias Kloseb9621712010-04-24 17:59:49 +00006293$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006294
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006295
Guido van Rossum627b2d71993-12-24 10:39:16 +00006296fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006297rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006298
Matthias Kloseb9621712010-04-24 17:59:49 +00006299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6300$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006301
Neal Norwitz11690112002-07-30 01:08:28 +00006302# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6304$as_echo_n "checking for makedev... " >&6; }
6305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006306/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006307
Jesus Cea740f53a2010-04-28 11:35:30 +00006308#if defined(MAJOR_IN_MKDEV)
6309#include <sys/mkdev.h>
6310#elif defined(MAJOR_IN_SYSMACROS)
6311#include <sys/sysmacros.h>
6312#else
6313#include <sys/types.h>
6314#endif
6315
Neal Norwitz11690112002-07-30 01:08:28 +00006316int
6317main ()
6318{
Jesus Cea740f53a2010-04-28 11:35:30 +00006319
6320 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006321 ;
6322 return 0;
6323}
Matthias Kloseb159a552010-04-25 21:00:44 +00006324
Neal Norwitz11690112002-07-30 01:08:28 +00006325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006326if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006327 ac_cv_has_makedev=yes
6328else
Matthias Kloseb9621712010-04-24 17:59:49 +00006329 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006331rm -f core conftest.err conftest.$ac_objext \
6332 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006333if test "$ac_cv_has_makedev" = "no"; then
6334 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006336/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006337
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006338#define _OSF_SOURCE 1
6339#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006340
Neal Norwitz11690112002-07-30 01:08:28 +00006341int
6342main ()
6343{
6344 makedev(0, 0)
6345 ;
6346 return 0;
6347}
6348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006349if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006350 ac_cv_has_makedev=yes
6351else
Matthias Kloseb9621712010-04-24 17:59:49 +00006352 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006353fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006354rm -f core conftest.err conftest.$ac_objext \
6355 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006356 if test "$ac_cv_has_makedev" = "yes"; then
6357
Matthias Kloseb9621712010-04-24 17:59:49 +00006358$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006359
6360 fi
6361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6363$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006364if test "$ac_cv_has_makedev" = "yes"; then
6365
Matthias Kloseb9621712010-04-24 17:59:49 +00006366$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006367
6368fi
6369
Martin v. Löwis399a6892002-10-04 10:22:02 +00006370# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6371# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6372# defined, but the compiler does not support pragma redefine_extname,
6373# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6374# structures (such as rlimit64) without declaring them. As a
6375# work-around, disable LFS on such configurations
6376
6377use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6379$as_echo_n "checking Solaris LFS bug... " >&6; }
6380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006381/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006382
6383#define _LARGEFILE_SOURCE 1
6384#define _FILE_OFFSET_BITS 64
6385#include <sys/resource.h>
6386
Martin v. Löwis399a6892002-10-04 10:22:02 +00006387int
6388main ()
6389{
6390struct rlimit foo;
6391 ;
6392 return 0;
6393}
6394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006395if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006396 sol_lfs_bug=no
6397else
Matthias Kloseb9621712010-04-24 17:59:49 +00006398 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6402$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006403if test "$sol_lfs_bug" = "yes"; then
6404 use_lfs=no
6405fi
6406
6407if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006408# Two defines needed to enable largefile support on various platforms
6409# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006410
Matthias Kloseb9621712010-04-24 17:59:49 +00006411$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006412
6413
Matthias Kloseb9621712010-04-24 17:59:49 +00006414$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006415
Martin v. Löwis399a6892002-10-04 10:22:02 +00006416fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006417
Guido van Rossum84e7b241996-08-19 21:59:00 +00006418# Add some code to confdefs.h so that the test for off_t works on SCO
6419cat >> confdefs.h <<\EOF
6420#if defined(SCO_DS)
6421#undef _OFF_T
6422#endif
6423EOF
6424
Guido van Rossumef2255b2000-03-10 22:30:29 +00006425# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006426ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006427if test "x$ac_cv_type_mode_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
6432#define mode_t int
6433_ACEOF
6434
6435fi
6436
Matthias Kloseb9621712010-04-24 17:59:49 +00006437ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006438if test "x$ac_cv_type_off_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
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006443#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006444_ACEOF
6445
6446fi
6447
Matthias Kloseb9621712010-04-24 17:59:49 +00006448ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006449if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006450
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006451else
Martin v. Löwis11437992002-04-12 09:54:03 +00006452
6453cat >>confdefs.h <<_ACEOF
6454#define pid_t int
6455_ACEOF
6456
6457fi
6458
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006459
Martin v. Löwis11437992002-04-12 09:54:03 +00006460cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006461#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006462_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006463
Matthias Kloseb9621712010-04-24 17:59:49 +00006464ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006465if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006466
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006467else
Martin v. Löwis11437992002-04-12 09:54:03 +00006468
6469cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006470#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006471_ACEOF
6472
6473fi
6474
Matthias Kloseb9621712010-04-24 17:59:49 +00006475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6476$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006477if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006478 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006479else
Matthias Kloseb9621712010-04-24 17:59:49 +00006480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006481/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006482#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006483
6484_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006486 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006487 ac_cv_type_uid_t=yes
6488else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006489 ac_cv_type_uid_t=no
6490fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006491rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006492
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6495$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006496if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006497
Matthias Kloseb9621712010-04-24 17:59:49 +00006498$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006499
6500
Matthias Kloseb9621712010-04-24 17:59:49 +00006501$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006502
6503fi
6504
Matthias Kloseb9621712010-04-24 17:59:49 +00006505ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6506case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006507 no|yes) ;; #(
6508 *)
6509
Matthias Kloseb9621712010-04-24 17:59:49 +00006510$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006511
6512
6513cat >>confdefs.h <<_ACEOF
6514#define uint32_t $ac_cv_c_uint32_t
6515_ACEOF
6516;;
6517 esac
6518
Matthias Kloseb9621712010-04-24 17:59:49 +00006519ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6520case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006521 no|yes) ;; #(
6522 *)
6523
Matthias Kloseb9621712010-04-24 17:59:49 +00006524$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006525
6526
6527cat >>confdefs.h <<_ACEOF
6528#define uint64_t $ac_cv_c_uint64_t
6529_ACEOF
6530;;
6531 esac
6532
Matthias Kloseb9621712010-04-24 17:59:49 +00006533ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6534case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006535 no|yes) ;; #(
6536 *)
6537
6538cat >>confdefs.h <<_ACEOF
6539#define int32_t $ac_cv_c_int32_t
6540_ACEOF
6541;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006542esac
6543
Matthias Kloseb9621712010-04-24 17:59:49 +00006544ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6545case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006546 no|yes) ;; #(
6547 *)
6548
6549cat >>confdefs.h <<_ACEOF
6550#define int64_t $ac_cv_c_int64_t
6551_ACEOF
6552;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006553esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006554
Matthias Kloseb9621712010-04-24 17:59:49 +00006555ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006556if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006557
Matthias Kloseb9621712010-04-24 17:59:49 +00006558$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006559
6560fi
6561
Jack Jansendd19cf82001-12-06 22:36:17 +00006562
Michael W. Hudson54241132001-12-07 15:38:26 +00006563# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006564# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006565# The cast to long int works around a bug in the HP C Compiler
6566# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6567# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6568# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6570$as_echo_n "checking size of int... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006571if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006572 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006573else
Matthias Kloseb9621712010-04-24 17:59:49 +00006574 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 +00006575
Martin v. Löwis11437992002-04-12 09:54:03 +00006576else
Matthias Kloseb9621712010-04-24 17:59:49 +00006577 if test "$ac_cv_type_int" = yes; then
6578 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6579$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006580as_fn_error 77 "cannot compute sizeof (int)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006581See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006582 else
6583 ac_cv_sizeof_int=0
6584 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006586
Martin v. Löwis11437992002-04-12 09:54:03 +00006587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6589$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006590
6591
6592
Martin v. Löwis11437992002-04-12 09:54:03 +00006593cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006594#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006595_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006596
6597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006598# The cast to long int works around a bug in the HP C Compiler
6599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6601# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6603$as_echo_n "checking size of long... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006604if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006605 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006606else
Matthias Kloseb9621712010-04-24 17:59:49 +00006607 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 +00006608
Martin v. Löwis11437992002-04-12 09:54:03 +00006609else
Matthias Kloseb9621712010-04-24 17:59:49 +00006610 if test "$ac_cv_type_long" = yes; then
6611 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6612$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006613as_fn_error 77 "cannot compute sizeof (long)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006614See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006615 else
6616 ac_cv_sizeof_long=0
6617 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006619
Martin v. Löwis11437992002-04-12 09:54:03 +00006620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6622$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006623
6624
6625
Martin v. Löwis11437992002-04-12 09:54:03 +00006626cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006627#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006628_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006629
6630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006631# The cast to long int works around a bug in the HP C Compiler
6632# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6633# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6634# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6636$as_echo_n "checking size of void *... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006637if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006638 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006639else
Matthias Kloseb9621712010-04-24 17:59:49 +00006640 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 +00006641
Martin v. Löwis11437992002-04-12 09:54:03 +00006642else
Matthias Kloseb9621712010-04-24 17:59:49 +00006643 if test "$ac_cv_type_void_p" = yes; then
6644 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006646as_fn_error 77 "cannot compute sizeof (void *)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006647See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006648 else
6649 ac_cv_sizeof_void_p=0
6650 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006652
Martin v. Löwis11437992002-04-12 09:54:03 +00006653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6655$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006656
6657
6658
Martin v. Löwis11437992002-04-12 09:54:03 +00006659cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006660#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006661_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006662
6663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006664# The cast to long int works around a bug in the HP C Compiler
6665# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6666# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6667# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6669$as_echo_n "checking size of short... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006670if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006671 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006672else
Matthias Kloseb9621712010-04-24 17:59:49 +00006673 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 +00006674
Martin v. Löwis11437992002-04-12 09:54:03 +00006675else
Matthias Kloseb9621712010-04-24 17:59:49 +00006676 if test "$ac_cv_type_short" = yes; then
6677 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6678$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006679as_fn_error 77 "cannot compute sizeof (short)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006680See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006681 else
6682 ac_cv_sizeof_short=0
6683 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006685
Martin v. Löwis11437992002-04-12 09:54:03 +00006686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6688$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006689
6690
6691
Martin v. Löwis11437992002-04-12 09:54:03 +00006692cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006693#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006694_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006695
6696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006697# The cast to long int works around a bug in the HP C Compiler
6698# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6699# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6700# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6702$as_echo_n "checking size of float... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006703if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006704 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006705else
Matthias Kloseb9621712010-04-24 17:59:49 +00006706 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006707
Martin v. Löwis11437992002-04-12 09:54:03 +00006708else
Matthias Kloseb9621712010-04-24 17:59:49 +00006709 if test "$ac_cv_type_float" = yes; then
6710 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6711$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006712as_fn_error 77 "cannot compute sizeof (float)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006713See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006714 else
6715 ac_cv_sizeof_float=0
6716 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006718
Martin v. Löwis11437992002-04-12 09:54:03 +00006719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6721$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006722
6723
6724
Martin v. Löwis11437992002-04-12 09:54:03 +00006725cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006726#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006727_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006728
6729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006730# The cast to long int works around a bug in the HP C Compiler
6731# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6732# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6733# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6735$as_echo_n "checking size of double... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006736if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006737 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006738else
Matthias Kloseb9621712010-04-24 17:59:49 +00006739 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 +00006740
Martin v. Löwis11437992002-04-12 09:54:03 +00006741else
Matthias Kloseb9621712010-04-24 17:59:49 +00006742 if test "$ac_cv_type_double" = yes; then
6743 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006745as_fn_error 77 "cannot compute sizeof (double)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006746See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006747 else
6748 ac_cv_sizeof_double=0
6749 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006751
Martin v. Löwis11437992002-04-12 09:54:03 +00006752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6754$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006755
6756
6757
Martin v. Löwis11437992002-04-12 09:54:03 +00006758cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006759#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006760_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006761
6762
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006763# The cast to long int works around a bug in the HP C Compiler
6764# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6765# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6766# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6768$as_echo_n "checking size of fpos_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006769if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006770 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006771else
Matthias Kloseb9621712010-04-24 17:59:49 +00006772 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 +00006773
Martin v. Löwis11437992002-04-12 09:54:03 +00006774else
Matthias Kloseb9621712010-04-24 17:59:49 +00006775 if test "$ac_cv_type_fpos_t" = yes; then
6776 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6777$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006778as_fn_error 77 "cannot compute sizeof (fpos_t)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006779See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006780 else
6781 ac_cv_sizeof_fpos_t=0
6782 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006784
Martin v. Löwis11437992002-04-12 09:54:03 +00006785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6787$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006788
6789
6790
Martin v. Löwis11437992002-04-12 09:54:03 +00006791cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006792#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006793_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006794
Michael W. Hudson54241132001-12-07 15:38:26 +00006795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006796# The cast to long int works around a bug in the HP C Compiler
6797# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6798# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6799# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6801$as_echo_n "checking size of size_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006802if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006803 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006804else
Matthias Kloseb9621712010-04-24 17:59:49 +00006805 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00006806
Martin v. Löwis18e16552006-02-15 17:27:45 +00006807else
Matthias Kloseb9621712010-04-24 17:59:49 +00006808 if test "$ac_cv_type_size_t" = yes; then
6809 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6810$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006811as_fn_error 77 "cannot compute sizeof (size_t)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006812See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006813 else
6814 ac_cv_sizeof_size_t=0
6815 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006817
Martin v. Löwis18e16552006-02-15 17:27:45 +00006818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6820$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006821
6822
6823
Martin v. Löwis18e16552006-02-15 17:27:45 +00006824cat >>confdefs.h <<_ACEOF
6825#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6826_ACEOF
6827
6828
Christian Heimes400adb02008-02-01 08:12:03 +00006829# The cast to long int works around a bug in the HP C Compiler
6830# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6831# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6832# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6834$as_echo_n "checking size of pid_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006835if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006837else
Matthias Kloseb9621712010-04-24 17:59:49 +00006838 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 +00006839
Christian Heimes400adb02008-02-01 08:12:03 +00006840else
Matthias Kloseb9621712010-04-24 17:59:49 +00006841 if test "$ac_cv_type_pid_t" = yes; then
6842 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6843$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006844as_fn_error 77 "cannot compute sizeof (pid_t)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006845See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes400adb02008-02-01 08:12:03 +00006846 else
6847 ac_cv_sizeof_pid_t=0
6848 fi
6849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006850
Christian Heimes400adb02008-02-01 08:12:03 +00006851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6853$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006854
6855
6856
6857cat >>confdefs.h <<_ACEOF
6858#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6859_ACEOF
6860
6861
Michael W. Hudson54241132001-12-07 15:38:26 +00006862
Matthias Kloseb9621712010-04-24 17:59:49 +00006863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6864$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006865have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006867/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006868
Martin v. Löwis11437992002-04-12 09:54:03 +00006869int
6870main ()
6871{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006872long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006873 ;
6874 return 0;
6875}
6876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006877if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006878
6879
Matthias Kloseb9621712010-04-24 17:59:49 +00006880$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006881
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006882 have_long_long=yes
6883
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6887$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006888if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006889# The cast to long int works around a bug in the HP C Compiler
6890# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6891# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6892# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6894$as_echo_n "checking size of long long... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006895if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006896 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006897else
Matthias Kloseb9621712010-04-24 17:59:49 +00006898 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 +00006899
Martin v. Löwis11437992002-04-12 09:54:03 +00006900else
Matthias Kloseb9621712010-04-24 17:59:49 +00006901 if test "$ac_cv_type_long_long" = yes; then
6902 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006904as_fn_error 77 "cannot compute sizeof (long long)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006905See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006906 else
6907 ac_cv_sizeof_long_long=0
6908 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006910
Martin v. Löwis11437992002-04-12 09:54:03 +00006911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6913$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006914
6915
6916
Martin v. Löwis11437992002-04-12 09:54:03 +00006917cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006918#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006919_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006920
Michael W. Hudson54241132001-12-07 15:38:26 +00006921
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006922fi
6923
Matthias Kloseb9621712010-04-24 17:59:49 +00006924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6925$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006926have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006928/* end confdefs.h. */
6929
6930int
6931main ()
6932{
6933long double x; x = (long double)0;
6934 ;
6935 return 0;
6936}
6937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006938if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006939
6940
Matthias Kloseb9621712010-04-24 17:59:49 +00006941$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006942
6943 have_long_double=yes
6944
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006945fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6948$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006949if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006950# The cast to long int works around a bug in the HP C Compiler
6951# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6952# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6953# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6955$as_echo_n "checking size of long double... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006956if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006957 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006958else
Matthias Kloseb9621712010-04-24 17:59:49 +00006959 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 +00006960
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006961else
Matthias Kloseb9621712010-04-24 17:59:49 +00006962 if test "$ac_cv_type_long_double" = yes; then
6963 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006965as_fn_error 77 "cannot compute sizeof (long double)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006966See \`config.log' for more details" "$LINENO" 5 ; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006967 else
6968 ac_cv_sizeof_long_double=0
6969 fi
6970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006971
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6974$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006975
6976
6977
6978cat >>confdefs.h <<_ACEOF
6979#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6980_ACEOF
6981
6982
6983fi
6984
6985
Matthias Kloseb9621712010-04-24 17:59:49 +00006986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6987$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006988have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006990/* end confdefs.h. */
6991
6992int
6993main ()
6994{
6995_Bool x; x = (_Bool)0;
6996 ;
6997 return 0;
6998}
6999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007000if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007001
7002
Matthias Kloseb9621712010-04-24 17:59:49 +00007003$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007004
7005 have_c99_bool=yes
7006
Thomas Woutersb2137042007-02-01 18:02:27 +00007007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7010$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007011if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007012# The cast to long int works around a bug in the HP C Compiler
7013# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7014# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7015# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7017$as_echo_n "checking size of _Bool... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007018if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007019 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007020else
Matthias Kloseb9621712010-04-24 17:59:49 +00007021 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 +00007022
Thomas Woutersb2137042007-02-01 18:02:27 +00007023else
Matthias Kloseb9621712010-04-24 17:59:49 +00007024 if test "$ac_cv_type__Bool" = yes; then
7025 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7026$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007027as_fn_error 77 "cannot compute sizeof (_Bool)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007028See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007029 else
7030 ac_cv_sizeof__Bool=0
7031 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007033
Thomas Woutersb2137042007-02-01 18:02:27 +00007034fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7036$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007037
7038
7039
Thomas Woutersb2137042007-02-01 18:02:27 +00007040cat >>confdefs.h <<_ACEOF
7041#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7042_ACEOF
7043
7044
7045fi
7046
Matthias Kloseb9621712010-04-24 17:59:49 +00007047ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007048 #include <stdint.h>
7049 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007050 #ifdef HAVE_INTTYPES_H
7051 #include <inttypes.h>
7052 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007053"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007054if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007055
7056cat >>confdefs.h <<_ACEOF
7057#define HAVE_UINTPTR_T 1
7058_ACEOF
7059
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007060# The cast to long int works around a bug in the HP C Compiler
7061# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7062# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7063# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7065$as_echo_n "checking size of uintptr_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007066if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007067 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007068else
Matthias Kloseb9621712010-04-24 17:59:49 +00007069 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 +00007070
Martin v. Löwis11437992002-04-12 09:54:03 +00007071else
Matthias Kloseb9621712010-04-24 17:59:49 +00007072 if test "$ac_cv_type_uintptr_t" = yes; then
7073 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7074$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007075as_fn_error 77 "cannot compute sizeof (uintptr_t)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007076See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077 else
7078 ac_cv_sizeof_uintptr_t=0
7079 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007080fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007081
Martin v. Löwis11437992002-04-12 09:54:03 +00007082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7084$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007085
7086
7087
Martin v. Löwis11437992002-04-12 09:54:03 +00007088cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007089#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007090_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007091
Michael W. Hudson54241132001-12-07 15:38:26 +00007092
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007093fi
7094
Thomas Wouters89f507f2006-12-13 04:49:30 +00007095
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007096# The cast to long int works around a bug in the HP C Compiler
7097# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7098# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7099# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7101$as_echo_n "checking size of off_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007102if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007103 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007104else
Matthias Kloseb9621712010-04-24 17:59:49 +00007105 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007106#ifdef HAVE_SYS_TYPES_H
7107#include <sys/types.h>
7108#endif
7109
Matthias Kloseb9621712010-04-24 17:59:49 +00007110"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007111
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007112else
Matthias Kloseb9621712010-04-24 17:59:49 +00007113 if test "$ac_cv_type_off_t" = yes; then
7114 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007116as_fn_error 77 "cannot compute sizeof (off_t)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007117See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007118 else
7119 ac_cv_sizeof_off_t=0
7120 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007121fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007122
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7125$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007126
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007127
7128
Martin v. Löwis11437992002-04-12 09:54:03 +00007129cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007130#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007131_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007132
Michael W. Hudson54241132001-12-07 15:38:26 +00007133
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007134
Matthias Kloseb9621712010-04-24 17:59:49 +00007135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7136$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007137if test "$have_long_long" = yes
7138then
7139if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007140 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007141
Matthias Kloseb9621712010-04-24 17:59:49 +00007142$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007143
Matthias Kloseb9621712010-04-24 17:59:49 +00007144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7145$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007146else
Matthias Kloseb9621712010-04-24 17:59:49 +00007147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7148$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007149fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007150else
Matthias Kloseb9621712010-04-24 17:59:49 +00007151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7152$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007153fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007154
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007155# The cast to long int works around a bug in the HP C Compiler
7156# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7157# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7158# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7160$as_echo_n "checking size of time_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007161if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007162 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007163else
Matthias Kloseb9621712010-04-24 17:59:49 +00007164 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007165#ifdef HAVE_SYS_TYPES_H
7166#include <sys/types.h>
7167#endif
7168#ifdef HAVE_TIME_H
7169#include <time.h>
7170#endif
7171
Matthias Kloseb9621712010-04-24 17:59:49 +00007172"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007173
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007174else
Matthias Kloseb9621712010-04-24 17:59:49 +00007175 if test "$ac_cv_type_time_t" = yes; then
7176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007178as_fn_error 77 "cannot compute sizeof (time_t)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007179See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007180 else
7181 ac_cv_sizeof_time_t=0
7182 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007184
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7187$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007188
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007189
7190
Martin v. Löwis11437992002-04-12 09:54:03 +00007191cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007192#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007193_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007194
Michael W. Hudson54241132001-12-07 15:38:26 +00007195
7196
Trent Mick635f6fb2000-08-23 21:33:05 +00007197# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007198ac_save_cc="$CC"
7199if test "$ac_cv_kpthread" = "yes"
7200then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007201elif test "$ac_cv_kthread" = "yes"
7202then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007203elif test "$ac_cv_pthread" = "yes"
7204then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007205fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007206
Matthias Kloseb9621712010-04-24 17:59:49 +00007207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7208$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007209have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007211/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007212
7213 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007214int
7215main ()
7216{
Guido van Rossum12580492000-09-24 16:47:19 +00007217pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007218 ;
7219 return 0;
7220}
Matthias Kloseb159a552010-04-25 21:00:44 +00007221
Martin v. Löwis11437992002-04-12 09:54:03 +00007222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007223if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007224 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7228$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007229if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007230 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007231# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7232# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7233# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7235$as_echo_n "checking size of pthread_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007236if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007237 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007238else
Matthias Kloseb9621712010-04-24 17:59:49 +00007239 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007240#ifdef HAVE_PTHREAD_H
7241#include <pthread.h>
7242#endif
7243
Matthias Kloseb9621712010-04-24 17:59:49 +00007244"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007245
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007246else
Matthias Kloseb9621712010-04-24 17:59:49 +00007247 if test "$ac_cv_type_pthread_t" = yes; then
7248 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7249$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007250as_fn_error 77 "cannot compute sizeof (pthread_t)
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007251See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007252 else
7253 ac_cv_sizeof_pthread_t=0
7254 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007256
Trent Mick635f6fb2000-08-23 21:33:05 +00007257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7259$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007260
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007261
7262
Martin v. Löwis11437992002-04-12 09:54:03 +00007263cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007264#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007265_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007266
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007267
Trent Mick635f6fb2000-08-23 21:33:05 +00007268fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007269CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007270
Michael W. Hudson54241132001-12-07 15:38:26 +00007271
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007272case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007273 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007274 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7275 ;;
7276 Darwin/*)
7277 OTHER_LIBTOOL_OPT=""
7278 ;;
7279esac
7280
7281
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007282ARCH_RUN_32BIT=""
7283
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007284case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007285 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007286 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7287 if test "${enable_universalsdk}"; then
7288 :
7289 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007290 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007291 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007292 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007293 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007294 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007295 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007296 if test ${gcc_version} '<' 4.0
7297 then
7298 LIBTOOL_CRUFT="-lcc_dynamic"
7299 else
7300 LIBTOOL_CRUFT=""
7301 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007302 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007303 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007304else
Matthias Kloseb9621712010-04-24 17:59:49 +00007305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007306/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007307
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007308 #include <unistd.h>
7309 int main(int argc, char*argv[])
7310 {
7311 if (sizeof(long) == 4) {
7312 return 0;
7313 } else {
7314 return 1;
7315 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007316 }
7317
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007319if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007320 ac_osx_32bit=yes
7321else
Matthias Kloseb9621712010-04-24 17:59:49 +00007322 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007323fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007324rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7325 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007326fi
7327
7328
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007329 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007330 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007331 i386)
7332 MACOSX_DEFAULT_ARCH="i386"
7333 ;;
7334 ppc)
7335 MACOSX_DEFAULT_ARCH="ppc"
7336 ;;
7337 *)
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007338 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007339 ;;
7340 esac
7341 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007342 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007343 i386)
7344 MACOSX_DEFAULT_ARCH="x86_64"
7345 ;;
7346 ppc)
7347 MACOSX_DEFAULT_ARCH="ppc64"
7348 ;;
7349 *)
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007350 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007351 ;;
7352 esac
7353
7354 #ARCH_RUN_32BIT="true"
7355 fi
7356
7357 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007358 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007359 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007360esac
7361
Matthias Kloseb9621712010-04-24 17:59:49 +00007362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7363$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007364if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007365then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007366 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007367 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007368 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007371
Matthias Kloseb9621712010-04-24 17:59:49 +00007372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7373$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007374 if test $enable_shared = "yes"
7375 then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007376 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 +00007377 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007378else
Matthias Kloseb9621712010-04-24 17:59:49 +00007379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7380$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007381fi
7382
Matthias Kloseb9621712010-04-24 17:59:49 +00007383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7384$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007385case $ac_sys_system/$ac_sys_release in
7386 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007387
Matthias Kloseb9621712010-04-24 17:59:49 +00007388$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007389
Matthias Kloseb9621712010-04-24 17:59:49 +00007390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7391$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007392 ;;
7393 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7395$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007396 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007397esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007398
Guido van Rossum0a516c91994-09-12 10:58:40 +00007399# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007400
Michael W. Hudson54241132001-12-07 15:38:26 +00007401
7402
7403
7404
Benjamin Peterson99f03762010-04-11 22:15:28 +00007405
Thomas Wouters477c8d52006-05-27 19:21:47 +00007406
Georg Brandlb1441c72009-01-03 22:33:39 +00007407
Thomas Wouters477c8d52006-05-27 19:21:47 +00007408cat >>confdefs.h <<_ACEOF
7409#define SHLIB_EXT "$SO"
7410_ACEOF
7411
Guido van Rossum0a516c91994-09-12 10:58:40 +00007412# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007413# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007414# (Shared libraries in this instance are shared modules to be loaded into
7415# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7417$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007418if test -z "$LDSHARED"
7419then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007420 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007421 AIX*)
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00007422 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp -L\$(srcdir)"
Guido van Rossumce608b02001-09-28 15:59:38 +00007423 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007424 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007425 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007426 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007427 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007428 if test "$GCC" = "yes" ; then
7429 LDSHARED='$(CC) -shared'
7430 LDCXXSHARED='$(CXX) -shared'
7431 else
7432 LDSHARED='$(CC) -G'
7433 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007434 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007435 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007436 if test "$GCC" = "yes" ; then
7437 LDSHARED='$(CC) -shared'
7438 LDCXXSHARED='$(CXX) -shared'
7439 else
7440 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007441 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007442 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007443 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007444 LDSHARED='$(CC) -bundle'
7445 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007446 if test "$enable_framework" ; then
7447 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007448 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7449 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007450 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007451 else
7452 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007453 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007454 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007455 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007456 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007457 LDSHARED='$(CC) -bundle'
7458 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007459 if test "$enable_framework" ; then
7460 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007461 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7462 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007463 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007464 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007465 # No framework, use the Python app as bundle-loader
7466 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007467 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007468 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007469 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007470 Darwin/*)
7471 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7472 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007473
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007474 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007475 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007476 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007477 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007478 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007479 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7480 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007481 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007482 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007483 LDSHARED='$(CC) -bundle'
7484 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007485 if test "$enable_framework" ; then
7486 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007487 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7488 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007489 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007490 else
7491 # No framework, use the Python app as bundle-loader
7492 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7493 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007494 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007495 fi
7496 fi
7497 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007498 Linux*|GNU*|QNX*)
7499 LDSHARED='$(CC) -shared'
7500 LDCXXSHARED='$(CXX) -shared';;
7501 BSD/OS*/4*)
7502 LDSHARED="gcc -shared"
7503 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007504 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007505 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007506 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007507 LDSHARED='$(CC) -shared'
7508 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007509 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007510 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007511 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007512 OpenBSD*)
7513 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7514 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007515 LDSHARED='$(CC) -shared $(CCSHARED)'
7516 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007517 else
7518 case `uname -r` in
7519 [01].* | 2.[0-7] | 2.[0-7].*)
7520 LDSHARED="ld -Bshareable ${LDFLAGS}"
7521 ;;
7522 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007523 LDSHARED='$(CC) -shared $(CCSHARED)'
7524 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007525 ;;
7526 esac
7527 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007528 NetBSD*|DragonFly*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007529 LDSHARED="cc -shared"
7530 LDCXXSHARED="c++ -shared";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007531 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007532 if test "$GCC" = "yes" ; then
7533 LDSHARED='$(CC) -shared'
7534 LDCXXSHARED='$(CXX) -shared'
7535 else
7536 LDSHARED='$(CC) -G'
7537 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007538 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007539 SCO_SV*)
7540 LDSHARED='$(CC) -Wl,-G,-Bexport'
7541 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7542 CYGWIN*)
7543 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7544 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007545 *) LDSHARED="ld";;
7546 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7549$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007550LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007551BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007552# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007553# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7555$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007556if test -z "$CCSHARED"
7557then
Guido van Rossum07397971997-04-29 21:49:50 +00007558 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007559 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007560 then CCSHARED="-fPIC";
7561 elif test `uname -p` = sparc;
7562 then CCSHARED="-xcode=pic32";
7563 else CCSHARED="-Kpic";
7564 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007565 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007566 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007567 else CCSHARED="+z";
7568 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007569 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007570 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007571 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007572 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007573 if test "$GCC" = "yes"
7574 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007575 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007576 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007577 SCO_SV*)
7578 if test "$GCC" = "yes"
7579 then CCSHARED="-fPIC"
7580 else CCSHARED="-Kpic -belf"
7581 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007582 IRIX*/6*) case $CC in
7583 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007584 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007585 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007586 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7589$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007590# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007591# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7593$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007594if test -z "$LINKFORSHARED"
7595then
Guido van Rossum07397971997-04-29 21:49:50 +00007596 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007597 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007598 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007599 LINKFORSHARED="-Wl,-E -Wl,+s";;
7600# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007601 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007602 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007603 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007604 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007605 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007606 if test "$enable_framework"
7607 then
Jack Jansenda49e192005-01-07 13:08:22 +00007608 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007609 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007610 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007611 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007612 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007613 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007614 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007615 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7616 then
7617 LINKFORSHARED="-Wl,--export-dynamic"
7618 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007619 SunOS/5*) case $CC in
7620 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007621 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007622 then
7623 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007624 fi;;
7625 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007626 CYGWIN*)
7627 if test $enable_shared = "no"
7628 then
7629 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7630 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007631 QNX*)
7632 # -Wl,-E causes the symbols to be added to the dynamic
7633 # symbol table so that they can be found when a module
7634 # is loaded. -N 2048K causes the stack size to be set
7635 # to 2048 kilobytes so that the stack doesn't overflow
7636 # when running test_compile.py.
7637 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007638 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7641$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007642
Michael W. Hudson54241132001-12-07 15:38:26 +00007643
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007644
Matthias Kloseb9621712010-04-24 17:59:49 +00007645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7646$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007647if test ! "$LIBRARY" = "$LDLIBRARY"
7648then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007649 case $ac_sys_system in
7650 CYGWIN*)
7651 # Cygwin needs CCSHARED when building extension DLLs
7652 # but not when building the interpreter DLL.
7653 CFLAGSFORSHARED='';;
7654 *)
7655 CFLAGSFORSHARED='$(CCSHARED)'
7656 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7659$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007660
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007661# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7662# library (with --enable-shared).
7663# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007664# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7665# if it is not required, since it creates a dependency of the shared library
7666# to LIBS. This, in turn, means that applications linking the shared libpython
7667# don't need to link LIBS explicitly. The default should be only changed
7668# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007669
Matthias Kloseb9621712010-04-24 17:59:49 +00007670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7671$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007672case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007673 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007674 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007675esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7677$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007678
7679
Guido van Rossum627b2d71993-12-24 10:39:16 +00007680# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7682$as_echo_n "checking for dlopen in -ldl... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007683if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007684 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007685else
Martin v. Löwis11437992002-04-12 09:54:03 +00007686 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007687LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007691/* Override any GCC internal prototype to avoid an error.
7692 Use char because int might match the return type of a GCC
7693 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007694#ifdef __cplusplus
7695extern "C"
7696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007697char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007698int
7699main ()
7700{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007702 ;
7703 return 0;
7704}
7705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007706if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007707 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007708else
Matthias Kloseb9621712010-04-24 17:59:49 +00007709 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007711rm -f core conftest.err conftest.$ac_objext \
7712 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007713LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7716$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007717if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007718 cat >>confdefs.h <<_ACEOF
7719#define HAVE_LIBDL 1
7720_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007721
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007722 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007723
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007724fi
7725 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7727$as_echo_n "checking for shl_load in -ldld... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007728if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007729 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007730else
Martin v. Löwis11437992002-04-12 09:54:03 +00007731 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007732LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736/* Override any GCC internal prototype to avoid an error.
7737 Use char because int might match the return type of a GCC
7738 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007739#ifdef __cplusplus
7740extern "C"
7741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007742char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007743int
7744main ()
7745{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007747 ;
7748 return 0;
7749}
7750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007751if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007752 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007753else
Matthias Kloseb9621712010-04-24 17:59:49 +00007754 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007756rm -f core conftest.err conftest.$ac_objext \
7757 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007758LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7761$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007762if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007763 cat >>confdefs.h <<_ACEOF
7764#define HAVE_LIBDLD 1
7765_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007766
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007767 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007768
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007769fi
7770 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007771
Georg Brandlb1441c72009-01-03 22:33:39 +00007772# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007773if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7775$as_echo_n "checking for library containing sem_init... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007776if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007777 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007778else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007779 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007783/* Override any GCC internal prototype to avoid an error.
7784 Use char because int might match the return type of a GCC
7785 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007786#ifdef __cplusplus
7787extern "C"
7788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007789char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007790int
7791main ()
7792{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007794 ;
7795 return 0;
7796}
7797_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798for ac_lib in '' pthread rt posix4; do
7799 if test -z "$ac_lib"; then
7800 ac_res="none required"
7801 else
7802 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007803 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007804 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007805 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007808rm -f core conftest.err conftest.$ac_objext \
7809 conftest$ac_exeext
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007810 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813done
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007814if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816else
7817 ac_cv_search_sem_init=no
7818fi
7819rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007820LIBS=$ac_func_search_save_LIBS
7821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7823$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007824ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007825if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007826 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007827
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007828fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007829 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007830 # posix4 on Solaris 2.6
7831 # pthread (first!) on Linux
7832fi
7833
Martin v. Löwis19d17342003-06-14 21:03:05 +00007834# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7836$as_echo_n "checking for textdomain in -lintl... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007837if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007838 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007839else
7840 ac_check_lib_save_LIBS=$LIBS
7841LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007843/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845/* Override any GCC internal prototype to avoid an error.
7846 Use char because int might match the return type of a GCC
7847 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007848#ifdef __cplusplus
7849extern "C"
7850#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007851char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007852int
7853main ()
7854{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007855return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007856 ;
7857 return 0;
7858}
7859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007860if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007861 ac_cv_lib_intl_textdomain=yes
7862else
Matthias Kloseb9621712010-04-24 17:59:49 +00007863 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007865rm -f core conftest.err conftest.$ac_objext \
7866 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007867LIBS=$ac_check_lib_save_LIBS
7868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7870$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007871if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007872
Matthias Kloseb9621712010-04-24 17:59:49 +00007873$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007874
Brett Cannonc6d936e2009-06-07 20:09:53 +00007875 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007876fi
7877
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007878
7879# checks for system dependent C++ extensions support
7880case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7882$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007884/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007885
7886 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007887int
7888main ()
7889{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007890loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 ;
7892 return 0;
7893}
Matthias Kloseb159a552010-04-25 21:00:44 +00007894
Martin v. Löwis11437992002-04-12 09:54:03 +00007895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007896if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007897
Matthias Kloseb159a552010-04-25 21:00:44 +00007898
Matthias Kloseb9621712010-04-24 17:59:49 +00007899$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007900
Matthias Kloseb159a552010-04-25 21:00:44 +00007901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007902$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007903
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007904else
Matthias Kloseb159a552010-04-25 21:00:44 +00007905
7906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007907$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007908
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007910rm -f core conftest.err conftest.$ac_objext \
7911 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007912 *) ;;
7913esac
7914
Guido van Rossum70c7f481998-03-26 18:44:10 +00007915# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7917$as_echo_n "checking for t_open in -lnsl... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007918if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007919 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007920else
Martin v. Löwis11437992002-04-12 09:54:03 +00007921 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007922LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007926/* Override any GCC internal prototype to avoid an error.
7927 Use char because int might match the return type of a GCC
7928 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007929#ifdef __cplusplus
7930extern "C"
7931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007932char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007933int
7934main ()
7935{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007936return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007937 ;
7938 return 0;
7939}
7940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007941if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007942 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007943else
Matthias Kloseb9621712010-04-24 17:59:49 +00007944 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007946rm -f core conftest.err conftest.$ac_objext \
7947 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007948LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7951$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007952if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007953 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007954fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007955 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7957$as_echo_n "checking for socket in -lsocket... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007958if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007960else
Martin v. Löwis11437992002-04-12 09:54:03 +00007961 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007962LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007965
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007966/* Override any GCC internal prototype to avoid an error.
7967 Use char because int might match the return type of a GCC
7968 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007969#ifdef __cplusplus
7970extern "C"
7971#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007972char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007973int
7974main ()
7975{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007976return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007977 ;
7978 return 0;
7979}
7980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007981if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007982 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007983else
Matthias Kloseb9621712010-04-24 17:59:49 +00007984 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007986rm -f core conftest.err conftest.$ac_objext \
7987 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007988LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
7991$as_echo "$ac_cv_lib_socket_socket" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00007992if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00007993 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00007994fi
7995 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00007996
Matthias Kloseb9621712010-04-24 17:59:49 +00007997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
7998$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007999
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008001if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008002 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8004$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008005LIBS="$withval $LIBS"
8006
8007else
Matthias Kloseb9621712010-04-24 17:59:49 +00008008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8009$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008010fi
8011
Guido van Rossum7f43da71994-08-01 12:15:30 +00008012
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008013if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008014 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8015set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8017$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008018if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008019 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008020else
8021 case $PKG_CONFIG in
8022 [\\/]* | ?:[\\/]*)
8023 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8024 ;;
8025 *)
8026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8027for as_dir in $PATH
8028do
8029 IFS=$as_save_IFS
8030 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008031 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008032 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8033 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008035 break 2
8036 fi
8037done
Matthias Kloseb9621712010-04-24 17:59:49 +00008038 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008039IFS=$as_save_IFS
8040
8041 ;;
8042esac
8043fi
8044PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8045if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8047$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008048else
Matthias Kloseb9621712010-04-24 17:59:49 +00008049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8050$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008051fi
8052
8053
8054fi
8055if test -z "$ac_cv_path_PKG_CONFIG"; then
8056 ac_pt_PKG_CONFIG=$PKG_CONFIG
8057 # Extract the first word of "pkg-config", so it can be a program name with args.
8058set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8060$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008061if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008062 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008063else
8064 case $ac_pt_PKG_CONFIG in
8065 [\\/]* | ?:[\\/]*)
8066 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8067 ;;
8068 *)
8069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8070for as_dir in $PATH
8071do
8072 IFS=$as_save_IFS
8073 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008074 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008075 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8076 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008078 break 2
8079 fi
8080done
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008082IFS=$as_save_IFS
8083
8084 ;;
8085esac
8086fi
8087ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8088if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8090$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008091else
Matthias Kloseb9621712010-04-24 17:59:49 +00008092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8093$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008094fi
8095
8096 if test "x$ac_pt_PKG_CONFIG" = x; then
8097 PKG_CONFIG=""
8098 else
8099 case $cross_compiling:$ac_tool_warned in
8100yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008101{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8102$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008103ac_tool_warned=yes ;;
8104esac
8105 PKG_CONFIG=$ac_pt_PKG_CONFIG
8106 fi
8107else
8108 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8109fi
8110
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008111
8112# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8114$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008115
8116# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008117if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008118 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008119else
8120 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008121fi
8122
8123
Matthias Kloseb9621712010-04-24 17:59:49 +00008124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8125$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008126
8127# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8129$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008130
8131# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008132if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008133 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008134else
8135 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008136fi
8137
8138
8139if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008140 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8141else
8142 LIBFFI_INCLUDEDIR=""
8143fi
8144
8145
Matthias Kloseb9621712010-04-24 17:59:49 +00008146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8147$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008148
Benjamin Peterson076ed002010-10-31 17:11:02 +00008149# Check for support for loadable sqlite extensions
8150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8151$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8152# Check whether --enable-loadable-sqlite-extensions was given.
8153if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8154 enableval=$enable_loadable_sqlite_extensions;
8155else
8156 enable_loadable_sqlite_extensions="no"
8157fi
8158
8159
8160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8161$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8162
Matthias Klose55708cc2009-04-30 08:06:49 +00008163# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8165$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008166
8167# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008168if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008169 withval=$with_dbmliborder;
8170if test x$with_dbmliborder = xyes
8171then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008172as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008173else
8174 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8175 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8176 then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008177 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008178 fi
8179 done
8180fi
8181fi
8182
Matthias Kloseb9621712010-04-24 17:59:49 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8184$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008185
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008186# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008187
8188
Matthias Kloseb9621712010-04-24 17:59:49 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8190$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008192# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008193if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008194 withval=$with_signal_module;
8195fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008196
8197
8198if test -z "$with_signal_module"
8199then with_signal_module="yes"
8200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8202$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008203
8204if test "${with_signal_module}" = "yes"; then
8205 USE_SIGNAL_MODULE=""
8206 SIGNAL_OBJS=""
8207else
8208 USE_SIGNAL_MODULE="#"
8209 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8210fi
8211
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008212# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008213
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008214USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008215
Matthias Kloseb9621712010-04-24 17:59:49 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8217$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008218
Guido van Rossumec2f0731997-01-22 20:54:01 +00008219
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008221if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8224$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008225LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008226if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008227 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008228fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008229else
Matthias Kloseb9621712010-04-24 17:59:49 +00008230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8231$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008232fi
8233
Martin v. Löwis11437992002-04-12 09:54:03 +00008234
8235# Templates for things AC_DEFINEd more than once.
8236# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008237
8238
Martin v. Löwis11437992002-04-12 09:54:03 +00008239
8240
Matthias Kloseb9621712010-04-24 17:59:49 +00008241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8242$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008243
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008245if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008246 withval=$with_threads;
8247fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008248
8249
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008250# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008251
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008253if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008254 withval=$with_thread; with_threads=$with_thread
8255fi
8256
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008257
8258if test -z "$with_threads"
8259then with_threads="yes"
8260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8262$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008263
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008264
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008265if test "$with_threads" = "no"
8266then
8267 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008268elif test "$ac_cv_pthread_is_default" = yes
8269then
Matthias Kloseb9621712010-04-24 17:59:49 +00008270 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008271
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008272 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008273 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008274
8275 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008276 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008277elif test "$ac_cv_kpthread" = "yes"
8278then
8279 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008280 if test "$ac_cv_cxx_thread" = "yes"; then
8281 CXX="$CXX -Kpthread"
8282 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008283 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008284
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008285 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008286 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008287elif test "$ac_cv_kthread" = "yes"
8288then
8289 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008290 if test "$ac_cv_cxx_thread" = "yes"; then
8291 CXX="$CXX -Kthread"
8292 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008293 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008294
8295 posix_threads=yes
8296 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008297elif test "$ac_cv_pthread" = "yes"
8298then
8299 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008300 if test "$ac_cv_cxx_thread" = "yes"; then
8301 CXX="$CXX -pthread"
8302 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008303 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008304
8305 posix_threads=yes
8306 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008307else
8308 if test ! -z "$with_threads" -a -d "$with_threads"
8309 then LDFLAGS="$LDFLAGS -L$with_threads"
8310 fi
8311 if test ! -z "$withval" -a -d "$withval"
8312 then LDFLAGS="$LDFLAGS -L$withval"
8313 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008314
8315 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008316 # define _POSIX_THREADS in unistd.h. Some apparently don't
8317 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8319$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008321/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008322
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008323#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008324#ifdef _POSIX_THREADS
8325yes
8326#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008327
8328_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008330 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008331 unistd_defines_pthreads=yes
8332else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008333 unistd_defines_pthreads=no
8334fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008335rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008336
Matthias Kloseb9621712010-04-24 17:59:49 +00008337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8338$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008339
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008341
Matthias Kloseb9621712010-04-24 17:59:49 +00008342 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008343if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008344 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008345
Matthias Kloseb9621712010-04-24 17:59:49 +00008346 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008347
Martin v. Löwis11437992002-04-12 09:54:03 +00008348
Matthias Kloseb9621712010-04-24 17:59:49 +00008349$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008350
8351 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008352 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008353else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008354
Matthias Kloseb9621712010-04-24 17:59:49 +00008355 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 +00008356if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008357 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008358
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008360
Martin v. Löwis11437992002-04-12 09:54:03 +00008361
Matthias Kloseb9621712010-04-24 17:59:49 +00008362$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008363
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008364 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008365else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008366
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008367 # Just looking for pthread_create in libpthread is not enough:
8368 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8369 # So we really have to include pthread.h, and then link.
8370 _libs=$LIBS
8371 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8373$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008375/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008376#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008377
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008378void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008379int
8380main ()
8381{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008382
8383pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008384 ;
8385 return 0;
8386}
8387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008388if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008389
Matthias Kloseb9621712010-04-24 17:59:49 +00008390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8391$as_echo "yes" >&6; }
8392 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008393
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008394 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008395 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008396else
Martin v. Löwis11437992002-04-12 09:54:03 +00008397
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008398 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008399 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008400if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008402
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008403 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008404 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008405else
Guido van Rossumad678af1998-10-02 14:42:15 +00008406
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8408$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008409if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008410 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008411else
Martin v. Löwis11437992002-04-12 09:54:03 +00008412 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008413LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008415/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008416
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417/* Override any GCC internal prototype to avoid an error.
8418 Use char because int might match the return type of a GCC
8419 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008420#ifdef __cplusplus
8421extern "C"
8422#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008423char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008424int
8425main ()
8426{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008427return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 ;
8429 return 0;
8430}
8431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008432if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008433 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008434else
Matthias Kloseb9621712010-04-24 17:59:49 +00008435 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008437rm -f core conftest.err conftest.$ac_objext \
8438 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008439LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8442$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008443if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008444 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008445
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008446 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008447 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008448 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008449else
Greg Steinadf63d62000-07-05 10:38:09 +00008450
Matthias Kloseb9621712010-04-24 17:59:49 +00008451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8452$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008453if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008455else
Martin v. Löwis11437992002-04-12 09:54:03 +00008456 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008457LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008460
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461/* Override any GCC internal prototype to avoid an error.
8462 Use char because int might match the return type of a GCC
8463 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008464#ifdef __cplusplus
8465extern "C"
8466#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008467char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008468int
8469main ()
8470{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008471return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008472 ;
8473 return 0;
8474}
8475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008476if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008477 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008478else
Matthias Kloseb9621712010-04-24 17:59:49 +00008479 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008481rm -f core conftest.err conftest.$ac_objext \
8482 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008483LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008484fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8486$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008487if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008489
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008490 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008491 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008492 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008493else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008494
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8496$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008497if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008499else
Martin v. Löwis11437992002-04-12 09:54:03 +00008500 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008501LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505/* Override any GCC internal prototype to avoid an error.
8506 Use char because int might match the return type of a GCC
8507 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008508#ifdef __cplusplus
8509extern "C"
8510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008511char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008512int
8513main ()
8514{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008516 ;
8517 return 0;
8518}
8519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008520if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008521 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008522else
Matthias Kloseb9621712010-04-24 17:59:49 +00008523 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008525rm -f core conftest.err conftest.$ac_objext \
8526 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008527LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008528fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8530$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008531if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008532 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008533
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008534 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008535 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008536 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008537else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008538
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8540$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008541if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008542 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008543else
Martin v. Löwis11437992002-04-12 09:54:03 +00008544 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008545LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008547/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008549/* Override any GCC internal prototype to avoid an error.
8550 Use char because int might match the return type of a GCC
8551 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008552#ifdef __cplusplus
8553extern "C"
8554#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008555char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008556int
8557main ()
8558{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 ;
8561 return 0;
8562}
8563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008564if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008565 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008566else
Matthias Kloseb9621712010-04-24 17:59:49 +00008567 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008569rm -f core conftest.err conftest.$ac_objext \
8570 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008571LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8574$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008575if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008576 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008577
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008578 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008579 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008580 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008581else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008582
Martin v. Löwis130fb172001-07-19 11:00:41 +00008583 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008584fi
8585
Guido van Rossum627b2d71993-12-24 10:39:16 +00008586
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008587fi
8588
Guido van Rossum0be3e491997-05-22 20:33:33 +00008589fi
8590
Guido van Rossum49545951997-12-02 19:28:29 +00008591fi
8592
Guido van Rossumb93a8621998-05-07 13:27:32 +00008593fi
8594
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008596rm -f core conftest.err conftest.$ac_objext \
8597 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008598fi
8599
Martin v. Löwis11437992002-04-12 09:54:03 +00008600
8601fi
8602
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008603
Michael W. Hudson54241132001-12-07 15:38:26 +00008604
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8606$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008607if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008608 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008609else
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008611LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008615/* Override any GCC internal prototype to avoid an error.
8616 Use char because int might match the return type of a GCC
8617 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008618#ifdef __cplusplus
8619extern "C"
8620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008621char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008622int
8623main ()
8624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008626 ;
8627 return 0;
8628}
8629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008630if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008631 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008632else
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008635rm -f core conftest.err conftest.$ac_objext \
8636 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008637LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8640$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008641if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008643
Martin v. Löwis130fb172001-07-19 11:00:41 +00008644 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008645 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008646 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008647fi
8648
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008649
Neal Norwitza978ab02002-11-02 16:58:05 +00008650 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8652$as_echo_n "checking for thr_create in -lthread... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008653if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008655else
Martin v. Löwis11437992002-04-12 09:54:03 +00008656 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008657LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008661/* Override any GCC internal prototype to avoid an error.
8662 Use char because int might match the return type of a GCC
8663 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008664#ifdef __cplusplus
8665extern "C"
8666#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008667char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008668int
8669main ()
8670{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 ;
8673 return 0;
8674}
8675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008676if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008678else
Matthias Kloseb9621712010-04-24 17:59:49 +00008679 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008681rm -f core conftest.err conftest.$ac_objext \
8682 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008683LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8686$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008687if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008688 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008689
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008690 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008691 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008692 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008693fi
8694
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008695 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008696
Martin v. Löwis130fb172001-07-19 11:00:41 +00008697 if test "$USE_THREAD_MODULE" != "#"
8698 then
8699 # If the above checks didn't disable threads, (at least) OSF1
8700 # needs this '-threads' argument during linking.
8701 case $ac_sys_system in
8702 OSF1) LDLAST=-threads;;
8703 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008704 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008705fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008706
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008707if test "$posix_threads" = "yes"; then
8708 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008709
Matthias Kloseb9621712010-04-24 17:59:49 +00008710$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008711
8712 fi
8713
8714 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8715 case $ac_sys_system/$ac_sys_release in
8716 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008717$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008718
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008719 ;;
8720 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008721$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008722
8723 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008724 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008725$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008726
8727 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008728 AIX/6)
8729$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8730
8731 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008732 esac
8733
Matthias Kloseb9621712010-04-24 17:59:49 +00008734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8735$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008736 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008738else
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008740 ac_cv_pthread_system_supported=no
8741else
Matthias Kloseb9621712010-04-24 17:59:49 +00008742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008743/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008744#include <pthread.h>
8745 void *foo(void *parm) {
8746 return NULL;
8747 }
8748 main() {
8749 pthread_attr_t attr;
8750 pthread_t id;
8751 if (pthread_attr_init(&attr)) exit(-1);
8752 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8753 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8754 exit(0);
8755 }
8756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008757if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008758 ac_cv_pthread_system_supported=yes
8759else
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8763 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008764fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008766
Guido van Rossum627b2d71993-12-24 10:39:16 +00008767fi
8768
Matthias Kloseb9621712010-04-24 17:59:49 +00008769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8770$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008771 if test "$ac_cv_pthread_system_supported" = "yes"; then
8772
Matthias Kloseb9621712010-04-24 17:59:49 +00008773$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008774
8775 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 for ac_func in pthread_sigmask
8777do :
8778 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00008779if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008780 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008781#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008782_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008783 case $ac_sys_system in
8784 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008785
Matthias Kloseb9621712010-04-24 17:59:49 +00008786$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008787
8788 ;;
8789 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008790fi
8791done
8792
8793fi
8794
8795
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008796# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008797
Matthias Kloseb9621712010-04-24 17:59:49 +00008798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8799$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008801if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008802 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008803 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8805$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008806 ipv6=no
8807 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008808 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8809$as_echo "yes" >&6; }
8810 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008811
8812 ipv6=yes
8813 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008814 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008815else
Martin v. Löwis11437992002-04-12 09:54:03 +00008816
Matthias Kloseb9621712010-04-24 17:59:49 +00008817 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008818
Matthias Kloseb9621712010-04-24 17:59:49 +00008819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8820$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008821 ipv6=no
8822
8823else
Matthias Kloseb9621712010-04-24 17:59:49 +00008824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008825/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008826 /* AF_INET6 available check */
8827#include <sys/types.h>
8828#include <sys/socket.h>
8829main()
8830{
8831 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8832 exit(1);
8833 else
8834 exit(0);
8835}
8836
Martin v. Löwis11437992002-04-12 09:54:03 +00008837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008838if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008839
Matthias Kloseb9621712010-04-24 17:59:49 +00008840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8841$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008842 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008843
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008844else
Matthias Kloseb159a552010-04-25 21:00:44 +00008845
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8847$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008848 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008849
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8852 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008853fi
8854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008855
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008856if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8858$as_echo_n "checking if RFC2553 API is available... " >&6; }
8859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008860/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008861
8862 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008863#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008864int
8865main ()
8866{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008867struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008868 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008869 ;
8870 return 0;
8871}
Matthias Kloseb159a552010-04-25 21:00:44 +00008872
Martin v. Löwis11437992002-04-12 09:54:03 +00008873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008874if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008875
8876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008877$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008878 ipv6=yes
8879
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008880else
Matthias Kloseb159a552010-04-25 21:00:44 +00008881
8882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008883$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008884 ipv6=no
8885
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008888fi
8889
8890if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008891 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008892
8893fi
8894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008895fi
8896
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008897
8898ipv6type=unknown
8899ipv6lib=none
8900ipv6trylibc=no
8901
8902if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8904$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008905 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8906 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008907 case $i in
8908 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008910/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008911
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008912#include <netinet/in.h>
8913#ifdef IPV6_INRIA_VERSION
8914yes
8915#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008916_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008918 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008919 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008920fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008921rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008922
8923 ;;
8924 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008926/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008927
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008928#include <netinet/in.h>
8929#ifdef __KAME__
8930yes
8931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008932_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008934 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008935 ipv6type=$i;
8936 ipv6lib=inet6
8937 ipv6libdir=/usr/local/v6/lib
8938 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008939fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008940rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008941
8942 ;;
8943 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008945/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008946
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008947#include <features.h>
8948#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8949yes
8950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008951_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008952if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008953 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954 ipv6type=$i;
8955 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008957rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008958
8959 ;;
8960 linux-inet6)
8961 if test -d /usr/inet6; then
8962 ipv6type=$i
8963 ipv6lib=inet6
8964 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008965 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008966 fi
8967 ;;
8968 solaris)
8969 if test -f /etc/netconfig; then
8970 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
8971 ipv6type=$i
8972 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008973 fi
8974 fi
8975 ;;
8976 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008978/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008979
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008980#include <sys/param.h>
8981#ifdef _TOSHIBA_INET6
8982yes
8983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008984_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008987 ipv6type=$i;
8988 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008989 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008991rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008992
8993 ;;
8994 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008996/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008997
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008998#include </usr/local/v6/include/sys/v6config.h>
8999#ifdef __V6D__
9000yes
9001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009002_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009005 ipv6type=$i;
9006 ipv6lib=v6;
9007 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009008 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009010rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009011
9012 ;;
9013 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009015/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009016
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009017#include <sys/param.h>
9018#ifdef _ZETA_MINAMI_INET6
9019yes
9020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009021_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009023 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009024 ipv6type=$i;
9025 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009026 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009027fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009028rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009029
9030 ;;
9031 esac
9032 if test "$ipv6type" != "unknown"; then
9033 break
9034 fi
9035 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9037$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009038fi
9039
9040if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9041 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9042 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9043 echo "using lib$ipv6lib"
9044 else
9045 if test $ipv6trylibc = "yes"; then
9046 echo "using libc"
9047 else
9048 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9049 echo "You need to fetch lib$ipv6lib.a from appropriate"
9050 echo 'ipv6 kit and compile beforehand.'
9051 exit 1
9052 fi
9053 fi
9054fi
9055
Matthias Kloseb9621712010-04-24 17:59:49 +00009056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9057$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009059/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009060
9061 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009062int
9063main ()
9064{
9065FSIORefNum fRef = 0
9066 ;
9067 return 0;
9068}
Matthias Kloseb159a552010-04-25 21:00:44 +00009069
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009071if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009072
Matthias Kloseb159a552010-04-25 21:00:44 +00009073
Matthias Kloseb9621712010-04-24 17:59:49 +00009074$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009075
Matthias Kloseb9621712010-04-24 17:59:49 +00009076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9077$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009078
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009079else
Matthias Kloseb159a552010-04-25 21:00:44 +00009080
Matthias Kloseb9621712010-04-24 17:59:49 +00009081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9082$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009083
9084fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9086
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009087# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9089$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009091# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009092if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009093 withval=$with_doc_strings;
9094fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009095
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009096
9097if test -z "$with_doc_strings"
9098then with_doc_strings="yes"
9099fi
9100if test "$with_doc_strings" != "no"
9101then
9102
Matthias Kloseb9621712010-04-24 17:59:49 +00009103$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009104
9105fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9107$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009108
Antoine Pitrou042b1282010-08-13 21:15:58 +00009109# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9111$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009112
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009113# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009114if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009115 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009116if test "$withval" != no
9117then
9118
Matthias Kloseb9621712010-04-24 17:59:49 +00009119$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009120
Matthias Kloseb9621712010-04-24 17:59:49 +00009121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9122$as_echo "yes" >&6; }
9123else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9124$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009125fi
9126else
Matthias Kloseb9621712010-04-24 17:59:49 +00009127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9128$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009129fi
9130
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009131
9132# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9134$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009136# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009137if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009138 withval=$with_pymalloc;
9139fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009140
Neil Schemenauera35c6882001-02-27 04:45:05 +00009141
Neil Schemenauer16c22972002-03-22 15:34:49 +00009142if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009143then
9144 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009145 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009146fi
9147if test "$with_pymalloc" != "no"
9148then
Martin v. Löwis11437992002-04-12 09:54:03 +00009149
Matthias Kloseb9621712010-04-24 17:59:49 +00009150$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009151
9152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9154$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009155
Benjamin Peterson05159c42009-12-03 03:01:27 +00009156# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9158$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009159
9160# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009161if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009162 withval=$with_valgrind;
9163else
9164 with_valgrind=no
9165fi
9166
Matthias Kloseb9621712010-04-24 17:59:49 +00009167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9168$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009169if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009170 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 +00009171if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009172
Matthias Kloseb9621712010-04-24 17:59:49 +00009173$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009174
9175else
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009176 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009177
9178fi
9179
9180
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009181 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009182fi
9183
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009184# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009185
Guido van Rossum98935bf2001-09-05 19:13:16 +00009186DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009187
Guido van Rossume97ee181999-12-20 21:27:22 +00009188# the dlopen() function means we might want to use dynload_shlib.o. some
9189# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009190for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009191do :
9192 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009193if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009194 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009195#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009196_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009197
Guido van Rossume97ee181999-12-20 21:27:22 +00009198fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009199done
Guido van Rossume97ee181999-12-20 21:27:22 +00009200
Michael W. Hudson54241132001-12-07 15:38:26 +00009201
Guido van Rossume97ee181999-12-20 21:27:22 +00009202# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9203# loading of modules.
9204
Matthias Kloseb9621712010-04-24 17:59:49 +00009205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9206$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009207if test -z "$DYNLOADFILE"
9208then
9209 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009210 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9211 if test "$ac_cv_func_dlopen" = yes
9212 then DYNLOADFILE="dynload_shlib.o"
9213 else DYNLOADFILE="dynload_aix.o"
9214 fi
9215 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009216 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009217 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9218 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009219 *)
9220 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9221 # out any dynamic loading
9222 if test "$ac_cv_func_dlopen" = yes
9223 then DYNLOADFILE="dynload_shlib.o"
9224 else DYNLOADFILE="dynload_stub.o"
9225 fi
9226 ;;
9227 esac
9228fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9230$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009231if test "$DYNLOADFILE" != "dynload_stub.o"
9232then
Martin v. Löwis11437992002-04-12 09:54:03 +00009233
Matthias Kloseb9621712010-04-24 17:59:49 +00009234$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009235
9236fi
9237
Neil Schemenauer4e425612001-06-19 15:44:15 +00009238# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9239
Michael W. Hudson54241132001-12-07 15:38:26 +00009240
Matthias Kloseb9621712010-04-24 17:59:49 +00009241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9242$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009243if test -z "$MACHDEP_OBJS"
9244then
Jack Jansene578a632001-08-15 01:27:14 +00009245 MACHDEP_OBJS=$extra_machdep_objs
9246else
9247 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9250$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009251
Guido van Rossum627b2d71993-12-24 10:39:16 +00009252# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009253for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009254 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009255 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009256 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009257 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009258 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009259 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009260 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9261 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009262 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009263 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009264 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009265 truncate uname unsetenv utimes waitpid wait3 wait4 \
9266 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009267do :
9268 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9269ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009270if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009271 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009272#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009273_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009274
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009275fi
9276done
9277
Michael W. Hudson54241132001-12-07 15:38:26 +00009278
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009279# For some functions, having a definition is not sufficient, since
9280# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9282$as_echo_n "checking for chroot... " >&6; }
9283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009284/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009285#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009286int
9287main ()
9288{
9289void *x=chroot
9290 ;
9291 return 0;
9292}
9293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009294if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009295
Matthias Kloseb9621712010-04-24 17:59:49 +00009296$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009297
Matthias Kloseb159a552010-04-25 21:00:44 +00009298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009299$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009300else
Matthias Kloseb9621712010-04-24 17:59:49 +00009301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9302$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009303
9304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9307$as_echo_n "checking for link... " >&6; }
9308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009309/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009310#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009311int
9312main ()
9313{
9314void *x=link
9315 ;
9316 return 0;
9317}
9318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009319if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009320
Matthias Kloseb9621712010-04-24 17:59:49 +00009321$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009322
Matthias Kloseb159a552010-04-25 21:00:44 +00009323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009324$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009325else
Matthias Kloseb9621712010-04-24 17:59:49 +00009326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9327$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009328
9329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9332$as_echo_n "checking for symlink... " >&6; }
9333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009334/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009335#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009336int
9337main ()
9338{
9339void *x=symlink
9340 ;
9341 return 0;
9342}
9343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009344if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009345
Matthias Kloseb9621712010-04-24 17:59:49 +00009346$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009347
Matthias Kloseb159a552010-04-25 21:00:44 +00009348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009349$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009350else
Matthias Kloseb9621712010-04-24 17:59:49 +00009351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9352$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009353
9354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9357$as_echo_n "checking for fchdir... " >&6; }
9358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009359/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009360#include <unistd.h>
9361int
9362main ()
9363{
9364void *x=fchdir
9365 ;
9366 return 0;
9367}
9368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009369if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009370
Matthias Kloseb9621712010-04-24 17:59:49 +00009371$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009372
Matthias Kloseb159a552010-04-25 21:00:44 +00009373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009374$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009375else
Matthias Kloseb9621712010-04-24 17:59:49 +00009376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9377$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009378
9379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9382$as_echo_n "checking for fsync... " >&6; }
9383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009384/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009385#include <unistd.h>
9386int
9387main ()
9388{
9389void *x=fsync
9390 ;
9391 return 0;
9392}
9393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009394if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009395
Matthias Kloseb9621712010-04-24 17:59:49 +00009396$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009397
Matthias Kloseb159a552010-04-25 21:00:44 +00009398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009399$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009400else
Matthias Kloseb9621712010-04-24 17:59:49 +00009401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9402$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009403
9404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9407$as_echo_n "checking for fdatasync... " >&6; }
9408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009409/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009410#include <unistd.h>
9411int
9412main ()
9413{
9414void *x=fdatasync
9415 ;
9416 return 0;
9417}
9418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009420
Matthias Kloseb9621712010-04-24 17:59:49 +00009421$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009422
Matthias Kloseb159a552010-04-25 21:00:44 +00009423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009424$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009425else
Matthias Kloseb9621712010-04-24 17:59:49 +00009426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9427$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009428
9429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9432$as_echo_n "checking for epoll... " >&6; }
9433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009434/* end confdefs.h. */
9435#include <sys/epoll.h>
9436int
9437main ()
9438{
9439void *x=epoll_create
9440 ;
9441 return 0;
9442}
9443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009444if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009445
Matthias Kloseb9621712010-04-24 17:59:49 +00009446$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009447
Matthias Kloseb159a552010-04-25 21:00:44 +00009448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009449$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009450else
Matthias Kloseb9621712010-04-24 17:59:49 +00009451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9452$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009453
9454fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9457$as_echo_n "checking for kqueue... " >&6; }
9458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009459/* end confdefs.h. */
9460
9461#include <sys/types.h>
9462#include <sys/event.h>
9463
9464int
9465main ()
9466{
9467int x=kqueue()
9468 ;
9469 return 0;
9470}
9471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009472if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009473
Matthias Kloseb9621712010-04-24 17:59:49 +00009474$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009475
Matthias Kloseb159a552010-04-25 21:00:44 +00009476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009477$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009478else
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9480$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009481
9482fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009484# On some systems (eg. FreeBSD 5), we would find a definition of the
9485# functions ctermid_r, setgroups in the library, but no prototype
9486# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9487# address to avoid compiler warnings and potential miscompilations
9488# because of the missing prototypes.
9489
Matthias Kloseb9621712010-04-24 17:59:49 +00009490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9491$as_echo_n "checking for ctermid_r... " >&6; }
9492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009493/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009494
Martin v. Löwisd5843682002-11-21 20:41:28 +00009495#include <stdio.h>
9496
Martin v. Löwisd5843682002-11-21 20:41:28 +00009497int
9498main ()
9499{
9500void* p = ctermid_r
9501 ;
9502 return 0;
9503}
9504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009505if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009506
Matthias Kloseb9621712010-04-24 17:59:49 +00009507$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009508
Matthias Kloseb159a552010-04-25 21:00:44 +00009509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009510$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009511else
Matthias Kloseb9621712010-04-24 17:59:49 +00009512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9513$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009514
9515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9517
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9519$as_echo_n "checking for flock declaration... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009520if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009521 $as_echo_n "(cached) " >&6
9522else
9523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009524/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009525#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009526int
9527main ()
9528{
9529void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009530
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009531 ;
9532 return 0;
9533}
9534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009535if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009536 ac_cv_flock_decl=yes
9537else
9538 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009539
9540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009542
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009543fi
9544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9545$as_echo "$ac_cv_flock_decl" >&6; }
9546if test "x${ac_cv_flock_decl}" = xyes; then
9547 for ac_func in flock
9548do :
9549 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009550if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009551 cat >>confdefs.h <<_ACEOF
9552#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009553_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009554
Antoine Pitroua3000072010-09-07 14:52:42 +00009555else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009557$as_echo_n "checking for flock in -lbsd... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009558if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009559 $as_echo_n "(cached) " >&6
9560else
9561 ac_check_lib_save_LIBS=$LIBS
9562LIBS="-lbsd $LIBS"
9563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9564/* end confdefs.h. */
9565
9566/* Override any GCC internal prototype to avoid an error.
9567 Use char because int might match the return type of a GCC
9568 builtin and then its argument prototype would still apply. */
9569#ifdef __cplusplus
9570extern "C"
9571#endif
9572char flock ();
9573int
9574main ()
9575{
9576return flock ();
9577 ;
9578 return 0;
9579}
9580_ACEOF
9581if ac_fn_c_try_link "$LINENO"; then :
9582 ac_cv_lib_bsd_flock=yes
9583else
9584 ac_cv_lib_bsd_flock=no
9585fi
9586rm -f core conftest.err conftest.$ac_objext \
9587 conftest$ac_exeext conftest.$ac_ext
9588LIBS=$ac_check_lib_save_LIBS
9589fi
9590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9591$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009592if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009593 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009594
9595
9596$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9597
9598
9599fi
9600
9601
9602fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009603done
9604
Antoine Pitroua3000072010-09-07 14:52:42 +00009605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009606
Matthias Kloseb9621712010-04-24 17:59:49 +00009607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9608$as_echo_n "checking for getpagesize... " >&6; }
9609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009610/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009611
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009612#include <unistd.h>
9613
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009614int
9615main ()
9616{
9617void* p = getpagesize
9618 ;
9619 return 0;
9620}
9621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009622if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009623
Matthias Kloseb9621712010-04-24 17:59:49 +00009624$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009625
Matthias Kloseb159a552010-04-25 21:00:44 +00009626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009627$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009628else
Matthias Kloseb9621712010-04-24 17:59:49 +00009629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9630$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009631
9632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009634
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009635for ac_prog in true
9636do
9637 # Extract the first word of "$ac_prog", so it can be a program name with args.
9638set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9640$as_echo_n "checking for $ac_word... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009641if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009642 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009643else
9644 if test -n "$TRUE"; then
9645 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9646else
9647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9648for as_dir in $PATH
9649do
9650 IFS=$as_save_IFS
9651 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009652 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009653 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 +00009654 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009655 $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 +00009656 break 2
9657 fi
9658done
Matthias Kloseb9621712010-04-24 17:59:49 +00009659 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009660IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009661
9662fi
9663fi
9664TRUE=$ac_cv_prog_TRUE
9665if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9667$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009668else
Matthias Kloseb9621712010-04-24 17:59:49 +00009669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9670$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009671fi
9672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009673
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009674 test -n "$TRUE" && break
9675done
9676test -n "$TRUE" || TRUE="/bin/true"
9677
9678
Matthias Kloseb9621712010-04-24 17:59:49 +00009679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9680$as_echo_n "checking for inet_aton in -lc... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009681if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009682 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009683else
9684 ac_check_lib_save_LIBS=$LIBS
9685LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009687/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009689/* Override any GCC internal prototype to avoid an error.
9690 Use char because int might match the return type of a GCC
9691 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009692#ifdef __cplusplus
9693extern "C"
9694#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009695char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009696int
9697main ()
9698{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009699return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009700 ;
9701 return 0;
9702}
9703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009704if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009705 ac_cv_lib_c_inet_aton=yes
9706else
Matthias Kloseb9621712010-04-24 17:59:49 +00009707 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009709rm -f core conftest.err conftest.$ac_objext \
9710 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009711LIBS=$ac_check_lib_save_LIBS
9712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9714$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009715if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009716 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009717else
Matthias Kloseb9621712010-04-24 17:59:49 +00009718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9719$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009720if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009721 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009722else
9723 ac_check_lib_save_LIBS=$LIBS
9724LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009726/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728/* Override any GCC internal prototype to avoid an error.
9729 Use char because int might match the return type of a GCC
9730 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009731#ifdef __cplusplus
9732extern "C"
9733#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009734char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009735int
9736main ()
9737{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009738return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009739 ;
9740 return 0;
9741}
9742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009743if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009744 ac_cv_lib_resolv_inet_aton=yes
9745else
Matthias Kloseb9621712010-04-24 17:59:49 +00009746 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009748rm -f core conftest.err conftest.$ac_objext \
9749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009750LIBS=$ac_check_lib_save_LIBS
9751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9753$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009754if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009755 cat >>confdefs.h <<_ACEOF
9756#define HAVE_LIBRESOLV 1
9757_ACEOF
9758
9759 LIBS="-lresolv $LIBS"
9760
9761fi
9762
9763
9764fi
9765
9766
Christian Heimesd0764e22007-12-04 15:00:33 +00009767# On Tru64, chflags seems to be present, but calling it will
9768# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9770$as_echo_n "checking for chflags... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009771if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009773else
Matthias Kloseb9621712010-04-24 17:59:49 +00009774 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009775 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009776else
Matthias Kloseb9621712010-04-24 17:59:49 +00009777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009778/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009779[
Christian Heimesd0764e22007-12-04 15:00:33 +00009780#include <sys/stat.h>
9781#include <unistd.h>
9782int main(int argc, char*argv[])
9783{
9784 if(chflags(argv[0], 0) != 0)
9785 return 1;
9786 return 0;
9787}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009788]
Christian Heimesd0764e22007-12-04 15:00:33 +00009789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009790if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009791 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009792else
Matthias Kloseb9621712010-04-24 17:59:49 +00009793 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9796 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009797fi
9798
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009799
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9802$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009803if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009804 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009805if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009806 ac_cv_have_chflags="yes"
9807else
9808 ac_cv_have_chflags="no"
9809fi
9810
9811fi
9812if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009813
Matthias Kloseb9621712010-04-24 17:59:49 +00009814$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009815
9816fi
9817
Matthias Kloseb9621712010-04-24 17:59:49 +00009818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9819$as_echo_n "checking for lchflags... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009820if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009822else
Matthias Kloseb9621712010-04-24 17:59:49 +00009823 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009824 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009825else
Matthias Kloseb9621712010-04-24 17:59:49 +00009826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009827/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009828[
Christian Heimesd0764e22007-12-04 15:00:33 +00009829#include <sys/stat.h>
9830#include <unistd.h>
9831int main(int argc, char*argv[])
9832{
9833 if(lchflags(argv[0], 0) != 0)
9834 return 1;
9835 return 0;
9836}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009837]
Christian Heimesd0764e22007-12-04 15:00:33 +00009838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009839if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009840 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009841else
Matthias Kloseb9621712010-04-24 17:59:49 +00009842 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9845 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009846fi
9847
9848
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9851$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009852if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009853 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009854if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009855 ac_cv_have_lchflags="yes"
9856else
9857 ac_cv_have_lchflags="no"
9858fi
9859
9860fi
9861if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009862
Matthias Kloseb9621712010-04-24 17:59:49 +00009863$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009864
9865fi
9866
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009867case $ac_sys_system/$ac_sys_release in
9868Darwin/*)
9869 _CUR_CFLAGS="${CFLAGS}"
9870 _CUR_LDFLAGS="${LDFLAGS}"
9871 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9872 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9873 ;;
9874esac
9875
Matthias Kloseb9621712010-04-24 17:59:49 +00009876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9877$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009878if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009879 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009880else
9881 ac_check_lib_save_LIBS=$LIBS
9882LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009884/* end confdefs.h. */
9885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886/* Override any GCC internal prototype to avoid an error.
9887 Use char because int might match the return type of a GCC
9888 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009889#ifdef __cplusplus
9890extern "C"
9891#endif
9892char inflateCopy ();
9893int
9894main ()
9895{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009896return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009897 ;
9898 return 0;
9899}
9900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009901if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009902 ac_cv_lib_z_inflateCopy=yes
9903else
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009906rm -f core conftest.err conftest.$ac_objext \
9907 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009908LIBS=$ac_check_lib_save_LIBS
9909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9911$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +00009912if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009913
Matthias Kloseb9621712010-04-24 17:59:49 +00009914$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009915
9916fi
9917
9918
9919case $ac_sys_system/$ac_sys_release in
9920Darwin/*)
9921 CFLAGS="${_CUR_CFLAGS}"
9922 LDFLAGS="${_CUR_LDFLAGS}"
9923 ;;
9924esac
9925
Matthias Kloseb9621712010-04-24 17:59:49 +00009926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9927$as_echo_n "checking for hstrerror... " >&6; }
9928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009929/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009930
Martin v. Löwise9416172003-05-03 10:12:45 +00009931#include <netdb.h>
9932
Martin v. Löwise9416172003-05-03 10:12:45 +00009933int
9934main ()
9935{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009936void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009937 ;
9938 return 0;
9939}
9940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009941if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009942
Matthias Kloseb9621712010-04-24 17:59:49 +00009943$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009944
Matthias Kloseb159a552010-04-25 21:00:44 +00009945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009946$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009947else
Matthias Kloseb9621712010-04-24 17:59:49 +00009948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9949$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009950
9951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009952rm -f core conftest.err conftest.$ac_objext \
9953 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009954
Matthias Kloseb9621712010-04-24 17:59:49 +00009955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9956$as_echo_n "checking for inet_aton... " >&6; }
9957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009958/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009959
Martin v. Löwis86d66262006-02-17 08:40:11 +00009960#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009961#include <sys/socket.h>
9962#include <netinet/in.h>
9963#include <arpa/inet.h>
9964
Martin v. Löwise9416172003-05-03 10:12:45 +00009965int
9966main ()
9967{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009968void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009969 ;
9970 return 0;
9971}
9972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009973if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009974
Matthias Kloseb9621712010-04-24 17:59:49 +00009975$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009976
Matthias Kloseb159a552010-04-25 21:00:44 +00009977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009978$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009979else
Matthias Kloseb9621712010-04-24 17:59:49 +00009980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9981$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009982
9983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009984rm -f core conftest.err conftest.$ac_objext \
9985 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009986
Matthias Kloseb9621712010-04-24 17:59:49 +00009987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9988$as_echo_n "checking for inet_pton... " >&6; }
9989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009990/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009991
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009992#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009993#include <sys/socket.h>
9994#include <netinet/in.h>
9995#include <arpa/inet.h>
9996
Martin v. Löwise9416172003-05-03 10:12:45 +00009997int
9998main ()
9999{
10000void* p = inet_pton
10001 ;
10002 return 0;
10003}
10004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010005if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010006
Matthias Kloseb9621712010-04-24 17:59:49 +000010007$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010008
Matthias Kloseb159a552010-04-25 21:00:44 +000010009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010010$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010011else
Matthias Kloseb9621712010-04-24 17:59:49 +000010012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10013$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010014
10015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010017
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010018# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10020$as_echo_n "checking for setgroups... " >&6; }
10021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010022/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010023
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010024#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010025#ifdef HAVE_GRP_H
10026#include <grp.h>
10027#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010028
Martin v. Löwisd5843682002-11-21 20:41:28 +000010029int
10030main ()
10031{
10032void* p = setgroups
10033 ;
10034 return 0;
10035}
10036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010037if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010038
Matthias Kloseb9621712010-04-24 17:59:49 +000010039$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010040
Matthias Kloseb159a552010-04-25 21:00:44 +000010041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010042$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010043else
Matthias Kloseb9621712010-04-24 17:59:49 +000010044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10045$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010046
10047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010049
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010050# check for openpty and forkpty
10051
10052for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010053do :
10054 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010055if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010056 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010057#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010058_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010059
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010060else
Matthias Kloseb9621712010-04-24 17:59:49 +000010061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10062$as_echo_n "checking for openpty in -lutil... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010063if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010064 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010065else
Martin v. Löwis11437992002-04-12 09:54:03 +000010066 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010067LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010071/* Override any GCC internal prototype to avoid an error.
10072 Use char because int might match the return type of a GCC
10073 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010074#ifdef __cplusplus
10075extern "C"
10076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010077char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010078int
10079main ()
10080{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010081return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010082 ;
10083 return 0;
10084}
10085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010086if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010088else
Matthias Kloseb9621712010-04-24 17:59:49 +000010089 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010091rm -f core conftest.err conftest.$ac_objext \
10092 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010093LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10096$as_echo "$ac_cv_lib_util_openpty" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010097if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010098 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010099 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010100else
Matthias Kloseb9621712010-04-24 17:59:49 +000010101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10102$as_echo_n "checking for openpty in -lbsd... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010103if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010104 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010105else
10106 ac_check_lib_save_LIBS=$LIBS
10107LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010109/* end confdefs.h. */
10110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010111/* Override any GCC internal prototype to avoid an error.
10112 Use char because int might match the return type of a GCC
10113 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010114#ifdef __cplusplus
10115extern "C"
10116#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010117char openpty ();
10118int
10119main ()
10120{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010121return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010122 ;
10123 return 0;
10124}
10125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010126if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010127 ac_cv_lib_bsd_openpty=yes
10128else
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010131rm -f core conftest.err conftest.$ac_objext \
10132 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010133LIBS=$ac_check_lib_save_LIBS
10134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10136$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010137if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010138 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010139 LIBS="$LIBS -lbsd"
10140fi
10141
10142
10143fi
10144
Fred Drake8cef4cf2000-06-28 16:40:38 +000010145
10146fi
10147done
10148
10149for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010150do :
10151 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010152if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010153 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010154#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010155_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010156
Fred Drake8cef4cf2000-06-28 16:40:38 +000010157else
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10159$as_echo_n "checking for forkpty in -lutil... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010160if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010161 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010162else
Martin v. Löwis11437992002-04-12 09:54:03 +000010163 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010164LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010168/* Override any GCC internal prototype to avoid an error.
10169 Use char because int might match the return type of a GCC
10170 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010171#ifdef __cplusplus
10172extern "C"
10173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010174char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010175int
10176main ()
10177{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010179 ;
10180 return 0;
10181}
10182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010183if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010184 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010185else
Matthias Kloseb9621712010-04-24 17:59:49 +000010186 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010188rm -f core conftest.err conftest.$ac_objext \
10189 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010190LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10193$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010194if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010196 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010197else
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10199$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010200if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010202else
10203 ac_check_lib_save_LIBS=$LIBS
10204LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010206/* end confdefs.h. */
10207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010208/* Override any GCC internal prototype to avoid an error.
10209 Use char because int might match the return type of a GCC
10210 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010211#ifdef __cplusplus
10212extern "C"
10213#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010214char forkpty ();
10215int
10216main ()
10217{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010219 ;
10220 return 0;
10221}
10222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010223if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010224 ac_cv_lib_bsd_forkpty=yes
10225else
Matthias Kloseb9621712010-04-24 17:59:49 +000010226 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010228rm -f core conftest.err conftest.$ac_objext \
10229 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010230LIBS=$ac_check_lib_save_LIBS
10231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10233$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010234if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010236 LIBS="$LIBS -lbsd"
10237fi
10238
10239
10240fi
10241
Fred Drake8cef4cf2000-06-28 16:40:38 +000010242
10243fi
10244done
10245
Jack Jansendd19cf82001-12-06 22:36:17 +000010246
Christian Heimesb186d002008-03-18 15:15:01 +000010247# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010248for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010249do :
10250 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010251if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010252 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010253#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010254_ACEOF
10255
10256fi
10257done
10258
10259
Michael W. Hudson54241132001-12-07 15:38:26 +000010260# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010261for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010262do :
10263 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10264ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010265if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010267#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010268_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010269
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010270fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010271done
10272
Michael W. Hudson54241132001-12-07 15:38:26 +000010273
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010274ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010275if test "x$ac_cv_func_dup2" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010276 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010277
Martin v. Löwis1142de32002-03-29 16:28:31 +000010278else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279 case " $LIBOBJS " in
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010280 *" dup2.$ac_objext "* ) ;;
10281 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010283esac
10284
Martin v. Löwis1142de32002-03-29 16:28:31 +000010285fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010286
10287ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010288if test "x$ac_cv_func_getcwd" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010289 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10290
10291else
10292 case " $LIBOBJS " in
10293 *" getcwd.$ac_objext "* ) ;;
10294 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10295 ;;
10296esac
10297
10298fi
10299
10300ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010301if test "x$ac_cv_func_strdup" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010302 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10303
10304else
10305 case " $LIBOBJS " in
10306 *" strdup.$ac_objext "* ) ;;
10307 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10308 ;;
10309esac
10310
10311fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010312
10313
10314for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010315do :
10316 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010317if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010319#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010322/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010323#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010324int
10325main ()
10326{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010327getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 ;
10329 return 0;
10330}
10331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010333
Matthias Kloseb9621712010-04-24 17:59:49 +000010334$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010335
Guido van Rossum627b2d71993-12-24 10:39:16 +000010336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010338
Guido van Rossum627b2d71993-12-24 10:39:16 +000010339fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010340done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010341
Jack Jansen150753c2003-03-29 22:07:47 +000010342for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010343do :
10344 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010345if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010346 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010347#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010350/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010351#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010352int
10353main ()
10354{
10355setpgrp(0,0);
10356 ;
10357 return 0;
10358}
10359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010360if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010361
Matthias Kloseb9621712010-04-24 17:59:49 +000010362$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010363
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010366
10367fi
10368done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010369
Thomas Wouters3a584202000-08-05 23:28:51 +000010370for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010371do :
10372 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010373if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010375#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010378/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010379#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010380int
10381main ()
10382{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010383gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 ;
10385 return 0;
10386}
10387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010388if ac_fn_c_try_compile "$LINENO"; then :
10389
Guido van Rossum627b2d71993-12-24 10:39:16 +000010390else
Skip Montanaro6dead952003-09-25 14:50:04 +000010391
Matthias Kloseb9621712010-04-24 17:59:49 +000010392$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010393
Martin v. Löwis11437992002-04-12 09:54:03 +000010394
Guido van Rossum627b2d71993-12-24 10:39:16 +000010395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010397
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010398fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010399done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010400
Michael W. Hudson54241132001-12-07 15:38:26 +000010401
Matthias Kloseb9621712010-04-24 17:59:49 +000010402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10403$as_echo_n "checking for major... " >&6; }
10404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010405/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010406
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010407#if defined(MAJOR_IN_MKDEV)
10408#include <sys/mkdev.h>
10409#elif defined(MAJOR_IN_SYSMACROS)
10410#include <sys/sysmacros.h>
10411#else
10412#include <sys/types.h>
10413#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010414
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010415int
10416main ()
10417{
10418
10419 makedev(major(0),minor(0));
10420
10421 ;
10422 return 0;
10423}
10424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010425if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010426
10427
Matthias Kloseb9621712010-04-24 17:59:49 +000010428$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010429
Matthias Kloseb9621712010-04-24 17:59:49 +000010430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10431$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010432
10433else
Skip Montanaro6dead952003-09-25 14:50:04 +000010434
Matthias Kloseb9621712010-04-24 17:59:49 +000010435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10436$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010437
10438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010439rm -f core conftest.err conftest.$ac_objext \
10440 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010441
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010442# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010443# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10445$as_echo_n "checking for getaddrinfo... " >&6; }
10446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010447/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010448
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010449#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010450#include <sys/socket.h>
10451#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010452#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010453
Martin v. Löwis11437992002-04-12 09:54:03 +000010454int
10455main ()
10456{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010457getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010458 ;
10459 return 0;
10460}
10461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010462if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010463 have_getaddrinfo=yes
10464else
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010467rm -f core conftest.err conftest.$ac_objext \
10468 conftest$ac_exeext conftest.$ac_ext
10469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10470$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010471if test $have_getaddrinfo = yes
10472then
Matthias Kloseb9621712010-04-24 17:59:49 +000010473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10474$as_echo_n "checking getaddrinfo bug... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010475 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010476 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010477else
Matthias Kloseb9621712010-04-24 17:59:49 +000010478 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010479 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010480else
Matthias Kloseb9621712010-04-24 17:59:49 +000010481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010482/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010483
10484#include <sys/types.h>
10485#include <netdb.h>
10486#include <string.h>
10487#include <sys/socket.h>
10488#include <netinet/in.h>
10489
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010490int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010491{
10492 int passive, gaierr, inet4 = 0, inet6 = 0;
10493 struct addrinfo hints, *ai, *aitop;
10494 char straddr[INET6_ADDRSTRLEN], strport[16];
10495
10496 for (passive = 0; passive <= 1; passive++) {
10497 memset(&hints, 0, sizeof(hints));
10498 hints.ai_family = AF_UNSPEC;
10499 hints.ai_flags = passive ? AI_PASSIVE : 0;
10500 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010501 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010502 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10503 (void)gai_strerror(gaierr);
10504 goto bad;
10505 }
10506 for (ai = aitop; ai; ai = ai->ai_next) {
10507 if (ai->ai_addr == NULL ||
10508 ai->ai_addrlen == 0 ||
10509 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10510 straddr, sizeof(straddr), strport, sizeof(strport),
10511 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10512 goto bad;
10513 }
10514 switch (ai->ai_family) {
10515 case AF_INET:
10516 if (strcmp(strport, "54321") != 0) {
10517 goto bad;
10518 }
10519 if (passive) {
10520 if (strcmp(straddr, "0.0.0.0") != 0) {
10521 goto bad;
10522 }
10523 } else {
10524 if (strcmp(straddr, "127.0.0.1") != 0) {
10525 goto bad;
10526 }
10527 }
10528 inet4++;
10529 break;
10530 case AF_INET6:
10531 if (strcmp(strport, "54321") != 0) {
10532 goto bad;
10533 }
10534 if (passive) {
10535 if (strcmp(straddr, "::") != 0) {
10536 goto bad;
10537 }
10538 } else {
10539 if (strcmp(straddr, "::1") != 0) {
10540 goto bad;
10541 }
10542 }
10543 inet6++;
10544 break;
10545 case AF_UNSPEC:
10546 goto bad;
10547 break;
10548 default:
10549 /* another family support? */
10550 break;
10551 }
10552 }
10553 }
10554
10555 if (!(inet4 == 0 || inet4 == 2))
10556 goto bad;
10557 if (!(inet6 == 0 || inet6 == 2))
10558 goto bad;
10559
10560 if (aitop)
10561 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010562 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010563
10564 bad:
10565 if (aitop)
10566 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010567 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010568}
10569
Martin v. Löwis11437992002-04-12 09:54:03 +000010570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010571if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010572 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010573else
Matthias Kloseb9621712010-04-24 17:59:49 +000010574 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10577 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010579
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010580fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010581
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10585$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10586
Mark Dickinson2df5d282009-12-31 21:22:50 +000010587if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010588then
10589 if test $ipv6 = yes
10590 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010591 echo 'Fatal: You must get working getaddrinfo() function.'
10592 echo ' or you can specify "--disable-ipv6"'.
10593 exit 1
10594 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010595else
Martin v. Löwis11437992002-04-12 09:54:03 +000010596
Matthias Kloseb9621712010-04-24 17:59:49 +000010597$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010598
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010599fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010600
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010601for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010602do :
10603 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010604if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010606#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010607_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010608
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010609fi
10610done
10611
Michael W. Hudson54241132001-12-07 15:38:26 +000010612
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010613# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10615$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010616if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010618else
Matthias Kloseb9621712010-04-24 17:59:49 +000010619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010620/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010621#include <sys/types.h>
10622#include <sys/time.h>
10623#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010624
Martin v. Löwis11437992002-04-12 09:54:03 +000010625int
10626main ()
10627{
10628if ((struct tm *) 0)
10629return 0;
10630 ;
10631 return 0;
10632}
10633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010634if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010635 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010636else
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10642$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010643if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010644
Matthias Kloseb9621712010-04-24 17:59:49 +000010645$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010646
10647fi
10648
Matthias Kloseb9621712010-04-24 17:59:49 +000010649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10650$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010651if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010653else
Matthias Kloseb9621712010-04-24 17:59:49 +000010654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010655/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010656#include <sys/types.h>
10657#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010658
Martin v. Löwis11437992002-04-12 09:54:03 +000010659int
10660main ()
10661{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010662struct tm tm;
10663 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010665 ;
10666 return 0;
10667}
10668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010669if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010670 ac_cv_struct_tm=time.h
10671else
Matthias Kloseb9621712010-04-24 17:59:49 +000010672 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010675fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10677$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010678if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010679
Matthias Kloseb9621712010-04-24 17:59:49 +000010680$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010681
10682fi
10683
Matthias Kloseb9621712010-04-24 17:59:49 +000010684ac_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 +000010685#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010686
Matthias Kloseb9621712010-04-24 17:59:49 +000010687"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010688if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010689
10690cat >>confdefs.h <<_ACEOF
10691#define HAVE_STRUCT_TM_TM_ZONE 1
10692_ACEOF
10693
10694
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010695fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010696
Martin v. Löwis11437992002-04-12 09:54:03 +000010697if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10698
Matthias Kloseb9621712010-04-24 17:59:49 +000010699$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010700
10701else
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10703"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010704if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010706else
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010708fi
10709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010710cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010711#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010712_ACEOF
10713
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10715$as_echo_n "checking for tzname... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010716if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718else
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010720/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010721#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010722#if !HAVE_DECL_TZNAME
10723extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010724#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010725
Martin v. Löwis11437992002-04-12 09:54:03 +000010726int
10727main ()
10728{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010729return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010730 ;
10731 return 0;
10732}
10733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010734if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010735 ac_cv_var_tzname=yes
10736else
Matthias Kloseb9621712010-04-24 17:59:49 +000010737 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010739rm -f core conftest.err conftest.$ac_objext \
10740 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10743$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010744 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010745
Matthias Kloseb9621712010-04-24 17:59:49 +000010746$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010747
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010748 fi
10749fi
10750
Matthias Kloseb9621712010-04-24 17:59:49 +000010751ac_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 +000010752if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010753
10754cat >>confdefs.h <<_ACEOF
10755#define HAVE_STRUCT_STAT_ST_RDEV 1
10756_ACEOF
10757
10758
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010759fi
10760
Matthias Kloseb9621712010-04-24 17:59:49 +000010761ac_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 +000010762if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010763
Martin v. Löwis11437992002-04-12 09:54:03 +000010764cat >>confdefs.h <<_ACEOF
10765#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10766_ACEOF
10767
10768
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010769fi
10770
Matthias Kloseb9621712010-04-24 17:59:49 +000010771ac_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 +000010772if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010773
10774cat >>confdefs.h <<_ACEOF
10775#define HAVE_STRUCT_STAT_ST_FLAGS 1
10776_ACEOF
10777
10778
10779fi
10780
Matthias Kloseb9621712010-04-24 17:59:49 +000010781ac_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 +000010782if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010783
10784cat >>confdefs.h <<_ACEOF
10785#define HAVE_STRUCT_STAT_ST_GEN 1
10786_ACEOF
10787
10788
10789fi
10790
Matthias Kloseb9621712010-04-24 17:59:49 +000010791ac_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 +000010792if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010793
10794cat >>confdefs.h <<_ACEOF
10795#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10796_ACEOF
10797
10798
10799fi
10800
Matthias Kloseb9621712010-04-24 17:59:49 +000010801ac_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 +000010802if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010803
Martin v. Löwis11437992002-04-12 09:54:03 +000010804cat >>confdefs.h <<_ACEOF
10805#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10806_ACEOF
10807
10808
Matthias Kloseb9621712010-04-24 17:59:49 +000010809$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010810
10811else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010812 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010813 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010814 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10815 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010816esac
10817
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010818fi
10819
Michael W. Hudson54241132001-12-07 15:38:26 +000010820
Martin v. Löwis11437992002-04-12 09:54:03 +000010821
Matthias Kloseb9621712010-04-24 17:59:49 +000010822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10823$as_echo_n "checking for time.h that defines altzone... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010824if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010826else
Matthias Kloseb159a552010-04-25 21:00:44 +000010827
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010829/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010830#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010831int
10832main ()
10833{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010834return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010835 ;
10836 return 0;
10837}
10838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010839if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010840 ac_cv_header_time_altzone=yes
10841else
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010846fi
10847
Matthias Kloseb9621712010-04-24 17:59:49 +000010848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10849$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010850if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010851
Matthias Kloseb9621712010-04-24 17:59:49 +000010852$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010853
10854fi
10855
Guido van Rossumda88dad1995-01-26 00:46:29 +000010856was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10858$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010860/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010861
10862#include <sys/types.h>
10863#include <sys/select.h>
10864#include <sys/time.h>
10865
Martin v. Löwis11437992002-04-12 09:54:03 +000010866int
10867main ()
10868{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010869;
Martin v. Löwis11437992002-04-12 09:54:03 +000010870 ;
10871 return 0;
10872}
10873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010874if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010875
10876
Matthias Kloseb9621712010-04-24 17:59:49 +000010877$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010878
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010879 was_it_defined=yes
10880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10884$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010885
Matthias Kloseb9621712010-04-24 17:59:49 +000010886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10887$as_echo_n "checking for addrinfo... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010888if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010890else
Matthias Kloseb9621712010-04-24 17:59:49 +000010891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010892/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010893#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010894int
10895main ()
10896{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010897struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010898 ;
10899 return 0;
10900}
10901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010902if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010903 ac_cv_struct_addrinfo=yes
10904else
Matthias Kloseb9621712010-04-24 17:59:49 +000010905 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10908fi
10909
Matthias Kloseb9621712010-04-24 17:59:49 +000010910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10911$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010912if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010913
Matthias Kloseb9621712010-04-24 17:59:49 +000010914$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010915
10916fi
10917
Matthias Kloseb9621712010-04-24 17:59:49 +000010918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10919$as_echo_n "checking for sockaddr_storage... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010920if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010921 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010922else
Matthias Kloseb9621712010-04-24 17:59:49 +000010923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010924/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010925
10926# include <sys/types.h>
10927# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010928int
10929main ()
10930{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010931struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010932 ;
10933 return 0;
10934}
10935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010936if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010937 ac_cv_struct_sockaddr_storage=yes
10938else
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10942fi
10943
Matthias Kloseb9621712010-04-24 17:59:49 +000010944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10945$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010946if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010947
Matthias Kloseb9621712010-04-24 17:59:49 +000010948$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010949
10950fi
10951
Guido van Rossum627b2d71993-12-24 10:39:16 +000010952# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010953
Matthias Kloseb9621712010-04-24 17:59:49 +000010954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10955$as_echo_n "checking whether char is unsigned... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010956if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010958else
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010961$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010962int
10963main ()
10964{
10965static int test_array [1 - 2 * !(((char) -1) < 0)];
10966test_array [0] = 0
10967
10968 ;
10969 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010970}
Martin v. Löwis11437992002-04-12 09:54:03 +000010971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010972if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010973 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010974else
Matthias Kloseb9621712010-04-24 17:59:49 +000010975 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10980$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010981if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010982 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010983
10984fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010985
Matthias Kloseb9621712010-04-24 17:59:49 +000010986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10987$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000010988if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010990else
Matthias Kloseb9621712010-04-24 17:59:49 +000010991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010992/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010993
Martin v. Löwis11437992002-04-12 09:54:03 +000010994int
10995main ()
10996{
10997/* FIXME: Include the comments suggested by Paul. */
10998#ifndef __cplusplus
10999 /* Ultrix mips cc rejects this. */
11000 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011003 char const *const *pcpcc;
11004 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011005 /* NEC SVR4.0.2 mips cc rejects this. */
11006 struct point {int x, y;};
11007 static struct point const zero = {0,0};
11008 /* AIX XL C 1.02.0.0 rejects this.
11009 It does not let you subtract one const X* pointer from another in
11010 an arm of an if-expression whose if-part is not a constant
11011 expression */
11012 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011013 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011015 ++pcpcc;
11016 ppc = (char**) pcpcc;
11017 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011018 { /* SCO 3.2v4 cc rejects this. */
11019 char *t;
11020 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011021
Martin v. Löwis11437992002-04-12 09:54:03 +000011022 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011023 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011024 }
11025 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11026 int x[] = {25, 17};
11027 const int *foo = &x[0];
11028 ++foo;
11029 }
11030 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11031 typedef const int *iptr;
11032 iptr p = 0;
11033 ++p;
11034 }
11035 { /* AIX XL C 1.02.0.0 rejects this saying
11036 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11037 struct s { int j; const int *ap[3]; };
11038 struct s *b; b->j = 5;
11039 }
11040 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11041 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011042 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011043 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011044 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011045#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011046
Martin v. Löwis11437992002-04-12 09:54:03 +000011047 ;
11048 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011049}
Martin v. Löwis11437992002-04-12 09:54:03 +000011050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011051if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011052 ac_cv_c_const=yes
11053else
Matthias Kloseb9621712010-04-24 17:59:49 +000011054 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11059$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011060if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011061
Matthias Kloseb9621712010-04-24 17:59:49 +000011062$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011063
11064fi
11065
Michael W. Hudson54241132001-12-07 15:38:26 +000011066
Guido van Rossumda88dad1995-01-26 00:46:29 +000011067works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11069$as_echo_n "checking for working volatile... " >&6; }
11070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011071/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011072
Martin v. Löwis11437992002-04-12 09:54:03 +000011073int
11074main ()
11075{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011076volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011077 ;
11078 return 0;
11079}
11080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011081if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011082 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011083else
Skip Montanaro6dead952003-09-25 14:50:04 +000011084
Matthias Kloseb9621712010-04-24 17:59:49 +000011085$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011086
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011087
Guido van Rossum627b2d71993-12-24 10:39:16 +000011088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11091$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011092
Guido van Rossumda88dad1995-01-26 00:46:29 +000011093works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11095$as_echo_n "checking for working signed char... " >&6; }
11096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011097/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011098
Martin v. Löwis11437992002-04-12 09:54:03 +000011099int
11100main ()
11101{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011102signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011103 ;
11104 return 0;
11105}
11106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011107if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011108 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011109else
Skip Montanaro6dead952003-09-25 14:50:04 +000011110
Matthias Kloseb9621712010-04-24 17:59:49 +000011111$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011112
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011113
Guido van Rossum7f43da71994-08-01 12:15:30 +000011114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11117$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011118
Guido van Rossumda88dad1995-01-26 00:46:29 +000011119have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11121$as_echo_n "checking for prototypes... " >&6; }
11122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011123/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011124int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011125int
11126main ()
11127{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011128return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011129 ;
11130 return 0;
11131}
11132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011133if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011134
Matthias Kloseb9621712010-04-24 17:59:49 +000011135$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011136
Matthias Kloseb159a552010-04-25 21:00:44 +000011137 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11141$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011142
Guido van Rossumda88dad1995-01-26 00:46:29 +000011143works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11145$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011147/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011148
11149#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011150int foo(int x, ...) {
11151 va_list va;
11152 va_start(va, x);
11153 va_arg(va, int);
11154 va_arg(va, char *);
11155 va_arg(va, double);
11156 return 0;
11157}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011158
Martin v. Löwis11437992002-04-12 09:54:03 +000011159int
11160main ()
11161{
Guido van Rossum90eea071996-08-30 20:58:57 +000011162return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011163 ;
11164 return 0;
11165}
11166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011167if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011168
11169
Matthias Kloseb9621712010-04-24 17:59:49 +000011170$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011171
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011172 works=yes
11173
Guido van Rossum627b2d71993-12-24 10:39:16 +000011174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11177$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011178
Martin v. Löwisd6320502004-08-12 13:45:08 +000011179# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11181$as_echo_n "checking for socketpair... " >&6; }
11182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011183/* end confdefs.h. */
11184
11185#include <sys/types.h>
11186#include <sys/socket.h>
11187
11188int
11189main ()
11190{
11191void *x=socketpair
11192 ;
11193 return 0;
11194}
11195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011196if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011197
Matthias Kloseb9621712010-04-24 17:59:49 +000011198$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011199
Matthias Kloseb159a552010-04-25 21:00:44 +000011200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011201$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011202else
Matthias Kloseb9621712010-04-24 17:59:49 +000011203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11204$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011205
11206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011208
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011209# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11211$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011213/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011214#include <sys/types.h>
11215#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011216int
11217main ()
11218{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011219struct sockaddr x;
11220x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011221 ;
11222 return 0;
11223}
11224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011225if ac_fn_c_try_compile "$LINENO"; then :
11226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11227$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011228
Matthias Kloseb9621712010-04-24 17:59:49 +000011229$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011230
11231else
Matthias Kloseb9621712010-04-24 17:59:49 +000011232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11233$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011234
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011237
Guido van Rossumda88dad1995-01-26 00:46:29 +000011238va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11240$as_echo_n "checking whether va_list is an array... " >&6; }
11241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011242/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011243
11244#ifdef HAVE_STDARG_PROTOTYPES
11245#include <stdarg.h>
11246#else
11247#include <varargs.h>
11248#endif
11249
Martin v. Löwis11437992002-04-12 09:54:03 +000011250int
11251main ()
11252{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011253va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011254 ;
11255 return 0;
11256}
11257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011258if ac_fn_c_try_compile "$LINENO"; then :
11259
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011260else
Skip Montanaro6dead952003-09-25 14:50:04 +000011261
Martin v. Löwis11437992002-04-12 09:54:03 +000011262
Matthias Kloseb9621712010-04-24 17:59:49 +000011263$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011264
Guido van Rossumda88dad1995-01-26 00:46:29 +000011265 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011266
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11270$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011271
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011272# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011273
11274
Matthias Kloseb9621712010-04-24 17:59:49 +000011275ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011276if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011277
Matthias Kloseb9621712010-04-24 17:59:49 +000011278 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011279
Matthias Kloseb9621712010-04-24 17:59:49 +000011280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11281$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011282 OLD_CFLAGS=$CFLAGS
11283 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011285/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011286
11287# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011288
Martin v. Löwis11437992002-04-12 09:54:03 +000011289int
11290main ()
11291{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011292
11293 char *name;
11294 struct hostent *he, *res;
11295 char buffer[2048];
11296 int buflen = 2048;
11297 int h_errnop;
11298
11299 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011300
11301 ;
11302 return 0;
11303}
11304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011306
Matthias Kloseb9621712010-04-24 17:59:49 +000011307 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011308
Martin v. Löwis11437992002-04-12 09:54:03 +000011309
Matthias Kloseb9621712010-04-24 17:59:49 +000011310$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011311
Matthias Kloseb9621712010-04-24 17:59:49 +000011312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11313$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011314
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011315else
Skip Montanaro6dead952003-09-25 14:50:04 +000011316
Matthias Kloseb9621712010-04-24 17:59:49 +000011317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11318$as_echo "no" >&6; }
11319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11320$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011322/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011323
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011324# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011325
Martin v. Löwis11437992002-04-12 09:54:03 +000011326int
11327main ()
11328{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011329
11330 char *name;
11331 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011332 char buffer[2048];
11333 int buflen = 2048;
11334 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011335
Matthias Kloseb159a552010-04-25 21:00:44 +000011336 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011337
11338 ;
11339 return 0;
11340}
11341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011342if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011343
Matthias Kloseb9621712010-04-24 17:59:49 +000011344 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011345
Martin v. Löwis11437992002-04-12 09:54:03 +000011346
Matthias Kloseb159a552010-04-25 21:00:44 +000011347$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011348
Matthias Kloseb9621712010-04-24 17:59:49 +000011349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11350$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011351
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011352else
Skip Montanaro6dead952003-09-25 14:50:04 +000011353
Matthias Kloseb9621712010-04-24 17:59:49 +000011354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11355$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11357$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11359/* end confdefs.h. */
11360
11361# include <netdb.h>
11362
11363int
11364main ()
11365{
11366
11367 char *name;
11368 struct hostent *he;
11369 struct hostent_data data;
11370
11371 (void) gethostbyname_r(name, he, &data);
11372
11373 ;
11374 return 0;
11375}
11376_ACEOF
11377if ac_fn_c_try_compile "$LINENO"; then :
11378
11379 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11380
11381
11382$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11383
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11385$as_echo "yes" >&6; }
11386
11387else
11388
11389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11390$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011391
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011394
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011397
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011400 CFLAGS=$OLD_CFLAGS
11401
11402else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011403
Matthias Kloseb9621712010-04-24 17:59:49 +000011404 for ac_func in gethostbyname
11405do :
11406 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011407if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011409#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011410_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011411
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011412fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011413done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011414
Michael W. Hudson54241132001-12-07 15:38:26 +000011415
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011416fi
11417
Michael W. Hudson54241132001-12-07 15:38:26 +000011418
11419
11420
11421
11422
11423
Guido van Rossum627b2d71993-12-24 10:39:16 +000011424# checks for system services
11425# (none yet)
11426
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011427# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011428ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011429if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011430
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011431else
Matthias Kloseb9621712010-04-24 17:59:49 +000011432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11433$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011434if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011435 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011436else
Martin v. Löwis11437992002-04-12 09:54:03 +000011437 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011438LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011442/* Override any GCC internal prototype to avoid an error.
11443 Use char because int might match the return type of a GCC
11444 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011445#ifdef __cplusplus
11446extern "C"
11447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011448char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011449int
11450main ()
11451{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011452return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011453 ;
11454 return 0;
11455}
11456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011458 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011459else
Matthias Kloseb9621712010-04-24 17:59:49 +000011460 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011462rm -f core conftest.err conftest.$ac_objext \
11463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011464LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11467$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011468if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 cat >>confdefs.h <<_ACEOF
11470#define HAVE_LIBIEEE 1
11471_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011472
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011473 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011474
Guido van Rossum627b2d71993-12-24 10:39:16 +000011475fi
11476
Michael W. Hudson54241132001-12-07 15:38:26 +000011477
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011478fi
11479
Michael W. Hudson54241132001-12-07 15:38:26 +000011480
Guido van Rossum7f253911997-05-09 02:42:48 +000011481# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11483$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011486if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011487 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011488if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011489then
11490
Matthias Kloseb9621712010-04-24 17:59:49 +000011491$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011492
Matthias Kloseb9621712010-04-24 17:59:49 +000011493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11494$as_echo "yes" >&6; }
11495else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11496$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011497fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011498else
Matthias Kloseb9621712010-04-24 17:59:49 +000011499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11500$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011501fi
11502
Guido van Rossum7f253911997-05-09 02:42:48 +000011503
Guido van Rossum7f43da71994-08-01 12:15:30 +000011504# check for --with-libm=...
11505
Guido van Rossum563e7081996-09-10 18:20:48 +000011506case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011507Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011508*) LIBM=-lm
11509esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11511$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011514if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011515 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011516if test "$withval" = no
11517then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11519$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011520elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011521then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11523$as_echo "set LIBM=\"$withval\"" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011524else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011525fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011526else
Matthias Kloseb9621712010-04-24 17:59:49 +000011527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11528$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529fi
11530
Guido van Rossum7f43da71994-08-01 12:15:30 +000011531
11532# check for --with-libc=...
11533
Matthias Kloseb9621712010-04-24 17:59:49 +000011534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11535$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011537# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011538if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011539 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011540if test "$withval" = no
11541then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11543$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011544elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011545then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11547$as_echo "set LIBC=\"$withval\"" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011548else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011549fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011550else
Matthias Kloseb9621712010-04-24 17:59:49 +000011551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11552$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011553fi
11554
Guido van Rossum7f43da71994-08-01 12:15:30 +000011555
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011556# **************************************************
11557# * Check for various properties of floating point *
11558# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011559
Matthias Kloseb9621712010-04-24 17:59:49 +000011560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11561$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011562if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011563 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011564else
11565
Matthias Kloseb9621712010-04-24 17:59:49 +000011566if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011567 ac_cv_little_endian_double=no
11568else
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011570/* end confdefs.h. */
11571
11572#include <string.h>
11573int main() {
11574 double x = 9006104071832581.0;
11575 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11576 return 0;
11577 else
11578 return 1;
11579}
11580
11581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011582if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011583 ac_cv_little_endian_double=yes
11584else
Matthias Kloseb9621712010-04-24 17:59:49 +000011585 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011586fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11588 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011589fi
11590
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011591fi
11592
Matthias Kloseb9621712010-04-24 17:59:49 +000011593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11594$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011595if test "$ac_cv_little_endian_double" = yes
11596then
11597
Matthias Kloseb9621712010-04-24 17:59:49 +000011598$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011599
11600fi
11601
Matthias Kloseb9621712010-04-24 17:59:49 +000011602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11603$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011604if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011605 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011606else
11607
Matthias Kloseb9621712010-04-24 17:59:49 +000011608if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011609 ac_cv_big_endian_double=no
11610else
Matthias Kloseb9621712010-04-24 17:59:49 +000011611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011612/* end confdefs.h. */
11613
11614#include <string.h>
11615int main() {
11616 double x = 9006104071832581.0;
11617 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11618 return 0;
11619 else
11620 return 1;
11621}
11622
11623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011624if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011625 ac_cv_big_endian_double=yes
11626else
Matthias Kloseb9621712010-04-24 17:59:49 +000011627 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011628fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11630 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011631fi
11632
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011633fi
11634
Matthias Kloseb9621712010-04-24 17:59:49 +000011635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11636$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011637if test "$ac_cv_big_endian_double" = yes
11638then
11639
Matthias Kloseb9621712010-04-24 17:59:49 +000011640$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011641
11642fi
11643
11644# Some ARM platforms use a mixed-endian representation for doubles.
11645# While Python doesn't currently have full support for these platforms
11646# (see e.g., issue 1762561), we can at least make sure that float <-> string
11647# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11649$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011650if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011651 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011652else
11653
Matthias Kloseb9621712010-04-24 17:59:49 +000011654if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011655 ac_cv_mixed_endian_double=no
11656else
Matthias Kloseb9621712010-04-24 17:59:49 +000011657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011658/* end confdefs.h. */
11659
11660#include <string.h>
11661int main() {
11662 double x = 9006104071832581.0;
11663 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11664 return 0;
11665 else
11666 return 1;
11667}
11668
11669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011670if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011671 ac_cv_mixed_endian_double=yes
11672else
Matthias Kloseb9621712010-04-24 17:59:49 +000011673 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011677fi
11678
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011679fi
11680
Matthias Kloseb9621712010-04-24 17:59:49 +000011681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11682$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011683if test "$ac_cv_mixed_endian_double" = yes
11684then
11685
Matthias Kloseb9621712010-04-24 17:59:49 +000011686$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011687
11688fi
11689
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011690# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011691# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011692# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011693# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011694# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011695# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011696
11697# This inline assembler syntax may also work for suncc and icc,
11698# so we try it on all platforms.
11699
Matthias Kloseb9621712010-04-24 17:59:49 +000011700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11701$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011703/* end confdefs.h. */
11704
11705int
11706main ()
11707{
11708
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011709 unsigned short cw;
11710 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11711 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011712
11713 ;
11714 return 0;
11715}
11716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011717if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011718 have_gcc_asm_for_x87=yes
11719else
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011721fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11724$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011725if test "$have_gcc_asm_for_x87" = yes
11726then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011727
Matthias Kloseb9621712010-04-24 17:59:49 +000011728$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011729
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011730fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011731
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011732# Detect whether system arithmetic is subject to x87-style double
11733# rounding issues. The result of this test has little meaning on non
11734# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11735# mode is round-to-nearest and double rounding issues are present, and
11736# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11738$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011739# $BASECFLAGS may affect the result
11740ac_save_cc="$CC"
11741CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011742if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011743 ac_cv_x87_double_rounding=no
11744else
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011746/* end confdefs.h. */
11747
11748#include <stdlib.h>
11749#include <math.h>
11750int main() {
11751 volatile double x, y, z;
11752 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11753 x = 0.99999999999999989; /* 1-2**-53 */
11754 y = 1./x;
11755 if (y != 1.)
11756 exit(0);
11757 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11758 x = 1e16;
11759 y = 2.99999;
11760 z = x + y;
11761 if (z != 1e16+4.)
11762 exit(0);
11763 /* both tests show evidence of double rounding */
11764 exit(1);
11765}
11766
11767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011768if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011769 ac_cv_x87_double_rounding=no
11770else
Matthias Kloseb9621712010-04-24 17:59:49 +000011771 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11774 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011775fi
11776
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011777CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11779$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011780if test "$ac_cv_x87_double_rounding" = yes
11781then
11782
Matthias Kloseb9621712010-04-24 17:59:49 +000011783$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011784
11785fi
11786
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011787# ************************************
11788# * Check for mathematical functions *
11789# ************************************
11790
11791LIBS_SAVE=$LIBS
11792LIBS="$LIBS $LIBM"
11793
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011794for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11795do :
11796 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11797ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11798if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11799 cat >>confdefs.h <<_ACEOF
11800#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11801_ACEOF
11802
11803fi
11804done
11805
11806for ac_func in hypot lgamma log1p round tgamma
11807do :
11808 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11809ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11810if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11811 cat >>confdefs.h <<_ACEOF
11812#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11813_ACEOF
11814
11815fi
11816done
11817
11818ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11819"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011820if test "x$ac_cv_have_decl_isinf" = 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_ISINF $ac_have_decl
11828_ACEOF
11829ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11830"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011831if test "x$ac_cv_have_decl_isnan" = 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_ISNAN $ac_have_decl
11839_ACEOF
11840ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11841"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011842if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011843 ac_have_decl=1
11844else
11845 ac_have_decl=0
11846fi
11847
11848cat >>confdefs.h <<_ACEOF
11849#define HAVE_DECL_ISFINITE $ac_have_decl
11850_ACEOF
11851
11852
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011853# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11854# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11856$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011857if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011859else
11860
Matthias Kloseb9621712010-04-24 17:59:49 +000011861if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011862 ac_cv_tanh_preserves_zero_sign=no
11863else
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011865/* end confdefs.h. */
11866
11867#include <math.h>
11868#include <stdlib.h>
11869int main() {
11870 /* return 0 if either negative zeros don't exist
11871 on this platform or if negative zeros exist
11872 and tanh(-0.) == -0. */
11873 if (atan2(0., -1.) == atan2(-0., -1.) ||
11874 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11875 else exit(1);
11876}
11877
11878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011879if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011880 ac_cv_tanh_preserves_zero_sign=yes
11881else
Matthias Kloseb9621712010-04-24 17:59:49 +000011882 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011886fi
11887
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011888fi
11889
Matthias Kloseb9621712010-04-24 17:59:49 +000011890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11891$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011892if test "$ac_cv_tanh_preserves_zero_sign" = yes
11893then
11894
Matthias Kloseb9621712010-04-24 17:59:49 +000011895$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011896
11897fi
11898
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011899if test "$ac_cv_func_log1p" = yes
11900then
11901 # On some versions of AIX, log1p(-0.) returns 0. instead of
11902 # -0. See issue #9920.
11903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11904$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011905 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011906 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011907else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011908
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011909 if test "$cross_compiling" = yes; then :
11910 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011911else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11913/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011914
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011915 #include <math.h>
11916 #include <stdlib.h>
11917 int main() {
11918 /* Fail if the signs of log1p(-0.) and -0. can be
11919 distinguished. */
11920 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11921 return 0;
11922 else
11923 return 1;
11924 }
11925
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011926_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011927if ac_fn_c_try_run "$LINENO"; then :
11928 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011929else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011930 ac_cv_log1p_drops_zero_sign=yes
11931fi
11932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11933 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011934fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011935
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011936fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011937
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
11939$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
11940fi
11941if test "$ac_cv_log1p_drops_zero_sign" = yes
11942then
11943
11944$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
11945
11946fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011947
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011948LIBS=$LIBS_SAVE
11949
Mark Dickinsona614f042009-11-28 12:48:43 +000011950# For multiprocessing module, check that sem_open
11951# actually works. For FreeBSD versions <= 7.2,
11952# the kernel module that provides POSIX semaphores
11953# isn't loaded by default, so an attempt to call
11954# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11956$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000011957if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011958 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011959else
Matthias Kloseb9621712010-04-24 17:59:49 +000011960 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011961 ac_cv_posix_semaphores_enabled=yes
11962else
Matthias Kloseb9621712010-04-24 17:59:49 +000011963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011964/* end confdefs.h. */
11965
11966#include <unistd.h>
11967#include <fcntl.h>
11968#include <stdio.h>
11969#include <semaphore.h>
11970#include <sys/stat.h>
11971
11972int main(void) {
11973 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11974 if (a == SEM_FAILED) {
11975 perror("sem_open");
11976 return 1;
11977 }
11978 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011979 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011980 return 0;
11981}
11982
11983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011984if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011985 ac_cv_posix_semaphores_enabled=yes
11986else
Matthias Kloseb9621712010-04-24 17:59:49 +000011987 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11990 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011991fi
11992
11993
Mark Dickinsona614f042009-11-28 12:48:43 +000011994fi
11995
Matthias Kloseb9621712010-04-24 17:59:49 +000011996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11997$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011998if test $ac_cv_posix_semaphores_enabled = no
11999then
12000
Matthias Kloseb9621712010-04-24 17:59:49 +000012001$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012002
12003fi
12004
Mark Dickinson10683072009-04-18 21:18:19 +000012005# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12007$as_echo_n "checking for broken sem_getvalue... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012008if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012010else
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012012 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012013else
Matthias Kloseb9621712010-04-24 17:59:49 +000012014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012015/* end confdefs.h. */
12016
12017#include <unistd.h>
12018#include <fcntl.h>
12019#include <stdio.h>
12020#include <semaphore.h>
12021#include <sys/stat.h>
12022
12023int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012024 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012025 int count;
12026 int res;
12027 if(a==SEM_FAILED){
12028 perror("sem_open");
12029 return 1;
12030
12031 }
12032 res = sem_getvalue(a, &count);
12033 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012034 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012035 return res==-1 ? 1 : 0;
12036}
12037
Mark Dickinson10683072009-04-18 21:18:19 +000012038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012039if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012040 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012041else
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12045 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012046fi
12047
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012048
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012049fi
12050
Matthias Kloseb9621712010-04-24 17:59:49 +000012051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12052$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012053if test $ac_cv_broken_sem_getvalue = yes
12054then
12055
Matthias Kloseb9621712010-04-24 17:59:49 +000012056$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012057
12058fi
12059
Mark Dickinsonbd792642009-03-18 20:06:12 +000012060# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12062$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012063# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012064if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012065 enableval=$enable_big_digits; case $enable_big_digits in
12066yes)
12067 enable_big_digits=30 ;;
12068no)
12069 enable_big_digits=15 ;;
1207015|30)
12071 ;;
12072*)
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012073 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 +000012074esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12076$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012077
12078cat >>confdefs.h <<_ACEOF
12079#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12080_ACEOF
12081
12082
12083else
Matthias Kloseb9621712010-04-24 17:59:49 +000012084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12085$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012086fi
12087
12088
Guido van Rossumef2255b2000-03-10 22:30:29 +000012089# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012090ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012091if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012092
12093
Matthias Kloseb9621712010-04-24 17:59:49 +000012094$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012095
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012096 wchar_h="yes"
12097
Guido van Rossumef2255b2000-03-10 22:30:29 +000012098else
Martin v. Löwis11437992002-04-12 09:54:03 +000012099 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012100
12101fi
12102
Michael W. Hudson54241132001-12-07 15:38:26 +000012103
Martin v. Löwis11437992002-04-12 09:54:03 +000012104
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012105# determine wchar_t size
12106if test "$wchar_h" = yes
12107then
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012109# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12110# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12111# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12113$as_echo_n "checking size of wchar_t... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012114if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012116else
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12118"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012119
Martin v. Löwis11437992002-04-12 09:54:03 +000012120else
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 if test "$ac_cv_type_wchar_t" = yes; then
12122 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12123$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012124as_fn_error 77 "cannot compute sizeof (wchar_t)
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012125See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012126 else
12127 ac_cv_sizeof_wchar_t=0
12128 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012130
Martin v. Löwis11437992002-04-12 09:54:03 +000012131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12133$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012134
12135
12136
Martin v. Löwis11437992002-04-12 09:54:03 +000012137cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012138#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012139_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012140
Michael W. Hudson54241132001-12-07 15:38:26 +000012141
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012142fi
12143
Matthias Kloseb9621712010-04-24 17:59:49 +000012144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12145$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012146have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012148/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012149
12150#include <tcl.h>
12151#if TCL_UTF_MAX != 6
12152# error "NOT UCS4_TCL"
12153#endif
12154int
12155main ()
12156{
12157
12158 ;
12159 return 0;
12160}
12161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012162if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012163
12164
Matthias Kloseb9621712010-04-24 17:59:49 +000012165$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012166
12167 have_ucs4_tcl=yes
12168
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12172$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012173
Skip Montanaro6dead952003-09-25 14:50:04 +000012174# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012175if test "$wchar_h" = yes
12176then
12177 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12179$as_echo_n "checking whether wchar_t is signed... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012180 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012182else
12183
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012185 ac_cv_wchar_t_signed=yes
12186else
Matthias Kloseb9621712010-04-24 17:59:49 +000012187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012188/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012189
12190 #include <wchar.h>
12191 int main()
12192 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012193 /* Success: exit code 0 */
12194 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012195 }
12196
12197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012198if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012199 ac_cv_wchar_t_signed=yes
12200else
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12204 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012205fi
12206
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012207fi
12208
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12210$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012211fi
12212
Matthias Kloseb9621712010-04-24 17:59:49 +000012213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12214$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012215
12216# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012217if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012218 withval=$with_wide_unicode;
12219if test "$withval" != no
12220then unicode_size="4"
12221else unicode_size="2"
12222fi
12223
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012224else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012225
Georg Brandl52d168a2008-01-07 18:10:24 +000012226case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012227 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012228 *) unicode_size="2" ;;
12229esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012230
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012231fi
12232
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012233
12234
Georg Brandl52d168a2008-01-07 18:10:24 +000012235case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012236 4)
12237 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12238
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012239 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012240 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012241 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012242 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012243esac
12244
Michael W. Hudson54241132001-12-07 15:38:26 +000012245
Martin v. Löwis11437992002-04-12 09:54:03 +000012246
Georg Brandl52d168a2008-01-07 18:10:24 +000012247# wchar_t is only usable if it maps to an unsigned type
12248if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012249 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012250then
12251 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012252
Matthias Kloseb9621712010-04-24 17:59:49 +000012253$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012254
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012256
Georg Brandl52d168a2008-01-07 18:10:24 +000012257elif test "$ac_cv_sizeof_short" = "$unicode_size"
12258then
12259 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012260 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012261
Georg Brandl52d168a2008-01-07 18:10:24 +000012262elif test "$ac_cv_sizeof_long" = "$unicode_size"
12263then
12264 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012265 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012266
Georg Brandl52d168a2008-01-07 18:10:24 +000012267else
12268 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12271$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012272
12273# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12275$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012276if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012278else
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 ac_cv_c_bigendian=unknown
12280 # See if we're dealing with a universal compiler.
12281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12282/* end confdefs.h. */
12283#ifndef __APPLE_CC__
12284 not a universal capable compiler
12285 #endif
12286 typedef int dummy;
12287
Skip Montanaro6dead952003-09-25 14:50:04 +000012288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012289if ac_fn_c_try_compile "$LINENO"; then :
12290
12291 # Check for potential -arch flags. It is not universal unless
12292 # there are at least two -arch flags with different values.
12293 ac_arch=
12294 ac_prev=
12295 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12296 if test -n "$ac_prev"; then
12297 case $ac_word in
12298 i?86 | x86_64 | ppc | ppc64)
12299 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12300 ac_arch=$ac_word
12301 else
12302 ac_cv_c_bigendian=universal
12303 break
12304 fi
12305 ;;
12306 esac
12307 ac_prev=
12308 elif test "x$ac_word" = "x-arch"; then
12309 ac_prev=arch
12310 fi
12311 done
12312fi
12313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12314 if test $ac_cv_c_bigendian = unknown; then
12315 # See if sys/param.h defines the BYTE_ORDER macro.
12316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012317/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012318#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012319 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012320
Martin v. Löwis11437992002-04-12 09:54:03 +000012321int
12322main ()
12323{
Matthias Kloseb9621712010-04-24 17:59:49 +000012324#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12325 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12326 && LITTLE_ENDIAN)
12327 bogus endian macros
12328 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012329
12330 ;
12331 return 0;
12332}
12333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012334if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012335 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012337/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012338#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012339 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012340
Martin v. Löwis11437992002-04-12 09:54:03 +000012341int
12342main ()
12343{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012344#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 not big endian
12346 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012347
12348 ;
12349 return 0;
12350}
12351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012352if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012353 ac_cv_c_bigendian=yes
12354else
Matthias Kloseb9621712010-04-24 17:59:49 +000012355 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012358fi
12359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12360 fi
12361 if test $ac_cv_c_bigendian = unknown; then
12362 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012364/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012365#include <limits.h>
12366
Martin v. Löwis11437992002-04-12 09:54:03 +000012367int
12368main ()
12369{
Matthias Kloseb9621712010-04-24 17:59:49 +000012370#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12371 bogus endian macros
12372 #endif
12373
Martin v. Löwis11437992002-04-12 09:54:03 +000012374 ;
12375 return 0;
12376}
12377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012378if ac_fn_c_try_compile "$LINENO"; then :
12379 # It does; now see whether it defined to _BIG_ENDIAN or not.
12380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12381/* end confdefs.h. */
12382#include <limits.h>
12383
12384int
12385main ()
12386{
12387#ifndef _BIG_ENDIAN
12388 not big endian
12389 #endif
12390
12391 ;
12392 return 0;
12393}
12394_ACEOF
12395if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012396 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012397else
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12401fi
12402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12403 fi
12404 if test $ac_cv_c_bigendian = unknown; then
12405 # Compile a test program.
12406 if test "$cross_compiling" = yes; then :
12407 # Try to guess by grepping values from an object file.
12408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12409/* end confdefs.h. */
12410short int ascii_mm[] =
12411 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12412 short int ascii_ii[] =
12413 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12414 int use_ascii (int i) {
12415 return ascii_mm[i] + ascii_ii[i];
12416 }
12417 short int ebcdic_ii[] =
12418 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12419 short int ebcdic_mm[] =
12420 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12421 int use_ebcdic (int i) {
12422 return ebcdic_mm[i] + ebcdic_ii[i];
12423 }
12424 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012425
Matthias Kloseb9621712010-04-24 17:59:49 +000012426int
12427main ()
12428{
12429return use_ascii (foo) == use_ebcdic (foo);
12430 ;
12431 return 0;
12432}
12433_ACEOF
12434if ac_fn_c_try_compile "$LINENO"; then :
12435 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12436 ac_cv_c_bigendian=yes
12437 fi
12438 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12439 if test "$ac_cv_c_bigendian" = unknown; then
12440 ac_cv_c_bigendian=no
12441 else
12442 # finding both strings is unlikely to happen, but who knows?
12443 ac_cv_c_bigendian=unknown
12444 fi
12445 fi
12446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012448else
Matthias Kloseb9621712010-04-24 17:59:49 +000012449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012450/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012451$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012452int
12453main ()
12454{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012455
Matthias Kloseb9621712010-04-24 17:59:49 +000012456 /* Are we little or big endian? From Harbison&Steele. */
12457 union
12458 {
12459 long int l;
12460 char c[sizeof (long int)];
12461 } u;
12462 u.l = 1;
12463 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012464
12465 ;
12466 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012467}
Martin v. Löwis11437992002-04-12 09:54:03 +000012468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012469if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012470 ac_cv_c_bigendian=no
12471else
Matthias Kloseb9621712010-04-24 17:59:49 +000012472 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012473fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12475 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012477
Matthias Kloseb9621712010-04-24 17:59:49 +000012478 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12481$as_echo "$ac_cv_c_bigendian" >&6; }
12482 case $ac_cv_c_bigendian in #(
12483 yes)
12484 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12485;; #(
12486 no)
12487 ;; #(
12488 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012491
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 ;; #(
12493 *)
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012494 as_fn_error $? "unknown endianness
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012495 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012496 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012497
Michael W. Hudson54241132001-12-07 15:38:26 +000012498
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012499# ABI version string for Python extension modules. This appears between the
12500# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12501# from the following attributes which affect the ABI of this Python build (in
12502# this order):
12503#
12504# * The Python implementation (always 'cpython-' for us)
12505# * The major and minor version numbers
12506# * --with-pydebug (adds a 'd')
12507# * --with-pymalloc (adds a 'm')
12508# * --with-wide-unicode (adds a 'u')
12509#
12510# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012511# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12512# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012513
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12515$as_echo_n "checking ABIFLAGS... " >&6; }
12516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12517$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12519$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012520SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12522$as_echo "$SOABI" >&6; }
12523
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12525$as_echo_n "checking LDVERSION... " >&6; }
12526LDVERSION='$(VERSION)$(ABIFLAGS)'
12527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12528$as_echo "$LDVERSION" >&6; }
12529
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012530# SO is the extension of shared libraries `(including the dot!)
12531# -- usually .so, .sl on HP-UX, .dll on Cygwin
12532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12533$as_echo_n "checking SO... " >&6; }
12534if test -z "$SO"
12535then
12536 case $ac_sys_system in
12537 hp*|HP*)
12538 case `uname -m` in
12539 ia64) SO=.so;;
12540 *) SO=.sl;;
12541 esac
12542 ;;
12543 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012544 Linux*|GNU*)
12545 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012546 *) SO=.so;;
12547 esac
12548else
12549 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012550 echo
12551 echo '====================================================================='
12552 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012553 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012554 echo '+ Do you really mean to change the extension for shared libraries? +'
12555 echo '+ Continuing in 10 seconds to let you to ponder. +'
12556 echo '+ +'
12557 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012558 sleep 10
12559fi
12560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12561$as_echo "$SO" >&6; }
12562
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012563# Check whether right shifting a negative integer extends the sign bit
12564# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12566$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012567if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012568 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012569else
Martin v. Löwis11437992002-04-12 09:54:03 +000012570
Matthias Kloseb9621712010-04-24 17:59:49 +000012571if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012572 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012573else
Matthias Kloseb9621712010-04-24 17:59:49 +000012574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012575/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012576
12577int main()
12578{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012579 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012580}
12581
Martin v. Löwis11437992002-04-12 09:54:03 +000012582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012583if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012584 ac_cv_rshift_extends_sign=yes
12585else
Matthias Kloseb9621712010-04-24 17:59:49 +000012586 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12589 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012590fi
12591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012592fi
12593
Matthias Kloseb9621712010-04-24 17:59:49 +000012594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12595$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012596if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012597then
Martin v. Löwis11437992002-04-12 09:54:03 +000012598
Matthias Kloseb9621712010-04-24 17:59:49 +000012599$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012600
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012601fi
12602
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012603# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12605$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012606if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012607 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012608else
Martin v. Löwis11437992002-04-12 09:54:03 +000012609
Matthias Kloseb9621712010-04-24 17:59:49 +000012610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012611/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012612#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012613int
12614main ()
12615{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012616
12617 FILE *f = fopen("/dev/null", "r");
12618 flockfile(f);
12619 getc_unlocked(f);
12620 funlockfile(f);
12621
Martin v. Löwis11437992002-04-12 09:54:03 +000012622 ;
12623 return 0;
12624}
12625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012626if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012627 ac_cv_have_getc_unlocked=yes
12628else
Matthias Kloseb9621712010-04-24 17:59:49 +000012629 ac_cv_have_getc_unlocked=no
12630fi
12631rm -f core conftest.err conftest.$ac_objext \
12632 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012634
Matthias Kloseb9621712010-04-24 17:59:49 +000012635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12636$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012637if test "$ac_cv_have_getc_unlocked" = yes
12638then
Martin v. Löwis11437992002-04-12 09:54:03 +000012639
Matthias Kloseb9621712010-04-24 17:59:49 +000012640$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012641
12642fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012643
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012644# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012645# save the value of LIBS so we don't actually link Python with readline
12646LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012647
Gregory P. Smith18820942008-09-07 06:24:49 +000012648# On some systems we need to link readline to a termcap compatible
12649# library. NOTE: Keep the precedence of listed libraries synchronised
12650# with setup.py.
12651py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12653$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012654for py_libtermcap in "" ncursesw ncurses curses termcap; do
12655 if test -z "$py_libtermcap"; then
12656 READLINE_LIBS="-lreadline"
12657 else
12658 READLINE_LIBS="-lreadline -l$py_libtermcap"
12659 fi
12660 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012662/* end confdefs.h. */
12663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012664/* Override any GCC internal prototype to avoid an error.
12665 Use char because int might match the return type of a GCC
12666 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012667#ifdef __cplusplus
12668extern "C"
12669#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012670char readline ();
12671int
12672main ()
12673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012674return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012675 ;
12676 return 0;
12677}
12678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012679if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012680 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012681fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012682rm -f core conftest.err conftest.$ac_objext \
12683 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012684 if test $py_cv_lib_readline = yes; then
12685 break
12686 fi
12687done
12688# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12689#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012690if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12692$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012693else
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12695$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012696
Matthias Kloseb9621712010-04-24 17:59:49 +000012697$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012698
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012699fi
12700
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012701# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12703$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012704if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012706else
12707 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012708LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012710/* end confdefs.h. */
12711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712/* Override any GCC internal prototype to avoid an error.
12713 Use char because int might match the return type of a GCC
12714 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012715#ifdef __cplusplus
12716extern "C"
12717#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012718char rl_callback_handler_install ();
12719int
12720main ()
12721{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012722return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012723 ;
12724 return 0;
12725}
12726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012727if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012728 ac_cv_lib_readline_rl_callback_handler_install=yes
12729else
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012732rm -f core conftest.err conftest.$ac_objext \
12733 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012734LIBS=$ac_check_lib_save_LIBS
12735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12737$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012738if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012739
Matthias Kloseb9621712010-04-24 17:59:49 +000012740$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012741
12742fi
12743
12744
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012745# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012747/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012748#include <readline/readline.h>
12749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012750if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012751 have_readline=yes
12752else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012753 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012754
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012755fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012756rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012757if test $have_readline = yes
12758then
Matthias Kloseb9621712010-04-24 17:59:49 +000012759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012760/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012761#include <readline/readline.h>
12762
12763_ACEOF
12764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012766
Matthias Kloseb9621712010-04-24 17:59:49 +000012767$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012768
12769fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012770rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012771
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012773/* end confdefs.h. */
12774#include <readline/readline.h>
12775
12776_ACEOF
12777if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012778 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012779
Matthias Kloseb9621712010-04-24 17:59:49 +000012780$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012781
12782fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012783rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012784
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012785fi
12786
Martin v. Löwis0daad592001-09-30 21:09:59 +000012787# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12789$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012790if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012791 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012792else
Martin v. Löwis11437992002-04-12 09:54:03 +000012793 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012794LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012798/* Override any GCC internal prototype to avoid an error.
12799 Use char because int might match the return type of a GCC
12800 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012801#ifdef __cplusplus
12802extern "C"
12803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012804char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012805int
12806main ()
12807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012808return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012809 ;
12810 return 0;
12811}
12812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012813if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012814 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012815else
Matthias Kloseb9621712010-04-24 17:59:49 +000012816 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012818rm -f core conftest.err conftest.$ac_objext \
12819 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012820LIBS=$ac_check_lib_save_LIBS
12821fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12823$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012824if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012825
Matthias Kloseb9621712010-04-24 17:59:49 +000012826$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012827
Martin v. Löwis0daad592001-09-30 21:09:59 +000012828fi
12829
Michael W. Hudson54241132001-12-07 15:38:26 +000012830
Thomas Wouters89d996e2007-09-08 17:39:28 +000012831# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12833$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012834if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012835 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012836else
12837 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012838LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012840/* end confdefs.h. */
12841
12842/* Override any GCC internal prototype to avoid an error.
12843 Use char because int might match the return type of a GCC
12844 builtin and then its argument prototype would still apply. */
12845#ifdef __cplusplus
12846extern "C"
12847#endif
12848char rl_completion_display_matches_hook ();
12849int
12850main ()
12851{
12852return rl_completion_display_matches_hook ();
12853 ;
12854 return 0;
12855}
12856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012857if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012858 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12859else
Matthias Kloseb9621712010-04-24 17:59:49 +000012860 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012861fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012862rm -f core conftest.err conftest.$ac_objext \
12863 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012864LIBS=$ac_check_lib_save_LIBS
12865fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12867$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012868if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012869
Matthias Kloseb9621712010-04-24 17:59:49 +000012870$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012871
12872fi
12873
12874
Martin v. Löwis0daad592001-09-30 21:09:59 +000012875# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12877$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012878if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012879 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012880else
Martin v. Löwis11437992002-04-12 09:54:03 +000012881 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012882LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012886/* Override any GCC internal prototype to avoid an error.
12887 Use char because int might match the return type of a GCC
12888 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012889#ifdef __cplusplus
12890extern "C"
12891#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012892char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012893int
12894main ()
12895{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012896return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012897 ;
12898 return 0;
12899}
12900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012901if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012902 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012903else
Matthias Kloseb9621712010-04-24 17:59:49 +000012904 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012906rm -f core conftest.err conftest.$ac_objext \
12907 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012908LIBS=$ac_check_lib_save_LIBS
12909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12911$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012912if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012913
Matthias Kloseb9621712010-04-24 17:59:49 +000012914$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012915
Guido van Rossum353ae582001-07-10 16:45:32 +000012916fi
12917
Jack Jansendd19cf82001-12-06 22:36:17 +000012918
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012919# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012921/* end confdefs.h. */
12922#include <readline/readline.h>
12923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012924if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012925 have_readline=yes
12926else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012927 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012928
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012929fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012930rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012931if test $have_readline = yes
12932then
Matthias Kloseb9621712010-04-24 17:59:49 +000012933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012934/* end confdefs.h. */
12935#include <readline/readline.h>
12936
12937_ACEOF
12938if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012939 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012940
Matthias Kloseb9621712010-04-24 17:59:49 +000012941$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012942
12943fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012944rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012945
12946fi
12947
Martin v. Löwis82bca632006-02-10 20:49:30 +000012948# End of readline checks: restore LIBS
12949LIBS=$LIBS_no_readline
12950
Matthias Kloseb9621712010-04-24 17:59:49 +000012951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12952$as_echo_n "checking for broken nice()... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012953if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012954 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012955else
Martin v. Löwis11437992002-04-12 09:54:03 +000012956
Matthias Kloseb9621712010-04-24 17:59:49 +000012957if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012958 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012959else
Matthias Kloseb9621712010-04-24 17:59:49 +000012960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012961/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012962
12963int main()
12964{
12965 int val1 = nice(1);
12966 if (val1 != -1 && val1 == nice(2))
12967 exit(0);
12968 exit(1);
12969}
12970
Martin v. Löwis11437992002-04-12 09:54:03 +000012971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012972if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012973 ac_cv_broken_nice=yes
12974else
Matthias Kloseb9621712010-04-24 17:59:49 +000012975 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12978 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012979fi
12980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012981fi
12982
Matthias Kloseb9621712010-04-24 17:59:49 +000012983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12984$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012985if test "$ac_cv_broken_nice" = yes
12986then
Martin v. Löwis11437992002-04-12 09:54:03 +000012987
Matthias Kloseb9621712010-04-24 17:59:49 +000012988$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012989
12990fi
12991
Matthias Kloseb9621712010-04-24 17:59:49 +000012992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12993$as_echo_n "checking for broken poll()... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000012994if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012996else
Matthias Kloseb9621712010-04-24 17:59:49 +000012997 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012998 ac_cv_broken_poll=no
12999else
Matthias Kloseb9621712010-04-24 17:59:49 +000013000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013001/* end confdefs.h. */
13002
13003#include <poll.h>
13004
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013005int main()
13006{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013007 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013008 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013009
13010 close (42);
13011
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013012 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013013 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013014 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013015 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013016 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013017 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013018 return 1;
13019}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013020
13021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013022if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013023 ac_cv_broken_poll=yes
13024else
Matthias Kloseb9621712010-04-24 17:59:49 +000013025 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013027rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13028 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013030
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013031fi
13032
Matthias Kloseb9621712010-04-24 17:59:49 +000013033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13034$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013035if test "$ac_cv_broken_poll" = yes
13036then
13037
Matthias Kloseb9621712010-04-24 17:59:49 +000013038$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013039
13040fi
13041
Brett Cannon43802422005-02-10 20:48:03 +000013042# 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 +000013043# (which is not required by ISO C or UNIX spec) and/or if we support
13044# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013045ac_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 +000013046#include <$ac_cv_struct_tm>
13047
Matthias Kloseb9621712010-04-24 17:59:49 +000013048"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013049if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013050
13051cat >>confdefs.h <<_ACEOF
13052#define HAVE_STRUCT_TM_TM_ZONE 1
13053_ACEOF
13054
13055
13056fi
13057
13058if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13059
Matthias Kloseb9621712010-04-24 17:59:49 +000013060$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013061
13062else
Matthias Kloseb9621712010-04-24 17:59:49 +000013063 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13064"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013065if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013067else
Matthias Kloseb9621712010-04-24 17:59:49 +000013068 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013069fi
13070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013071cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013072#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013073_ACEOF
13074
Matthias Kloseb9621712010-04-24 17:59:49 +000013075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13076$as_echo_n "checking for tzname... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013077if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013079else
Matthias Kloseb9621712010-04-24 17:59:49 +000013080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013081/* end confdefs.h. */
13082#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013083#if !HAVE_DECL_TZNAME
13084extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013085#endif
13086
13087int
13088main ()
13089{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013090return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013091 ;
13092 return 0;
13093}
13094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013095if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013096 ac_cv_var_tzname=yes
13097else
Matthias Kloseb9621712010-04-24 17:59:49 +000013098 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013100rm -f core conftest.err conftest.$ac_objext \
13101 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13104$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013105 if test $ac_cv_var_tzname = yes; then
13106
Matthias Kloseb9621712010-04-24 17:59:49 +000013107$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013108
13109 fi
13110fi
13111
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013112
Martin v. Löwis1d459062005-03-14 21:23:33 +000013113# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13115$as_echo_n "checking for working tzset()... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013116if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013117 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013118else
13119
Matthias Kloseb9621712010-04-24 17:59:49 +000013120if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013121 ac_cv_working_tzset=no
13122else
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013124/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013125
13126#include <stdlib.h>
13127#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013128#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013129
13130#if HAVE_TZNAME
13131extern char *tzname[];
13132#endif
13133
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013134int main()
13135{
Brett Cannon18367812003-09-19 00:59:16 +000013136 /* Note that we need to ensure that not only does tzset(3)
13137 do 'something' with localtime, but it works as documented
13138 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013139 This includes making sure that tzname is set properly if
13140 tm->tm_zone does not exist since it is the alternative way
13141 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013142
13143 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013144 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013145 */
13146
Martin v. Löwis1d459062005-03-14 21:23:33 +000013147 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013148 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13149
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013150 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013151 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013152 if (localtime(&groundhogday)->tm_hour != 0)
13153 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013154#if HAVE_TZNAME
13155 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13156 if (strcmp(tzname[0], "UTC") ||
13157 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13158 exit(1);
13159#endif
Brett Cannon18367812003-09-19 00:59:16 +000013160
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013161 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013162 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013163 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013164 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013165#if HAVE_TZNAME
13166 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13167 exit(1);
13168#endif
Brett Cannon18367812003-09-19 00:59:16 +000013169
13170 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13171 tzset();
13172 if (localtime(&groundhogday)->tm_hour != 11)
13173 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013174#if HAVE_TZNAME
13175 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13176 exit(1);
13177#endif
13178
13179#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013180 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13181 exit(1);
13182 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13183 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013184#endif
Brett Cannon18367812003-09-19 00:59:16 +000013185
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013186 exit(0);
13187}
13188
13189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013190if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013191 ac_cv_working_tzset=yes
13192else
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13196 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013197fi
13198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013199fi
13200
Matthias Kloseb9621712010-04-24 17:59:49 +000013201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13202$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013203if test "$ac_cv_working_tzset" = yes
13204then
13205
Matthias Kloseb9621712010-04-24 17:59:49 +000013206$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013207
13208fi
13209
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013210# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13212$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013213if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013214 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013215else
Matthias Kloseb9621712010-04-24 17:59:49 +000013216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013217/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013218#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013219int
13220main ()
13221{
13222
13223struct stat st;
13224st.st_mtim.tv_nsec = 1;
13225
13226 ;
13227 return 0;
13228}
13229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013230if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013231 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013232else
Matthias Kloseb9621712010-04-24 17:59:49 +000013233 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13236fi
13237
Matthias Kloseb9621712010-04-24 17:59:49 +000013238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13239$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013240if test "$ac_cv_stat_tv_nsec" = yes
13241then
13242
Matthias Kloseb9621712010-04-24 17:59:49 +000013243$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013244
13245fi
13246
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013247# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13249$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013250if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013252else
Matthias Kloseb9621712010-04-24 17:59:49 +000013253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013254/* end confdefs.h. */
13255#include <sys/stat.h>
13256int
13257main ()
13258{
13259
13260struct stat st;
13261st.st_mtimespec.tv_nsec = 1;
13262
13263 ;
13264 return 0;
13265}
13266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013267if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013268 ac_cv_stat_tv_nsec2=yes
13269else
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13273fi
13274
Matthias Kloseb9621712010-04-24 17:59:49 +000013275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13276$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013277if test "$ac_cv_stat_tv_nsec2" = yes
13278then
13279
Matthias Kloseb9621712010-04-24 17:59:49 +000013280$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013281
13282fi
13283
Jack Jansen666b1e72001-10-31 12:11:48 +000013284# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13286$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013287if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013288 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013289else
Matthias Kloseb9621712010-04-24 17:59:49 +000013290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013291/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013292#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013293int
13294main ()
13295{
Jack Jansen666b1e72001-10-31 12:11:48 +000013296
13297 int rtn;
13298 rtn = mvwdelch(0,0,0);
13299
Martin v. Löwis11437992002-04-12 09:54:03 +000013300 ;
13301 return 0;
13302}
13303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013304if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013305 ac_cv_mvwdelch_is_expression=yes
13306else
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13310fi
13311
Matthias Kloseb9621712010-04-24 17:59:49 +000013312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13313$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013314
13315if test "$ac_cv_mvwdelch_is_expression" = yes
13316then
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
Matthias Kloseb9621712010-04-24 17:59:49 +000013318$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013319
13320fi
13321
Matthias Kloseb9621712010-04-24 17:59:49 +000013322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13323$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013324if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013326else
Matthias Kloseb9621712010-04-24 17:59:49 +000013327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013328/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013329#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013330int
13331main ()
13332{
Jack Jansen666b1e72001-10-31 12:11:48 +000013333
13334 WINDOW *w;
13335 w->_flags = 0;
13336
Martin v. Löwis11437992002-04-12 09:54:03 +000013337 ;
13338 return 0;
13339}
13340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013341if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013342 ac_cv_window_has_flags=yes
13343else
Matthias Kloseb9621712010-04-24 17:59:49 +000013344 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13347fi
13348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13350$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013351
Jack Jansen666b1e72001-10-31 12:11:48 +000013352
13353if test "$ac_cv_window_has_flags" = yes
13354then
Martin v. Löwis11437992002-04-12 09:54:03 +000013355
Matthias Kloseb9621712010-04-24 17:59:49 +000013356$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013357
13358fi
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13361$as_echo_n "checking for is_term_resized... " >&6; }
13362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013363/* end confdefs.h. */
13364#include <curses.h>
13365int
13366main ()
13367{
13368void *x=is_term_resized
13369 ;
13370 return 0;
13371}
13372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013373if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013374
Matthias Kloseb9621712010-04-24 17:59:49 +000013375$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013376
Matthias Kloseb159a552010-04-25 21:00:44 +000013377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013378$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13381$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013382
13383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13387$as_echo_n "checking for resize_term... " >&6; }
13388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013389/* end confdefs.h. */
13390#include <curses.h>
13391int
13392main ()
13393{
13394void *x=resize_term
13395 ;
13396 return 0;
13397}
13398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013399if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013400
Matthias Kloseb9621712010-04-24 17:59:49 +000013401$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013402
Matthias Kloseb159a552010-04-25 21:00:44 +000013403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013404$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013405else
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13407$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013408
13409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13411
Matthias Kloseb9621712010-04-24 17:59:49 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13413$as_echo_n "checking for resizeterm... " >&6; }
13414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013415/* end confdefs.h. */
13416#include <curses.h>
13417int
13418main ()
13419{
13420void *x=resizeterm
13421 ;
13422 return 0;
13423}
13424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013425if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013428
Matthias Kloseb159a552010-04-25 21:00:44 +000013429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013430$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013431else
Matthias Kloseb9621712010-04-24 17:59:49 +000013432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13433$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013434
13435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13437
Matthias Kloseb9621712010-04-24 17:59:49 +000013438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13439$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013440
13441if test -r /dev/ptmx
13442then
Matthias Kloseb9621712010-04-24 17:59:49 +000013443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13444$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013445
Matthias Kloseb9621712010-04-24 17:59:49 +000013446$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013447
Thomas Wouters89f507f2006-12-13 04:49:30 +000013448else
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13450$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013451fi
13452
Matthias Kloseb9621712010-04-24 17:59:49 +000013453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13454$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013455
13456if test -r /dev/ptc
13457then
Matthias Kloseb9621712010-04-24 17:59:49 +000013458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13459$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013462
Thomas Wouters89f507f2006-12-13 04:49:30 +000013463else
Matthias Kloseb9621712010-04-24 17:59:49 +000013464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13465$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013466fi
13467
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013468if test "$have_long_long" = yes
13469then
Matthias Kloseb9621712010-04-24 17:59:49 +000013470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13471$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013472 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013474else
Matthias Kloseb9621712010-04-24 17:59:49 +000013475 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013476 ac_cv_have_long_long_format=no
13477else
Matthias Kloseb9621712010-04-24 17:59:49 +000013478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013479/* end confdefs.h. */
13480
13481 #include <stdio.h>
13482 #include <stddef.h>
13483 #include <string.h>
13484
13485 #ifdef HAVE_SYS_TYPES_H
13486 #include <sys/types.h>
13487 #endif
13488
13489 int main()
13490 {
13491 char buffer[256];
13492
13493 if (sprintf(buffer, "%lld", (long long)123) < 0)
13494 return 1;
13495 if (strcmp(buffer, "123"))
13496 return 1;
13497
13498 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13499 return 1;
13500 if (strcmp(buffer, "-123"))
13501 return 1;
13502
13503 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13504 return 1;
13505 if (strcmp(buffer, "123"))
13506 return 1;
13507
13508 return 0;
13509 }
13510
13511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013512if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013513 ac_cv_have_long_long_format=yes
13514else
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13518 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013519fi
13520
13521
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013522fi
13523
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13525$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013526fi
13527
Mark Dickinson89d7d412009-12-31 20:50:59 +000013528if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013529then
13530
Matthias Kloseb9621712010-04-24 17:59:49 +000013531$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013532
13533fi
13534
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013535if test $ac_sys_system = Darwin
13536then
13537 LIBS="$LIBS -framework CoreFoundation"
13538fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013539
Matthias Kloseb9621712010-04-24 17:59:49 +000013540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13541$as_echo_n "checking for %zd printf() format support... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013542if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013544else
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013546 ac_cv_have_size_t_format="cross -- assuming yes"
13547
Thomas Wouters477c8d52006-05-27 19:21:47 +000013548else
Matthias Kloseb9621712010-04-24 17:59:49 +000013549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013550/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013551
Thomas Wouters477c8d52006-05-27 19:21:47 +000013552#include <stdio.h>
13553#include <stddef.h>
13554#include <string.h>
13555
Christian Heimes2c181612007-12-17 20:04:13 +000013556#ifdef HAVE_SYS_TYPES_H
13557#include <sys/types.h>
13558#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013559
13560#ifdef HAVE_SSIZE_T
13561typedef ssize_t Py_ssize_t;
13562#elif SIZEOF_VOID_P == SIZEOF_LONG
13563typedef long Py_ssize_t;
13564#else
13565typedef int Py_ssize_t;
13566#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013567
Christian Heimes2c181612007-12-17 20:04:13 +000013568int main()
13569{
13570 char buffer[256];
13571
Thomas Wouters477c8d52006-05-27 19:21:47 +000013572 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13573 return 1;
13574
Thomas Wouters89f507f2006-12-13 04:49:30 +000013575 if (strcmp(buffer, "123"))
13576 return 1;
13577
13578 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13579 return 1;
13580
13581 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013582 return 1;
13583
13584 return 0;
13585}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013586
Thomas Wouters477c8d52006-05-27 19:21:47 +000013587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013588if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013589 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013590else
Matthias Kloseb9621712010-04-24 17:59:49 +000013591 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013593rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13594 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013595fi
13596
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13599$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013600if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013601
Matthias Kloseb9621712010-04-24 17:59:49 +000013602$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013603
13604fi
13605
Matthias Kloseb9621712010-04-24 17:59:49 +000013606ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013607#ifdef HAVE_SYS_TYPES_H
13608#include <sys/types.h>
13609#endif
13610#ifdef HAVE_SYS_SOCKET_H
13611#include <sys/socket.h>
13612#endif
13613
Matthias Kloseb9621712010-04-24 17:59:49 +000013614"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013615if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013616
Martin v. Löwis11437992002-04-12 09:54:03 +000013617else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013618
Matthias Kloseb9621712010-04-24 17:59:49 +000013619$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013620
13621fi
13622
Michael W. Hudson54241132001-12-07 15:38:26 +000013623
Matthias Kloseb9621712010-04-24 17:59:49 +000013624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13625$as_echo_n "checking for broken mbstowcs... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013626if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013628else
Matthias Kloseb9621712010-04-24 17:59:49 +000013629 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013630 ac_cv_broken_mbstowcs=no
13631else
Matthias Kloseb9621712010-04-24 17:59:49 +000013632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013633/* end confdefs.h. */
13634
13635#include<stdlib.h>
13636int main() {
13637 size_t len = -1;
13638 const char *str = "text";
13639 len = mbstowcs(NULL, str, 0);
13640 return (len != 4);
13641}
13642
13643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013644if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013645 ac_cv_broken_mbstowcs=no
13646else
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013648fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013649rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13650 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013651fi
13652
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013653fi
13654
Matthias Kloseb9621712010-04-24 17:59:49 +000013655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13656$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013657if test "$ac_cv_broken_mbstowcs" = yes
13658then
13659
Matthias Kloseb9621712010-04-24 17:59:49 +000013660$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013661
13662fi
13663
Antoine Pitrou042b1282010-08-13 21:15:58 +000013664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13665$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013666if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013667 $as_echo_n "(cached) " >&6
13668else
13669 if test "$cross_compiling" = yes; then :
13670 ac_cv_computed_gotos=no
13671else
13672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13673/* end confdefs.h. */
13674
13675int main(int argc, char **argv)
13676{
13677 static void *targets[1] = { &&LABEL1 };
13678 goto LABEL2;
13679LABEL1:
13680 return 0;
13681LABEL2:
13682 goto *targets[0];
13683 return 1;
13684}
13685
13686_ACEOF
13687if ac_fn_c_try_run "$LINENO"; then :
13688 ac_cv_computed_gotos=yes
13689else
13690 ac_cv_computed_gotos=no
13691fi
13692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13693 conftest.$ac_objext conftest.beam conftest.$ac_ext
13694fi
13695
13696fi
13697
13698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13699$as_echo "$ac_cv_computed_gotos" >&6; }
13700if test "$ac_cv_computed_gotos" = yes
13701then
13702
13703$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13704
13705fi
13706
Antoine Pitroub52ec782009-01-25 16:34:23 +000013707# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13709$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013710
13711# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013712if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013713 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013714if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013715then
13716
Matthias Kloseb9621712010-04-24 17:59:49 +000013717$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013718
Matthias Kloseb9621712010-04-24 17:59:49 +000013719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13720$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013721fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013722if test "$withval" = no
13723then
13724
13725$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13728$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013729fi
13730
Antoine Pitrou042b1282010-08-13 21:15:58 +000013731else
13732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13733$as_echo "no value specified" >&6; }
13734fi
13735
Antoine Pitroub52ec782009-01-25 16:34:23 +000013736
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013737case $ac_sys_system in
13738AIX*)
13739
13740$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13741 ;;
13742esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013743
Michael W. Hudson54241132001-12-07 15:38:26 +000013744
Jesus Cea6a792292010-05-03 21:18:48 +000013745case $ac_sys_system in
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013746 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 +000013747esac
13748
Gregory P. Smith138fa432010-12-13 08:00:52 +000013749ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
13750if test "x$ac_cv_func_pipe2" = x""yes; then :
13751
13752$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13753
13754fi
Jesus Cea6a792292010-05-03 21:18:48 +000013755
13756
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013757
13758
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013759for h in `(cd $srcdir;echo Python/thread_*.h)`
13760do
13761 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13762done
13763
Michael W. Hudson54241132001-12-07 15:38:26 +000013764
Neal Norwitzd24499d2005-12-18 21:36:39 +000013765SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13767$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013768for dir in $SRCDIRS; do
13769 if test ! -d $dir; then
13770 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013771 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013772done
Matthias Kloseb9621712010-04-24 17:59:49 +000013773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13774$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013775
Guido van Rossum627b2d71993-12-24 10:39:16 +000013776# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013777ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013778
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013779ac_config_files="$ac_config_files Modules/ld_so_aix"
13780
Martin v. Löwis11437992002-04-12 09:54:03 +000013781cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013782# This file is a shell script that caches the results of configure
13783# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013784# scripts and configure runs, see configure's option --config-cache.
13785# It is not useful on other systems. If it contains results you don't
13786# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013787#
Martin v. Löwis11437992002-04-12 09:54:03 +000013788# config.status only pays attention to the cache file if you give it
13789# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013790#
Skip Montanaro6dead952003-09-25 14:50:04 +000013791# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013792# loading this file, other *unset* `ac_cv_foo' will be assigned the
13793# following values.
13794
13795_ACEOF
13796
Guido van Rossumf78abae1997-01-21 22:02:36 +000013797# The following way of writing the cache mishandles newlines in values,
13798# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013799# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013800# Ultrix sh set writes to stderr and can't be redirected directly,
13801# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013802(
13803 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13804 eval ac_val=\$$ac_var
13805 case $ac_val in #(
13806 *${as_nl}*)
13807 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13809$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013810 esac
13811 case $ac_var in #(
13812 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013813 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13814 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013815 esac ;;
13816 esac
13817 done
13818
Martin v. Löwis11437992002-04-12 09:54:03 +000013819 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013820 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13821 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013822 # `set' does not quote correctly, so add quotes: double-quote
13823 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013824 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013825 "s/'/'\\\\''/g;
13826 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013827 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 *)
13829 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013830 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013832 esac |
13833 sort
13834) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013835 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013836 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013837 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013838 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013839 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13840 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013841 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13842 :end' >>confcache
13843if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13844 if test -w "$cache_file"; then
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013845 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013846 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13847$as_echo "$as_me: updating cache $cache_file" >&6;}
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013848 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013849 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013850 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13851$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013852 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013853fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013854rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013855
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013856test "x$prefix" = xNONE && prefix=$ac_default_prefix
13857# Let make expand exec_prefix.
13858test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013859
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013860DEFS=-DHAVE_CONFIG_H
13861
Skip Montanaro6dead952003-09-25 14:50:04 +000013862ac_libobjs=
13863ac_ltlibobjs=
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013864U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013865for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13866 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013867 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013868 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013869 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13870 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013871 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13872 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013873done
13874LIBOBJS=$ac_libobjs
13875
13876LTLIBOBJS=$ac_ltlibobjs
13877
13878
Martin v. Löwis11437992002-04-12 09:54:03 +000013879
Matthias Kloseb9621712010-04-24 17:59:49 +000013880
Barry Warsaw14d98ac2010-11-24 19:43:47 +000013881: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013882ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013883ac_clean_files_save=$ac_clean_files
13884ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013885{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13886$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13887as_write_fail=0
13888cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013889#! $SHELL
13890# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013891# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013892# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013893# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013894
Martin v. Löwis11437992002-04-12 09:54:03 +000013895debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013896ac_cs_recheck=false
13897ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013898
Matthias Kloseb9621712010-04-24 17:59:49 +000013899SHELL=\${CONFIG_SHELL-$SHELL}
13900export SHELL
13901_ASEOF
13902cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13903## -------------------- ##
13904## M4sh Initialization. ##
13905## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907# Be more Bourne compatible
13908DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013909if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 emulate sh
13911 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013912 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013913 # is contrary to our usage. Disable this feature.
13914 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013916else
Matthias Kloseb9621712010-04-24 17:59:49 +000013917 case `(set -o) 2>/dev/null` in #(
13918 *posix*) :
13919 set -o posix ;; #(
13920 *) :
13921 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013922esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013923fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013924
13925
Matthias Kloseb9621712010-04-24 17:59:49 +000013926as_nl='
13927'
13928export as_nl
13929# Printing a long string crashes Solaris 7 /usr/bin/printf.
13930as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13931as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13932as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13933# Prefer a ksh shell builtin over an external printf program on Solaris,
13934# but without wasting forks for bash or zsh.
13935if test -z "$BASH_VERSION$ZSH_VERSION" \
13936 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13937 as_echo='print -r --'
13938 as_echo_n='print -rn --'
13939elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13940 as_echo='printf %s\n'
13941 as_echo_n='printf %s'
13942else
13943 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13944 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13945 as_echo_n='/usr/ucb/echo -n'
13946 else
13947 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13948 as_echo_n_body='eval
13949 arg=$1;
13950 case $arg in #(
13951 *"$as_nl"*)
13952 expr "X$arg" : "X\\(.*\\)$as_nl";
13953 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13954 esac;
13955 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13956 '
13957 export as_echo_n_body
13958 as_echo_n='sh -c $as_echo_n_body as_echo'
13959 fi
13960 export as_echo_body
13961 as_echo='sh -c $as_echo_body as_echo'
13962fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013963
13964# The user is always right.
13965if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013966 PATH_SEPARATOR=:
13967 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13968 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13969 PATH_SEPARATOR=';'
13970 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013971fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013972
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013973
13974# IFS
13975# We need space, tab and new line, in precisely that order. Quoting is
13976# there to prevent editors from complaining about space-tab.
13977# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13978# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013979IFS=" "" $as_nl"
13980
13981# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013982case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013983 *[\\/]* ) as_myself=$0 ;;
13984 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013985for as_dir in $PATH
13986do
13987 IFS=$as_save_IFS
13988 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13990 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013991IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013993 ;;
13994esac
13995# We did not find ourselves, most probably we were run as `sh COMMAND'
13996# in which case we are not to be found in the path.
13997if test "x$as_myself" = x; then
13998 as_myself=$0
13999fi
14000if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14002 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014003fi
14004
Matthias Kloseb9621712010-04-24 17:59:49 +000014005# Unset variables that we do not need and which cause bugs (e.g. in
14006# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14007# suppresses any "Segmentation fault" message there. '((' could
14008# trigger a bug in pdksh 5.2.14.
14009for as_var in BASH_ENV ENV MAIL MAILPATH
14010do eval test x\${$as_var+set} = xset \
14011 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014012done
14013PS1='$ '
14014PS2='> '
14015PS4='+ '
14016
14017# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014018LC_ALL=C
14019export LC_ALL
14020LANGUAGE=C
14021export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014022
Matthias Kloseb9621712010-04-24 17:59:49 +000014023# CDPATH.
14024(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14025
14026
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014027# as_fn_error STATUS ERROR [LINENO LOG_FD]
14028# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014029# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14030# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014031# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014032as_fn_error ()
14033{
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014034 as_status=$1; test $as_status -eq 0 && as_status=1
14035 if test "$4"; then
14036 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14037 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014038 fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014039 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014040 as_fn_exit $as_status
14041} # as_fn_error
14042
14043
14044# as_fn_set_status STATUS
14045# -----------------------
14046# Set $? to STATUS, without forking.
14047as_fn_set_status ()
14048{
14049 return $1
14050} # as_fn_set_status
14051
14052# as_fn_exit STATUS
14053# -----------------
14054# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14055as_fn_exit ()
14056{
14057 set +e
14058 as_fn_set_status $1
14059 exit $1
14060} # as_fn_exit
14061
14062# as_fn_unset VAR
14063# ---------------
14064# Portably unset VAR.
14065as_fn_unset ()
14066{
14067 { eval $1=; unset $1;}
14068}
14069as_unset=as_fn_unset
14070# as_fn_append VAR VALUE
14071# ----------------------
14072# Append the text in VALUE to the end of the definition contained in VAR. Take
14073# advantage of any shell optimizations that allow amortized linear growth over
14074# repeated appends, instead of the typical quadratic growth present in naive
14075# implementations.
14076if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14077 eval 'as_fn_append ()
14078 {
14079 eval $1+=\$2
14080 }'
14081else
14082 as_fn_append ()
14083 {
14084 eval $1=\$$1\$2
14085 }
14086fi # as_fn_append
14087
14088# as_fn_arith ARG...
14089# ------------------
14090# Perform arithmetic evaluation on the ARGs, and store the result in the
14091# global $as_val. Take advantage of shells that can avoid forks. The arguments
14092# must be portable across $(()) and expr.
14093if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14094 eval 'as_fn_arith ()
14095 {
14096 as_val=$(( $* ))
14097 }'
14098else
14099 as_fn_arith ()
14100 {
14101 as_val=`expr "$@" || test $? -eq 1`
14102 }
14103fi # as_fn_arith
14104
14105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014106if expr a : '\(a\)' >/dev/null 2>&1 &&
14107 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14108 as_expr=expr
14109else
14110 as_expr=false
14111fi
14112
14113if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14114 as_basename=basename
14115else
14116 as_basename=false
14117fi
14118
Matthias Kloseb9621712010-04-24 17:59:49 +000014119if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14120 as_dirname=dirname
14121else
14122 as_dirname=false
14123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014125as_me=`$as_basename -- "$0" ||
14126$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14127 X"$0" : 'X\(//\)$' \| \
14128 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014129$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130 sed '/^.*\/\([^/][^/]*\)\/*$/{
14131 s//\1/
14132 q
14133 }
14134 /^X\/\(\/\/\)$/{
14135 s//\1/
14136 q
14137 }
14138 /^X\/\(\/\).*/{
14139 s//\1/
14140 q
14141 }
14142 s/.*/./; q'`
14143
Matthias Kloseb9621712010-04-24 17:59:49 +000014144# Avoid depending upon Character Ranges.
14145as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14146as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14147as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14148as_cr_digits='0123456789'
14149as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150
14151ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014152case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014153-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014154 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014155 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 xy) ECHO_C='\c';;
14157 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14158 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159 esac;;
14160*)
14161 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014162esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014163
Martin v. Löwis11437992002-04-12 09:54:03 +000014164rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014165if test -d conf$$.dir; then
14166 rm -f conf$$.dir/conf$$.file
14167else
14168 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014171if (echo >conf$$.file) 2>/dev/null; then
14172 if ln -s conf$$.file conf$$ 2>/dev/null; then
14173 as_ln_s='ln -s'
14174 # ... but there are two gotchas:
14175 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14176 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14177 # In both cases, we have to default to `cp -p'.
14178 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14179 as_ln_s='cp -p'
14180 elif ln conf$$.file conf$$ 2>/dev/null; then
14181 as_ln_s=ln
14182 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014183 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014185else
14186 as_ln_s='cp -p'
14187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014188rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14189rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014190
Matthias Kloseb9621712010-04-24 17:59:49 +000014191
14192# as_fn_mkdir_p
14193# -------------
14194# Create "$as_dir" as a directory, including parents if necessary.
14195as_fn_mkdir_p ()
14196{
14197
14198 case $as_dir in #(
14199 -*) as_dir=./$as_dir;;
14200 esac
14201 test -d "$as_dir" || eval $as_mkdir_p || {
14202 as_dirs=
14203 while :; do
14204 case $as_dir in #(
14205 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14206 *) as_qdir=$as_dir;;
14207 esac
14208 as_dirs="'$as_qdir' $as_dirs"
14209 as_dir=`$as_dirname -- "$as_dir" ||
14210$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14211 X"$as_dir" : 'X\(//\)[^/]' \| \
14212 X"$as_dir" : 'X\(//\)$' \| \
14213 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14214$as_echo X"$as_dir" |
14215 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14216 s//\1/
14217 q
14218 }
14219 /^X\(\/\/\)[^/].*/{
14220 s//\1/
14221 q
14222 }
14223 /^X\(\/\/\)$/{
14224 s//\1/
14225 q
14226 }
14227 /^X\(\/\).*/{
14228 s//\1/
14229 q
14230 }
14231 s/.*/./; q'`
14232 test -d "$as_dir" && break
14233 done
14234 test -z "$as_dirs" || eval "mkdir $as_dirs"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014235 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014236
14237
14238} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014239if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014241else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014242 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014243 as_mkdir_p=false
14244fi
14245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014246if test -x / >/dev/null 2>&1; then
14247 as_test_x='test -x'
14248else
14249 if ls -dL / >/dev/null 2>&1; then
14250 as_ls_L_option=L
14251 else
14252 as_ls_L_option=
14253 fi
14254 as_test_x='
14255 eval sh -c '\''
14256 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014257 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014258 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014259 case $1 in #(
14260 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014261 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014262 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014263 ???[sx]*):;;*)false;;esac;fi
14264 '\'' sh
14265 '
14266fi
14267as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014268
14269# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014270as_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 +000014271
14272# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014273as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014274
14275
Martin v. Löwis11437992002-04-12 09:54:03 +000014276exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014277## ----------------------------------- ##
14278## Main body of $CONFIG_STATUS script. ##
14279## ----------------------------------- ##
14280_ASEOF
14281test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014282
Matthias Kloseb9621712010-04-24 17:59:49 +000014283cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14284# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014285# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014286# values after options handling.
14287ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014288This file was extended by python $as_me 3.2, which was
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014289generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014290
14291 CONFIG_FILES = $CONFIG_FILES
14292 CONFIG_HEADERS = $CONFIG_HEADERS
14293 CONFIG_LINKS = $CONFIG_LINKS
14294 CONFIG_COMMANDS = $CONFIG_COMMANDS
14295 $ $0 $@
14296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014297on `(hostname || uname -n) 2>/dev/null | sed 1q`
14298"
14299
Martin v. Löwis11437992002-04-12 09:54:03 +000014300_ACEOF
14301
Matthias Kloseb9621712010-04-24 17:59:49 +000014302case $ac_config_files in *"
14303"*) set x $ac_config_files; shift; ac_config_files=$*;;
14304esac
14305
14306case $ac_config_headers in *"
14307"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14308esac
14309
14310
14311cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014312# Files that config.status was made for.
Barry Warsaw278266f2010-10-14 17:38:46 +000014313config_files="$ac_config_files"
14314config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014316_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014317
Matthias Kloseb9621712010-04-24 17:59:49 +000014318cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014319ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014320\`$as_me' instantiates files and other configuration actions
14321from templates according to the current configuration. Unless the files
14322and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014323
Matthias Kloseb9621712010-04-24 17:59:49 +000014324Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014325
14326 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014327 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014328 --config print configuration, then exit
14329 -q, --quiet, --silent
14330 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014331 -d, --debug don't remove temporary files
14332 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014333 --file=FILE[:TEMPLATE]
14334 instantiate the configuration file FILE
14335 --header=FILE[:TEMPLATE]
14336 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014337
14338Configuration files:
14339$config_files
14340
14341Configuration headers:
14342$config_headers
14343
Matthias Kloseb9621712010-04-24 17:59:49 +000014344Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014345
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014347cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14348ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014349ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014350python config.status 3.2
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014351configured by $0, generated by GNU Autoconf 2.67,
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014353
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014354Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014355This config.status script is free software; the Free Software Foundation
14356gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014357
14358ac_pwd='$ac_pwd'
14359srcdir='$srcdir'
14360INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014361test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014362_ACEOF
14363
Matthias Kloseb9621712010-04-24 17:59:49 +000014364cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14365# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014366ac_need_defaults=:
14367while test $# != 0
14368do
14369 case $1 in
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014370 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014371 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14372 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014373 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014374 ;;
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014375 --*=)
14376 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14377 ac_optarg=
14378 ac_shift=:
14379 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014380 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014381 ac_option=$1
14382 ac_optarg=$2
14383 ac_shift=shift
14384 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014385 esac
14386
Skip Montanaro6dead952003-09-25 14:50:04 +000014387 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014388 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014389 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14390 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014391 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014392 $as_echo "$ac_cs_version"; exit ;;
14393 --config | --confi | --conf | --con | --co | --c )
14394 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014395 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014396 debug=: ;;
14397 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014398 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014399 case $ac_optarg in
14400 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014401 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014402 esac
14403 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014404 ac_need_defaults=false;;
14405 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014406 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014407 case $ac_optarg in
14408 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14409 esac
14410 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014411 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014412 --he | --h)
14413 # Conflict between --help and --header
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014414 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014415Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014416 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014417 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014418 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14419 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14420 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014421
14422 # This is an error.
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014423 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014424Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
Matthias Kloseb9621712010-04-24 17:59:49 +000014426 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014427 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014428
14429 esac
14430 shift
14431done
14432
Skip Montanaro6dead952003-09-25 14:50:04 +000014433ac_configure_extra_args=
14434
14435if $ac_cs_silent; then
14436 exec 6>/dev/null
14437 ac_configure_extra_args="$ac_configure_extra_args --silent"
14438fi
14439
14440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014441cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014442if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14444 shift
14445 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14446 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014447 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014449fi
14450
Martin v. Löwis11437992002-04-12 09:54:03 +000014451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014452cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014453exec 5>>config.log
14454{
14455 echo
14456 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14457## Running $as_me. ##
14458_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014459 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014463cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014465
Matthias Kloseb9621712010-04-24 17:59:49 +000014466cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014467
14468# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014469for ac_config_target in $ac_config_targets
14470do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471 case $ac_config_target in
14472 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14473 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14474 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014475 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14476 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14478 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014479 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014480 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014482 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014483 esac
14484done
14485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014486
Martin v. Löwis11437992002-04-12 09:54:03 +000014487# If the user did not use the arguments to specify the items to instantiate,
14488# then the envvar interface is used. Set only those that are not.
14489# We use the long form for the default assignment because of an extremely
14490# bizarre bug on SunOS 4.1.3.
14491if $ac_need_defaults; then
14492 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14493 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14494fi
14495
Skip Montanaro6dead952003-09-25 14:50:04 +000014496# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014497# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014498# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499# Hook for its removal unless debugging.
14500# Note that there is a small window in which the directory will not be cleaned:
14501# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014502$debug ||
14503{
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014504 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014505 trap 'exit_status=$?
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014506 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014509}
Martin v. Löwis11437992002-04-12 09:54:03 +000014510# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014511
Martin v. Löwis11437992002-04-12 09:54:03 +000014512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014513 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014514 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014515} ||
14516{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014517 tmp=./conf$$-$RANDOM
14518 (umask 077 && mkdir "$tmp")
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014519} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014520
Matthias Kloseb9621712010-04-24 17:59:49 +000014521# Set up the scripts for CONFIG_FILES section.
14522# No need to generate them if there are no CONFIG_FILES.
14523# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014525
Matthias Kloseb9621712010-04-24 17:59:49 +000014526
14527ac_cr=`echo X | tr X '\015'`
14528# On cygwin, bash can eat \r inside `` if the user requested igncr.
14529# But we know of no other shell where ac_cr would be empty at this
14530# point, so we can use a bashism as a fallback.
14531if test "x$ac_cr" = x; then
14532 eval ac_cr=\$\'\\r\'
14533fi
14534ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14535if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014536 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014537else
14538 ac_cs_awk_cr=$ac_cr
14539fi
14540
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014541echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014542_ACEOF
14543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544
Matthias Kloseb9621712010-04-24 17:59:49 +000014545{
14546 echo "cat >conf$$subs.awk <<_ACEOF" &&
14547 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14548 echo "_ACEOF"
14549} >conf$$subs.sh ||
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014550 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14551ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014552ac_delim='%!_!# '
14553for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014554 . ./conf$$subs.sh ||
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014555 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014556
Matthias Kloseb9621712010-04-24 17:59:49 +000014557 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14558 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559 break
14560 elif $ac_last_try; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014561 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014562 else
14563 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014564 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014565done
Matthias Kloseb9621712010-04-24 17:59:49 +000014566rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014567
Matthias Kloseb9621712010-04-24 17:59:49 +000014568cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014569cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014571sed -n '
14572h
14573s/^/S["/; s/!.*/"]=/
14574p
14575g
14576s/^[^!]*!//
14577:repl
14578t repl
14579s/'"$ac_delim"'$//
14580t delim
14581:nl
14582h
14583s/\(.\{148\}\)..*/\1/
14584t more1
14585s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14586p
14587n
14588b repl
14589:more1
14590s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14591p
14592g
14593s/.\{148\}//
14594t nl
14595:delim
14596h
14597s/\(.\{148\}\)..*/\1/
14598t more2
14599s/["\\]/\\&/g; s/^/"/; s/$/"/
14600p
14601b
14602:more2
14603s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14604p
14605g
14606s/.\{148\}//
14607t delim
14608' <conf$$subs.awk | sed '
14609/^[^""]/{
14610 N
14611 s/\n//
14612}
14613' >>$CONFIG_STATUS || ac_write_fail=1
14614rm -f conf$$subs.awk
14615cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14616_ACAWK
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014617cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014618 for (key in S) S_is_set[key] = 1
14619 FS = ""
14620
14621}
14622{
14623 line = $ 0
14624 nfields = split(line, field, "@")
14625 substed = 0
14626 len = length(field[1])
14627 for (i = 2; i < nfields; i++) {
14628 key = field[i]
14629 keylen = length(key)
14630 if (S_is_set[key]) {
14631 value = S[key]
14632 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14633 len += length(value) + length(field[++i])
14634 substed = 1
14635 } else
14636 len += 1 + keylen
14637 }
14638
14639 print line
14640}
14641
14642_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014644cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14645if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14646 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14647else
14648 cat
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014649fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014650 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014651_ACEOF
14652
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014653# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14654# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014655# trailing colons and then remove the whole line if VPATH becomes empty
14656# (actually we leave an empty line to preserve line numbers).
14657if test "x$srcdir" = x.; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014658 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14659h
14660s///
14661s/^/:/
14662s/[ ]*$/:/
14663s/:\$(srcdir):/:/g
14664s/:\${srcdir}:/:/g
14665s/:@srcdir@:/:/g
14666s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014667s/:*$//
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014668x
14669s/\(=[ ]*\).*/\1/
14670G
14671s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014672s/^[^=]*=[ ]*$//
14673}'
14674fi
14675
Matthias Kloseb9621712010-04-24 17:59:49 +000014676cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014677fi # test -n "$CONFIG_FILES"
14678
Matthias Kloseb9621712010-04-24 17:59:49 +000014679# Set up the scripts for CONFIG_HEADERS section.
14680# No need to generate them if there are no CONFIG_HEADERS.
14681# This happens for instance with `./config.status Makefile'.
14682if test -n "$CONFIG_HEADERS"; then
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014683cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014684BEGIN {
14685_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014686
Matthias Kloseb9621712010-04-24 17:59:49 +000014687# Transform confdefs.h into an awk script `defines.awk', embedded as
14688# here-document in config.status, that substitutes the proper values into
14689# config.h.in to produce config.h.
14690
14691# Create a delimiter string that does not exist in confdefs.h, to ease
14692# handling of long lines.
14693ac_delim='%!_!# '
14694for ac_last_try in false false :; do
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014695 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14696 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014697 break
14698 elif $ac_last_try; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014699 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014700 else
14701 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14702 fi
14703done
14704
14705# For the awk script, D is an array of macro values keyed by name,
14706# likewise P contains macro parameters if any. Preserve backslash
14707# newline sequences.
14708
14709ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14710sed -n '
14711s/.\{148\}/&'"$ac_delim"'/g
14712t rset
14713:rset
14714s/^[ ]*#[ ]*define[ ][ ]*/ /
14715t def
14716d
14717:def
14718s/\\$//
14719t bsnl
14720s/["\\]/\\&/g
14721s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14722D["\1"]=" \3"/p
14723s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14724d
14725:bsnl
14726s/["\\]/\\&/g
14727s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14728D["\1"]=" \3\\\\\\n"\\/p
14729t cont
14730s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14731t cont
14732d
14733:cont
14734n
14735s/.\{148\}/&'"$ac_delim"'/g
14736t clear
14737:clear
14738s/\\$//
14739t bsnlc
14740s/["\\]/\\&/g; s/^/"/; s/$/"/p
14741d
14742:bsnlc
14743s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14744b cont
14745' <confdefs.h | sed '
14746s/'"$ac_delim"'/"\\\
14747"/g' >>$CONFIG_STATUS || ac_write_fail=1
14748
14749cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14750 for (key in D) D_is_set[key] = 1
14751 FS = ""
14752}
14753/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14754 line = \$ 0
14755 split(line, arg, " ")
14756 if (arg[1] == "#") {
14757 defundef = arg[2]
14758 mac1 = arg[3]
14759 } else {
14760 defundef = substr(arg[1], 2)
14761 mac1 = arg[2]
14762 }
14763 split(mac1, mac2, "(") #)
14764 macro = mac2[1]
14765 prefix = substr(line, 1, index(line, defundef) - 1)
14766 if (D_is_set[macro]) {
14767 # Preserve the white space surrounding the "#".
14768 print prefix "define", macro P[macro] D[macro]
14769 next
14770 } else {
14771 # Replace #undef with comments. This is necessary, for example,
14772 # in the case of _POSIX_SOURCE, which is predefined and required
14773 # on some systems where configure will not decide to define it.
14774 if (defundef == "undef") {
14775 print "/*", prefix defundef, macro, "*/"
14776 next
14777 }
14778 }
14779}
14780{ print }
14781_ACAWK
14782_ACEOF
14783cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014784 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014785fi # test -n "$CONFIG_HEADERS"
14786
14787
14788eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14789shift
14790for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014791do
14792 case $ac_tag in
14793 :[FHLC]) ac_mode=$ac_tag; continue;;
14794 esac
14795 case $ac_mode$ac_tag in
14796 :[FHL]*:*);;
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014797 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014798 :[FH]-) ac_tag=-:-;;
14799 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14800 esac
14801 ac_save_IFS=$IFS
14802 IFS=:
14803 set x $ac_tag
14804 IFS=$ac_save_IFS
14805 shift
14806 ac_file=$1
14807 shift
14808
14809 case $ac_mode in
14810 :L) ac_source=$1;;
14811 :[FH])
14812 ac_file_inputs=
14813 for ac_f
14814 do
14815 case $ac_f in
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014816 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014817 *) # Look for the file first in the build tree, then in the source tree
14818 # (if the path is not absolute). The absolute path cannot be DOS-style,
14819 # because $ac_f cannot contain `:'.
14820 test -f "$ac_f" ||
14821 case $ac_f in
14822 [\\/$]*) false;;
14823 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14824 esac ||
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014825 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014826 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014827 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14828 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014829 done
14830
14831 # Let's still pretend it is `configure' which instantiates (i.e., don't
14832 # use $as_me), people would be surprised to read:
14833 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 configure_input='Generated from '`
14835 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14836 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014837 if test x"$ac_file" != x-; then
14838 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014839 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14840$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014841 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014842 # Neutralize special characters interpreted by sed in replacement strings.
14843 case $configure_input in #(
14844 *\&* | *\|* | *\\* )
14845 ac_sed_conf_input=`$as_echo "$configure_input" |
14846 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14847 *) ac_sed_conf_input=$configure_input;;
14848 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014849
14850 case $ac_tag in
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014851 *:-:* | *:-) cat >"$tmp/stdin" \
14852 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014853 esac
14854 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014855 esac
14856
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014857 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014858$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014859 X"$ac_file" : 'X\(//\)[^/]' \| \
14860 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014861 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014862$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14864 s//\1/
14865 q
14866 }
14867 /^X\(\/\/\)[^/].*/{
14868 s//\1/
14869 q
14870 }
14871 /^X\(\/\/\)$/{
14872 s//\1/
14873 q
14874 }
14875 /^X\(\/\).*/{
14876 s//\1/
14877 q
14878 }
14879 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014880 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014881 ac_builddir=.
14882
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014883case "$ac_dir" in
14884.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14885*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014886 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014887 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014888 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889 case $ac_top_builddir_sub in
14890 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14891 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14892 esac ;;
14893esac
14894ac_abs_top_builddir=$ac_pwd
14895ac_abs_builddir=$ac_pwd$ac_dir_suffix
14896# for backward compatibility:
14897ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014898
14899case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014900 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014901 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014902 ac_top_srcdir=$ac_top_builddir_sub
14903 ac_abs_top_srcdir=$ac_pwd ;;
14904 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014905 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014906 ac_top_srcdir=$srcdir
14907 ac_abs_top_srcdir=$srcdir ;;
14908 *) # Relative name.
14909 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14910 ac_top_srcdir=$ac_top_build_prefix$srcdir
14911 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014912esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014914
Martin v. Löwis11437992002-04-12 09:54:03 +000014915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014916 case $ac_mode in
14917 :F)
14918 #
14919 # CONFIG_FILE
14920 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014921
14922 case $INSTALL in
14923 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014925 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014926_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014927
Matthias Kloseb9621712010-04-24 17:59:49 +000014928cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929# If the template does not know about datarootdir, expand it.
14930# FIXME: This hack should be removed a few years after 2.60.
14931ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014932ac_sed_dataroot='
14933/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934 p
14935 q
14936}
14937/@datadir@/p
14938/@docdir@/p
14939/@infodir@/p
14940/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014941/@mandir@/p'
14942case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014943*datarootdir*) ac_datarootdir_seen=yes;;
14944*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14946$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014948cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014949 ac_datarootdir_hack='
14950 s&@datadir@&$datadir&g
14951 s&@docdir@&$docdir&g
14952 s&@infodir@&$infodir&g
14953 s&@localedir@&$localedir&g
14954 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014955 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956esac
14957_ACEOF
14958
14959# Neutralize VPATH when `$srcdir' = `.'.
14960# Shell code in configure.ac might set extrasub.
14961# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014962cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14963ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014964$extrasub
14965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014966cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014967:t
14968/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014969s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014970s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014971s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972s&@srcdir@&$ac_srcdir&;t t
14973s&@abs_srcdir@&$ac_abs_srcdir&;t t
14974s&@top_srcdir@&$ac_top_srcdir&;t t
14975s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14976s&@builddir@&$ac_builddir&;t t
14977s&@abs_builddir@&$ac_abs_builddir&;t t
14978s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14979s&@INSTALL@&$ac_INSTALL&;t t
14980$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014981"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014982eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
14983 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014986 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14987 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014988 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014989which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014990$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014991which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014992
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014993 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014994 case $ac_file in
Barry Warsaw14d98ac2010-11-24 19:43:47 +000014995 -) cat "$tmp/out" && rm -f "$tmp/out";;
14996 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000014997 esac \
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014998 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014999 ;;
15000 :H)
15001 #
15002 # CONFIG_HEADER
15003 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015004 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 {
15006 $as_echo "/* $configure_input */" \
Barry Warsaw14d98ac2010-11-24 19:43:47 +000015007 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15008 } >"$tmp/config.h" \
Mark Dickinsonec0d3552010-11-20 10:29:12 +000015009 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Barry Warsaw14d98ac2010-11-24 19:43:47 +000015010 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015011 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15012$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015013 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015014 rm -f "$ac_file"
Barry Warsaw14d98ac2010-11-24 19:43:47 +000015015 mv "$tmp/config.h" "$ac_file" \
Mark Dickinsonec0d3552010-11-20 10:29:12 +000015016 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015017 fi
15018 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015019 $as_echo "/* $configure_input */" \
Barry Warsaw14d98ac2010-11-24 19:43:47 +000015020 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Mark Dickinsonec0d3552010-11-20 10:29:12 +000015021 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015022 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015023 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015025
15026 esac
15027
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015028
15029 case $ac_file$ac_mode in
15030 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15031
15032 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015033done # for ac_tag
15034
Guido van Rossum627b2d71993-12-24 10:39:16 +000015035
Matthias Kloseb9621712010-04-24 17:59:49 +000015036as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015037_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015038ac_clean_files=$ac_clean_files_save
15039
Matthias Kloseb9621712010-04-24 17:59:49 +000015040test $ac_write_fail = 0 ||
Mark Dickinsonec0d3552010-11-20 10:29:12 +000015041 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015042
Martin v. Löwis11437992002-04-12 09:54:03 +000015043
15044# configure is writing to config.log, and then calls config.status.
15045# config.status does its own redirection, appending to config.log.
15046# Unfortunately, on DOS this fails, as config.log is still kept open
15047# by configure, so config.status won't be able to write to it; its
15048# output is simply discarded. So we exec the FD to /dev/null,
15049# effectively closing config.log, so it can be properly (re)opened and
15050# appended to by config.status. When coming back to configure, we
15051# need to make the FD available again.
15052if test "$no_create" != yes; then
15053 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015054 ac_config_status_args=
15055 test "$silent" = yes &&
15056 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015057 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015058 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015059 exec 5>>config.log
15060 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15061 # would make configure fail if this is the last instruction.
Mark Dickinsonec0d3552010-11-20 10:29:12 +000015062 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015063fi
15064if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15065 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15066$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015067fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015068
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015069
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015070echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015071if test ! -f Modules/Setup
15072then
15073 cp $srcdir/Modules/Setup.dist Modules/Setup
15074fi
15075
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015076echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015077if test ! -f Modules/Setup.local
15078then
15079 echo "# Edit this file for local setup changes" >Modules/Setup.local
15080fi
15081
15082echo "creating Makefile"
15083$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15084 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015085 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015086mv config.c Modules